mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-12-05 10:19:23 +08:00
39370aba29458ff737f9026568bfa91f9206ea89
43
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
39370aba29 |
fix(skill): make skill initialization safe on Windows pipes (#421)
## Summary - Keep the caller's stdout encoding and escape only characters it cannot represent. This prevents the normal skill initializer command from aborting on legacy-encoded Windows pipes and preserves Unicode output on UTF-8 streams. - Write all generated skill templates as UTF-8 so the localized content does not depend on the machine locale. - Exercise the actual CLI with CP1252 and UTF-8 output in the i18n validation workflow, including a non-ASCII destination, generated localized files, and duplicate-directory errors. ## Validation - Reproduced UnicodeEncodeError with the unmodified CLI and CP1252 stdout; both focused regression tests pass on the change. - Catalog and i18n validation passed with zero errors; translation freshness and `git diff --check` passed. - No new dependencies or metadata changes. A native installed-app confirmation still belongs to the consuming product after syncing the bundled Market seed. |
||
|
|
55588fd33f |
fix(catalog): 截断超长 PR 正文避免超过 GitHub 65536 字符上限 (#422)
## 根因 在 [run 46796970818](https://github.com/desirecore/market/actions/runs/46796970818) 中,`gamedev-agent-skills` 包含大量合集子项,每个子项生成的诊断表格行汇总后超过 GitHub PR 正文 65,536 字符上限,导致 `git push` 成功后 `gh pr create` 返回 exit 1,进而留下无 PR 的孤儿分支并在次日触发 `git push` non-fast-forward 失败。 ## 修复 - `scripts/catalog/propose_upstream_updates.py`:新增 `_truncate_pr_body`(上限 60,000 字符,截断处提示完整逐项结果见本次 Workflow 的 `audit-results` artifact),统一应用于新建 PR 与自动草稿转 Ready 两条路径。 - `scripts/catalog/test_propose_upstream_updates.py`:新增单测 `test_oversized_pr_body_is_truncated_below_github_limit`(17 tests OK)。 |
||
|
|
2d96fc9c41 |
feat(catalog): 已有自动草稿 PR 按最新 main 重审通过后自动转 Ready (#419)
## 概述 / Summary 增强每日 `Upstream Health` 工作流中的 `propose_upstream_updates.py`:当已有自动生成的 **Draft PR** 按最新 `main` 规则与 `special-review.v1.json` 重新审核通过时,自动同步 `main`、运行全部仓库校验、刷新机器审计回执并解除 Draft(`gh pr ready`)。 ### 安全边界(绝不误伤人工 PR) 1. **仅处理自动草稿**:必须同时满足 `isDraft == true`、目标分支与当前 `updates/<id>-<head[:12]>` 完全一致,且 PR 上所有提交与改动文件均来自自动提案器(或普通 `Merge branch 'main'`)。若检测到任何人工提交或额外文件,立即跳过保留原样。 2. **绝不 rebase / force-push**:使用普通 `git merge --no-edit <main_sha>` 同步主干;遇到合并冲突直接保持 Draft。 3. **强制重跑全部仓库校验**:推送与 `gh pr ready` 前强制执行 `validate_catalog_metadata.py --require-complete`、`validate-i18n.py`、`translate.py --check`(及合集的 `gen-collection-children.py --check`),任意校验失败立即中止并保留 Draft;清理过期的 `docs/update-reviews/<id>-*.json` 阻断记录。 ## 变更 / Changes - `scripts/catalog/propose_upstream_updates.py`:新增 `_is_automated_draft_only` 与 `promote_verified_draft_pr`,并在已有 PR 重审通过分支挂钩 - `scripts/catalog/test_propose_upstream_updates.py`:新增 3 项单测覆盖自动转 Ready、人工修改保护与校验失败拦截 - `docs/verified-update-automation.md`:同步更新自动草稿重审转 Ready 的行为说明 ## 验证 / Validation - `uv run --offline --quiet scripts/catalog/test_propose_upstream_updates.py` - `uv run --offline --quiet scripts/catalog/validate_catalog_metadata.py --require-complete` - `uv run --offline --quiet scripts/i18n/validate-i18n.py` - `uv run --offline --quiet scripts/i18n/translate.py --check` - `git diff --check` |
||
|
|
e5f31b4c37 |
feat(catalog): 增加带完整审核门控的客户端通知与纯数据延续规则 (#400)
## 概述 / Summary
在**保留完整自动化审核门控**的前提下,为两类高频重复产生 Draft 的场景增加「可审计延续(Audited
Carry-Forward)」规则,减少无风险波动导致的重复草稿:
1.
**客户端根通知附带的可审计延续(`acceptedClientAttachedNotices.allowCarryForwardWhenUnchanged:
true`)**
- 适用于已验证客户端自动附带根 `LICENSE` 的条目(如
`last30days`、`addy-agent-skills`、`mattpocock-skills`)。
- **必须同时满足全部审核门控才会放行**:
1. 必须绑定已发布的正式客户端版本标签 `clientReleaseTag`(如 `v10.0.214`)及已核验的
`clientCommit` / `clientTree`;
2. 新快照的根 `LICENSE` 字节必须与 `noticeSha256` 逐字节一致,且 MIT 声明须完整通过 `mit_grant`;
3. 安装范围 `scopes` 集合完全未变;
4. 每个安装范围目录顶层在新快照中**未出现**同名 `LICENSE` / `NOTICE` / `COPYING` 冲突文件;
5. 依赖清单、frontmatter、文件预算、嵌套许可及合并前人工无扩张审核等所有其他门控全部照常执行。
2. **纯数据更新的许可例外可审计延续(`acceptedDataOnlyLicenseException`)**
- 适用于无独立 `LICENSE` 但每日自动刷新数据文件的条目(如 `follow-builders` 的 4 个 JSON feed
文件)。
- **必须同时满足全部审核门控才会放行**:
1. 必须显式声明 `evidencePath`、`evidenceSha256` 和精确的
`allowedDataPaths`(禁止通配符,禁止列入
`LICENSE`/`NOTICE`/`COPYING`/依赖清单/`SKILL.md`);
2. `evidencePath` 在旧/新快照间逐字节一致且匹配 `evidenceSha256`;
3. 旧/新快照安装范围内的**全部变更文件**必须严格落在 `allowedDataPaths`
内,任何脚本、`SKILL.md`、配置或新增文件变化立即阻断;
4. 默认开启 `requireValidJson: true`,要求每个变更数据文件在旧/新快照均能解析为合法 JSON
对象且**顶层字段集合完全一致**。
## 变更 / Changes
- `schemas/special-review.v1.schema.json`:向后兼容地新增
`allowCarryForwardWhenUnchanged` 与 `acceptedDataOnlyLicenseException`
- `scripts/catalog/audit_skill_update.py`:在
`accept_client_attached_notices` 增加带碰撞检测与 `clientReleaseTag`
强制校验的延续逻辑;新增 `accept_data_only_license_exception` 并在 `audit_snapshots`
挂钩
- `scripts/catalog/update_diagnostics.py`:接入
`accept_data_only_license_exception`,核验通过时将
`pin-bound-license-exception` 与安装内 `installed-project-notice` 记为
`info`,任何违规直接记为 `blocked`
- `docs/verified-update-automation.md`:补充两条可审计延续规则及其审核边界说明
- `scripts/catalog/test_audit_skill_update.py`:新增 2 组单测覆盖合法延续、缺
`clientReleaseTag` 拦截、顶层冲突通知拦截、JSON 字段结构变化拦截及越界代码变更拦截
## 验证 / Validation
- `uv run --quiet scripts/catalog/test_audit_skill_update.py`
- `uv run --quiet scripts/catalog/test_update_diagnostics.py`
- `uv run --quiet scripts/catalog/test_validate_catalog_metadata.py`
- `uv run --quiet scripts/catalog/validate_catalog_metadata.py
--require-complete`
- `uv run --quiet scripts/i18n/validate-i18n.py`
- `uv run --quiet scripts/i18n/translate.py --check`
- `git diff --check`
|
||
|
|
9fa7f88ef1 |
feat(catalog): 落地正式版根通知、精确提交例外与行为安全复审门控 (#388)
将正式版根通知、精确提交许可例外与行为安全复审门控写入策略文档、Schema 与审计脚本。 |
||
|
|
f8e69321eb |
fix(market): 独立技能许可证回读绑定已验证客户端 / Bind standalone notice evidence (#379)
Market 审计区分独立技能与合集安装。独立 Git 子目录只认客户端 #6429 合入 dev 的精确提交 85fba4abf4c60c5704557b2c76568a3da3323967 和 tree 4e38063a01a6d8b9e7b7fc549bbc2716b7d45a81,回读仍须绑定上游完整 pin、路径、根通知哈希和回读时间。保留合集 #6426 的实现与既有记录;两种路径的实施证明不可混用。 Separate standalone Git-subdirectory evidence from collection-child evidence. Only the verified standalone client commit/tree is eligible for that route. An exact upstream pin, scope, notice hash and readback time remain required; the collection entry and receipts are unchanged. This is source implementation provenance only, not a release or install acceptance, and does not change catalog state, source pins, or receipts. |
||
|
|
4e205dbdd0 |
在 Market 双语健康报告顶部显示北京时间和运行链接 (#376)
## 背景 #213 的当前双语报告没有可见生成时间,折叠区里保留的旧报告日期也容易被误读。 ## 修改 - 在当次双语报告的第一行显示实际生成时间,标明北京时间(UTC+08:00)。 - 使用 GitHub Actions 的运行上下文链接到本次运行;重跑时链接到准确的 attempt。本地生成没有 Actions 上下文时只显示时间。 - 不改定时设置、审核结果、旧报告存档或 issue 发布与开关规则。 补充:每次运行的报告工件都会有新时间。#213 在首次补上时间或报告内容变化时才更新正文;仅时间或链接变化时保留当前正文及其对应的运行链接,原有开关规则不变。 ## 验证 本地运行 6 项单元/入口回归测试通过,覆盖跨日换算、运行链接、首行、首次补充时间、相同报告不改正文和结果变化时更新。未触发生产工作流或改动 #213。 |
||
|
|
58e25e1f97 |
feat(market): 专项复核支持客户端附加根通知与简介双语复核 (#374)
## 变更 / Changes 为 Class C 专项复核增加两个字段,以便在**不把根 LICENSE 存在视为安装交付、不发明许可例外、也不把旧简介或未更新的 shortDesc 延伸到新 pin**的前提下,记录: 1. `acceptedClientAttachedNotices`:接受已核验 DesireCore 客户端在安装合集子项时把根 `LICENSE` / `NOTICE` / `COPYING` 附进副本的真实安装回读。 2. `acceptedDescriptionAndLocales`:记录上游 `SKILL.md` 简介已变、市场条目中英 `shortDesc` 与 catalog 镜像已按新简介人工复核的证据。该字段只覆盖本身已有 shortDesc 的安装范围;合集根目录的市场简介不视为每个子项的派生文案。 这是完成 [desirecore/market#361](https://github.com/desirecore/market/pull/361) 所必需的审核能力,本身不改任何技能 pin。 对应客户端实现为 [desirecore/desirecore#6426](https://github.com/desirecore/desirecore/pull/6426) squash 合入 `dev` 的 `28128a15b3abd76e1529b983ca8a921bdfe9ff30`(tree `e8c1321e6a098eb905f4646b2027bc7b2259ca6b`)。当前 `dev` 已前移,但该修复仍在历史中且附加代码未被改动。后续 tip 不能自动视为同一实现。 ## 安全边界 / Security boundaries 默认拒绝仍然成立。只有同时满足以下条件才会被接受: - 记录必须包含真实的 `reviewedBy`、`reviewedAt` 和非空 `notes`。 - `acceptedClientAttachedNotices.sourceRef` 必须等于本次审核的新 pin 完整 40 位 SHA;`clientCommit` 必须是已核验的附加实现提交(当前仅 `28128a15…`);`noticeSha256` 必须与当前快照根通知字节一致;`scopes` 必须恰好等于全部安装范围并附子项安装回读。错 pin、错客户端 SHA / tree、错根通知哈希、缺子项回读、不完整 MIT,以及仅有「将会附加」说明一律拒绝。 - `acceptedDescriptionAndLocales.fromRef` / `toRef` 必须等于本次审核的旧 / 新 pin;`files` 必须恰好覆盖上游简介已变且该范围本身已有双语副本的路径;每语种必须绑定已更新的 `shortDesc` 及其 SHA-256,英文简介必须覆盖新简介的特有词项,中文简介必须是与英文、旧简介不同的中文文案,catalog `summary` 必须与 entry 一致。错 pin、错路径、未更新或未匹配新简介的 shortDesc 一律不能通过,也不得自动延伸到新 pin。 本变更不执行上游代码,不代表安全认证或运行验收。#361 的正式快照 PR 会用正常 merge 把本分支合进对应快照分支,以便 required checks 能跑到新挂钩。本 PR 本身不含 #361 快照,也不自行合并。 ## 验证 / Verification - `PYTHONPATH=scripts/catalog uv run --with pytest --with jsonschema --with pyyaml python -m pytest scripts/catalog/test_audit_skill_update.py scripts/catalog/test_update_diagnostics.py scripts/catalog/test_validate_catalog_metadata.py`:**150 passed**(含 190 subtests)。正例为绑定当前 pin 与完整证据的接受;反例覆盖错 pin、错客户端 SHA / tree、错根通知哈希、缺子项回读、错路径、未更新或未匹配新简介的 shortDesc、缺理由、不完整 MIT,以及仅有「将会附加」或「已复核」说明的情况。另有回归:合集根 i18n 不会单独要求没有 shortDesc 的子项通过简介字段。既有「根 LICENSE 不等于安装交付」用例保持失败。 Automated source/license/metadata verification tooling only. No auto-merge of skill snapshot PRs in this change. |
||
|
|
44ab34fe54 |
完善市场更新自动化:精确准入审核、安装通知门禁与双语问题闭环 (#354)
## 实际功能与范围 在原 PR 上继续完善,不新开机制 PR。使用 main 的可信代码与策略重新发现上游、读取精确旧新 pin、重建真实差异并绑定最终 SHA;不执行 PR 或上游代码,不把 listing-only 自动提升为 installable。 已正常 merge 最新 main,包含 #356、#357 以及其他 worker 完成的 #359;没有 rebase、force-push,也没有修改 #358–360 工作分支。本 PR **不合并、不部署自身**。 ## 修改前后对照 | 修改点 | 修改前 | 修改后 / 实际效果 | |---|---|---| | Git 固定来源更新 | 主线发现更新后提出快照 PR,无法统一覆盖本轮发现的准入缺口 | 沿用精确 pin 的真实 delta 核验;新增门禁同样用于提案与可信自动合并重审。每轮最多审核 5 个新 Git 候选,另可只读复核 5 个已有 PR,不改其内容、不重复开 PR | | ZIP / Web 新版本发现 | 主线主要检查链接可访问性,不发现新版 | 只通过显式登记的 ClawHub / GitHub release asset / GitHub file 适配器发现与固定来源,不猜版本、不把新哈希当作审核通过。目前实际登记高德 ClawHub;其他来源须另配可信跟踪;嵌套 ZIP 安装目录尚未适配 | | 市场本地技能 | 不自动同步第三方上游 | AI News Radar 使用上游精确映射与文件清单,保留市场包装和本地补丁;上下游同时修改或映射范围不一致即暂停,不覆盖本地补丁。目前只登记此本地包 | | 主许可通知是否随安装交付 | 能核对根及嵌套许可变化,却不能证明根主通知随 source.path / 所选 child.path 交付 | 分别检查每个所选目录;vendor/LICENSE 或 SKILL 中单行 MIT 不能替代主项目完整版权、授权和免责通知。README/SKILL 内完整等效文本可通过,不强制 standalone LICENSE;未证明交付时阻断或转人工,不擅改安装方式 | | NOTICE 的实际交付 | 根 NOTICE 存在或哈希已审可能被误当作安装交付 | 声明的 NOTICE 未证明随目录交付会阻断;未声明根 NOTICE 的适用性保守转人工。非标准/嵌套等效通知需人工复核,不把扫描未命中说成没有合法许可 | | 精确 pin 人工例外 | README 文本没变时可能将旧许可例外扩展到新 pin | 单行 MIT 的旧 pin 例外不能自动继承;新 pin 必须另有真实人工授权。#359 的新 pin 例外是另一 worker 独立补审后合入 main 的决定,不是本机制自动扩大旧授权 | | 版本、双语与派生目录 | 结构化字段通过不代表说明文字、两种语言和派生目录一致 | 使用明确版本源提示旧版本文案;根插件版本不强加给所选子目录,不把任意数字当版本。检查 entry/catalog 子项语言镜像,描述变化转人工;历史英文回退单独标记,不伪称已翻译 | | 安装内容、权限、依赖和行为差异 | 依赖哈希接受或简短专项说明容易被误读为完整行为审核 | 直接比较完整 Git 对象和安装路径,报告新增/删除/权限差异,不依赖截断的 GitHub compare。授权、凭据、配置、网络相关命名实现的变化保守转人工;明确这只是复核提示,不是已证实漏洞。开发依赖不冒充所选技能运行依赖 | | 失败原因及真实回执 | 首个异常后缺少精确路径和未检查阶段;后续校验失败可能覆盖旧回执或仍显示已审 | 逐项输出技能/路径、精确旧新 pin、门槛、原因、修法与实际状态,区分历史遗留、本次引入、人工待审、实际失败和失败后未完成;保留真实旧回执,独立保存失败命令/输出,不生成假成功回执。物化 ZIP/local 的临时 Git ID 不当作真实来源 pin | | 当前候选 PR 与 main 重放分层 | 对 main 旧元数据重放的失败,可能被误说成当前已修订 PR 仍未修;旧回执错误与许可根因混在一起 | 只读当前 PR 精确 head 的 entry、sidecar、旧回执与实时 checks;不 checkout、不执行候选。每行标注 main 重放或当前候选 head。reviewedRef / receipt ref / receipt scope 三类未签新回执的派生错误与主通知交付根因分开;读取失败明确未检查,不停止其他独立候选,也不当作通过 | | unhealthy report / issue 展示 | 健康 issue 在审核前生成、单语、每日时间戳驱动更新,并用评论关闭 | 健康结果 + Git 审核 + ZIP/Web/local 结果在审核后汇总为中英双语;复用原 upstream-health issue,稳定托管区、无变化不编辑、不发评论,完整确认解决才关闭,新问题重开同一 issue。首次迁移保留 #213 现有手动双语内容为历史快照,托管区外人工内容保留;完整 JSON/日志保存在 audit-results 工件 | | 自动合并的信任与最终 SHA 门禁 | 不能靠“有标签/有回执”证明可合并;原先还错误要求所有语言任务必须存在 | 只接受可信 main 重审得到的完整预期差异,检查当前 main 与最终 SHA;validate、translate、Copilot wait 为具名基线,实际存在的最新 CodeQL/Analyze、statuses、workflow runs 也必须完成且成功,适用检查缺失/失败/进行中均不放行。PR 自带 JSON 或任意标签不能授权 | | 纯版本例外与真人审核 | 所有字节变化要求第二真人过宽,但也不能用版本号掩盖行为变化 | 保留可独立证明的 SKILL.md 顶层 semver-only 例外:其余字节、文件集和权限均相同才与完全相同 payload 一样无需额外行为批准;其他实质变化仍需最终 SHA 的有权限真人维护者审核,真人审核不能豁免独立机器门禁 | | hold、冲突、凭据及发布身份 | 不能把配置不足或冲突伪装成更新成功 | hold / 双边修改 / 范围变化 / 未确认许可均暂停。实际发布与合并身份验证为 mashagua;MARKET_MAINTAINER_TOKEN 未配置时只审核,不冒用机器人发 PR。保留分支保护与预期 SHA squash,无 admin 绕过;每轮最多合并一项,本轮不执行合并 | ## 本轮真实案例与限制 - **#358 / Addy**:固定 `8c99fa36d90068c82d547f7c12a9d67a3e95f4ee` → `e997ac5b9a74eab332d5e9793bb38a38c8cfdd74`。包括 `skills/api-and-interface-design` 在内,根主 MIT 通知未被证明随所选子目录交付;是旧版本已有的缺口。0.6.18 双语文案已由 #358 独立修复,不能把 main 的旧文案误称为该 PR 仍未修复。 - **#359 / Follow Builders**:旧 pin `22c2e72e1a4bb0fc0f3e19f992fc55615b48989e` 的例外不自动覆盖 `65452b9258f31ed2893734c86481216d2e4105ff`。新 pin 的人工例外、22 文件真实回执及四个 JSON 数据变更由另一 worker 补审,现已合并 main;本 PR 已正常同步,未碰其分支。 - **#360 / Last30Days**:`331025e662756ca51e86dfddcf59969f6dba25a0` → `7c2e1c2b099b13abd4397910168c4f53e638bb21`,范围 `skills/last30days`。主通知在目录外,bird-search vendor 许可不能替代;真实差异包含授权/配置/网络实现,依赖专项接受不代表完整行为复审。没有删除资源、缩范围或改变交付方式。 - **#361 / Matt Pocock**:上游仍为 `5863806dd4e15c63174bee4e7515a4256792ecfa` → `d65391149dbb5fe76478e76fa8d5122b2aa5a70e`;当前候选 head `4cd8c6a4a31ef4512a871d15a355dd8dcf670cb0` 已补39成员、78条双语并处理34条历史英文回退。本轮实际只读复审确认:当前候选成员缺项0、英文回退0,但39/39安装目录仍未证明携带完整主 MIT 通知。独立 PR 复核记录为39目录109文件均无完整必要通知,旧38也已有缺口;因此保持 Draft,不伪造新回执。 - 对 main 旧登记重放的原失败仍是登记38/解析39;物理 SKILL 39→39、无新增/删除/移动,software-factory 仅因 YAML 修好重新可发现,chief-of-staff 描述另变,yaml 是根开发依赖。**这是历史 main 基线,不是说当前候选没补成员/翻译。** - 当前候选 validate 真实失败;reviewedRef 不对应目标、旧 receipt.source.ref 不对应目标、旧 receipt.scope38 不覆盖39,是**未签新回执的三项派生错误**,不是三项新许可变更。translate、CodeQL、三个 Analyze 成功;Draft 的 Copilot wait 为 skipped,不称实质审核批准。先解决通知根因并真实复审,不能只改 ref/scope 凑绿灯。 - 证据:[当前PR实际复核说明](https://github.com/desirecore/market/blob/4cd8c6a4a31ef4512a871d15a355dd8dcf670cb0/docs/reviews/mattpocock-skills-pr361-d65391149dbb.md) · [JSON记录](https://github.com/desirecore/market/blob/4cd8c6a4a31ef4512a871d15a355dd8dcf670cb0/docs/reviews/mattpocock-skills-pr361-d65391149dbb.json)。 自动通知证明采用有界、保守的直接目录文本匹配;不声称覆盖一切合法非标准许可写法,也不代替真实安装回读或全部行为审查。客户端携带父级通知的实现需要另行授权,并让实际产物、摘要、锁记录、升级和回滚一致;本 PR 不跨仓修改客户端。 实现说明:[docs/upstream-audit-reporting.md](https://github.com/desirecore/market/blob/2bf76eade1644ff4b928c873cbb5d9139a322973/docs/upstream-audit-reporting.md)。现有报告:[issue #213](https://github.com/desirecore/market/issues/213);当前手动双语不等于持久模板已部署,主线旧任务仍可能覆盖,须本 PR 经审核合入 main 后才生效。 ## 最终 SHA 验证 最终 head:`2bf76eade1644ff4b928c873cbb5d9139a322973`。功能提交:`574f9c904da19eb4ce5c970c45b798bc6d3d3f72`、`e0d7ef0d936872f08d8fb6bd20166d98ddf46952` 与 `2bf76eade1644ff4b928c873cbb5d9139a322973`;正常 merge main 提交为 `950ae45cc985f8510a13eb9487896e1d516a8613`。新提交 author/committer 均为 `mashagua <993498039@qq.com>`。 - 完整 `pytest scripts`:**306 passed、397 subtests passed**;仅一条环境 pytest 插件弃用警告。 - `validate_catalog_metadata.py --require-complete`、`validate-i18n.py`、`translate.py --check`、`git diff --check`:全部 exit 0。目录原有治理/英文回退警告未冒称已修。 - 同一最终 SHA 的远程 **validate、translate、CodeQL、Analyze (actions/python/javascript-typescript) 均 success**。 - `wait-for-copilot-review` 最新读取仍 **in_progress**,尚无 review 或行内评论;不冒称已完成 Copilot 审核。 不合并 #354,不部署;不修改 AI News Radar 的五条既有告警,不修改任何技能资源、结构、子项选择或安装方式。 |
||
|
|
f3d5f29503 |
fix(market): 纠正大包可用性、默认预算与许可通知边界 (#357)
## 实际修正 复审 #350/#353/#354/#356 后,纠正 #353 已合目录文案中的边界误导;不改上游交付,不擅自把七项提升为可安装,并反查 #350 同类问题。 - GIF/stickman 区分整库、所选路径、超 1 MiB 文件合计:GIF 整库 883.07 MiB;stickman 整库 911.06 MiB、所选路径 552.59 MiB。原 676/812 MiB 是大文件小计,不是整个包。 - 明确市场 1 MiB/50 MiB/2000 是自动审核预算,不是上游技能能否使用的判定。budgetExemptPaths 不放宽总量。客户端固定 SHA Git 缓存 200/256 MiB 是默认值,内部 limits 可覆盖、不同取源路径有区别,不冒称不可配置绝对限制;不改任何阈值。 - 补齐 stickman 根 MIT LICENSE 不在所选路径内的实际通知携带问题;SAG/pixelfx/94+79+9 合集区分“市场可引用许可明确的上游”与“安装副本需要保留通知”,不暗示原仓库不可用或许可未知。 - 审计注释明确根 LICENSE/NOTICE pathspec 仅是审核证据,不等于客户端附带文件。新增固定源码行链接及离线复制结果说明。 ## 反查 #350 后追加纠正 - Agent Reach 的 agent_reach/skill(9 文件)、marketingskills 的 50 个子项、wecom-cli 的 15 个子项均缺根 MIT 通知。PPTX 的模板许可证属于第三方,不能替代 root LICENSE;已读取两个合集全部 65 个 SKILL.md。拟将三项市场安装暂停为 listing-only,保留原固定 source/合集点选/资源/已知许可及历史许可审核,不伪造安装通过。 - Karpathy 原 README 只有 MIT,而实际路径内原 SKILL.md 同样有 license: MIT;沿用已接受的一行声明边界,将 evidencePath 改到安装内真实文件,保持可安装,不一刀切降级。 - 网易三个子项各自含 LICENSE.txt,不降级;Follow Builders 整库包含 README 声明,交由现有 #356 校正文案;AI News Radar 显式授权本地包不撤回。 ## 不变边界 原 #353 七项的 source/ref/path、合集 94/79/9 与双语子项、已知许可、availability 和准入回执均不变。无上游文件、本地包装、资源删除、自创 fetch、安装器或客户端仓库改动。AI News Radar 是用户明确要求的本地包,不撤回;#356 已处理 Follow Builders 文案,不重复修复。#354 的自动化纠偏追加到其原分支,不在此 PR 重复。 ## 验证 - 完整 pytest:200 passed / 397 subtests passed;仅一条环境插件弃用警告。 - catalog --require-complete、validate-i18n、translate --check、git diff --check 通过。 - 逐项比较七项 source、children、governance、provenance 与 main 完全一致。 - 未执行上游脚本或外部服务,不宣称运行时/安装全部通过。 最终 head:7f4448219f36053abe6e4e1b2faab3fdc382d85d。 仅提交待审,不合并。 远程最终 SHA 检查已完成:validate、translate、wait-for-copilot-review 全部 success。此 JSON/文档差异未调度 CodeQL/Analyze,不把未适用任务伪报为通过。最终改动后已完整重跑 pytest:200 passed / 397 subtests passed。 |
||
|
|
e08ac37a64 |
fix(catalog): 勿将 licenses/ 目录误判为损坏的根 LICENSE (#334)
独立工具修订,不合并。对应失败草稿 #323 的前置修复:当前 `main` 上的审核器会把根目录名为 `licenses/` 的普通目录误判为损坏的 LICENSE 文件(“根许可或 Notice 不是普通文件”)。该目录在 #323 的旧 pin `79d2fc05405c76bc0a8f71b9c10355135da4747b` 和新 pin `87889b8729da8a02a4159bc7274c92be52464031` 上均存在,因此即使用当前审核器重放已准入旧 pin 也会失败。这不是上游缺失 LICENSE。根 LICENSE 本身是普通不变的 MIT 文件(blob `2d476d24fa5a9ae2ab35e5fd121494049eb2ee5d`)。 本 PR 的最小行为变化: - `root_evidence()` 跳过根上名为 LICENSE*/NOTICE*/COPYING* 的普通目录,不再把它们当成损坏许可文件。 - 这些根名上的符号链接、子模块或其他非普通文件,以及目录内的非普通文件,仍硬拦截。 - 根 LICENSE/NOTICE/COPYING **文件**的内容变化仍检测;这些文件被删除仍不可接受。 - `licenses/` 等许可目录被删除不可接受。 - 目录内第三方许可文本变化(含内容相同的重命名)不得被伪称为未变化;需在专项复核中提供新快照的 `acceptedRootLicenseDirectoryManifestSha256`(目录清单的规范 JSON 的 SHA-256)。该字段不削弱对根 LICENSE 文件删除的保护,也不能用来跳过符号链接/子模块拦截。 - 既有安装范围内 NOTICE 精确追加政策不退化。 已加回归测试:合法 MIT LICENSE + `licenses/` 目录在新旧 pin 上可通过;LICENSE 或目录内符号链接/非普通文件仍拒绝;LICENSE 内容变化仍检测;目录内第三方文本变化在无正确清单哈希时不能通过;目录删除不可接受;存在 `licenses/` 时,既有 NOTICE 精确追加仍可用。catalog/audit/collection 单测 107 passed(含 182 subtests),catalog 与 i18n validate 0 error。 #323 的正式快照 PR 将以本分支为 base 叠放,并清楚标明依赖。在本工具修订合入 `main` 之前,不要把基于 `main` 的快照 PR 声称可以复现已通过的审核。本 PR 本身不含 #323 快照,也不自行合并。 |
||
|
|
8546cb641a |
feat(market): 专项复核支持安装范围内附加 Notice 的精确接受 (#330)
为 Class C 专项复核增加 `acceptedScopedNotice`,以便在**不放宽根许可证门禁、也不接受嵌套 LICENSE** 的前提下,审查并接受安装范围内已有 NOTICE 文件的附加变更。这是完成 [#310](https://github.com/desirecore/market/pull/310) 所必需的审核能力,本身不改任何技能 pin。 ## 安全边界 / Security boundaries 默认拒绝仍然成立。只有同时满足以下条件的嵌套 NOTICE 追加才会被接受: - 记录必须包含真实的 `reviewedBy`、`reviewedAt` 和非空 `notes`。 - `fromRef` / `toRef` 必须等于本次审核的旧/新完整 40 位 SHA,过期复核会被拒绝。 - `files` 必须恰好等于实际变更的 NOTICE 路径集合(不能多、不能少、不能重复)。 - 每个文件必须给出旧、新内容的 SHA-256,并与两次快照中的真实字节一致。 - 新文件必须是旧文件的严格前缀保留追加(`new.startswith(old)`)。丢掉原有声明的改写或前置插入即使哈希写对了也会被拒绝。 - 只允许非根路径的 NOTICE(例如 `skills/.../NOTICE`)。根目录 LICENSE/NOTICE/COPYING 仍走既有 `acceptedRootEvidenceSha256`。 - 嵌套 LICENSE/COPYING、删除、重命名、新建 NOTICE、通配符、路径逃逸(`..` / 绝对路径)、符号链接一律拒绝。 - `excludePaths` 仍然不能用来隐藏许可或 Notice 文件。 本变更不执行上游代码,不代表安全认证或运行验收。 ## 验证 / Validation - `uv run --with pytest --with jsonschema --with pyyaml python -m pytest scripts/catalog/test_audit_skill_update.py`:29 passed(含既有根 Notice 用例,以及附加 NOTICE 的正例和哈希/快照不匹配、缺理由、多余或不全路径、通配符、`..`、嵌套 LICENSE、删除、重命名、新建、前置插入、excludePaths、符号链接等反例) - `uv run --with pytest --with jsonschema --with pyyaml python -m pytest scripts/catalog/test_validate_catalog_metadata.py`:62 passed Automated source/license/metadata verification tooling only. No auto-merge of skill snapshot PRs in this change. |
||
|
|
b329b8cc30 |
feat(market): 专项复核支持合集成员与根 Notice 的精确接受哈希 (#307)
为 `special-review` v1 增加两个可选接受字段,使 Class C 专项复核能在**精确匹配**时接受合集成员变化和根目录 LICENSE/NOTICE/COPYING 变化。这不是无条件绕过硬门槛:哈希或路径集合不对、不完整,审计仍然失败。 本 PR **只改审计工具、schema 和单元测试**,不更新任何技能 pin,也不把失败草稿标成 Ready。 ## 新字段 - `acceptedRootEvidenceSha256`:根目录 LICENSE/NOTICE/COPYING 路径 → 新快照文件字节的 SHA-256。当根证据有变化时,该映射必须**恰好等于**新增或变更路径及其新哈希。删除这些文件仍一律阻止,即使复核记录省略了被删路径。`excludePaths` 仍不能用来隐藏许可、Notice 或依赖清单。若声明的 `licenseEvidencePath` / `noticePath` / `license.evidencePath` 同时变化,也必须被同一接受哈希覆盖,否则该检查仍失败。安装范围内的许可/Notice 变化仍是硬门槛,本次不加豁免。 - `acceptedCollectionPaths`:必须恰好等于新快照 `discover_children` 的成员路径集合。接受后用发现结果作为审核树、预算和后续检查的路径,并据此重建 `entry.children` 与 sidecar `spec.collection.children`(写入 id、path,以及 frontmatter 归一化后的 version)。新成员必须同时提供 `acceptedFrontmatterSha256`,且**不会自动编造翻译**。已有成员的 frontmatter 规则和版本回退保护保持不变。没有该字段时,新增成员仍会以「合集成员」被阻止。 ## 本地验证 在当前 `origin/main`(`d463565237fab79b9e6eb5e944246a4e14dd625e`)上: - `scripts/catalog/test_audit_skill_update.py`:22/22 - `scripts/catalog/test_validate_catalog_metadata.py`:62/62 - `scripts/catalog/test_propose_upstream_updates.py`:9/9 本 PR 不代表运行或安全认证,也不自动合并。 |
||
|
|
f9d2f810c7 |
chore(market): 专项复核并更新 humanizer / impeccable / last30days / khazix-skills 上游快照 (#299)
专项复核(Class C)并更新 humanizer / impeccable / last30days / khazix-skills 的上游快照,使自动核验真正通过后再开正式 PR。 本 PR 取代仍停在草稿里的 desirecore/market#295、#296、#297、#298。不会把那些失败草稿标成 Ready,也不合并它们。本次不涉及 dingtalk-cli(#294 仍只上架)。 ## 复核结论 - **humanizer** `8c307f367c91bd974002f10f2be2965d642c13df` → `b48c832f0f809c1b5658edbb838c2521b72f2413`(4.0.0)。MIT 未变。接受新增的根目录 pi `package.json`(无 dependencies / scripts),并同步去掉维基百科引用后的简介。 - **impeccable** `d34c87e1a00989ae8dbdd7f6b30b70f23319e860` → `d41d9860b0094dcb68030657da63461212835aaa`(4.9.2)。Apache-2.0 与 NOTICE.md 未变。`plugin/skills/impeccable/scripts/data/font-index.json`(1,100,013 字节,blob `9d2029971df232a72ff6584d264c104490521742`)新旧 pin 相同,作预算豁免、不从安装范围拿掉。接受引擎 pin 0.1.18 → 0.1.25。 - **last30days** `e06af25a9a78487b75e8509e0e1687fec137176e` → `a854f3bcb2c4344d7498426d653378510f8b253a`(4.3.2)。MIT 未变。审核树排除 `skills/last30days/assets`(五份超预算示例媒体,已在上游 `.skillignore`,blob 与旧 pin 相同)。接受根 `pyproject.toml` 仅版本变化,以及 `uv.lock` 中 dev-only pytest 9.1.1 → 9.2.0。DesireCore 安装器在支持 exclude 前仍会拉取 assets。 - **khazix-skills** `322346ded8129436b3f64707789a73e732ae24d9` → `725ac9421901ef7fac6761136969d032737abcf3`。根目录与 aihot 的 MIT 未变,合集成员未变。审核树排除 neat-freak 评测夹具里 5 个指向 `CLAUDE.md` 的既有符号链接。子技能简介按官方 `gen-collection-children.py` 同步;保留已有的 `leader` 展示文案覆盖。 专项复核记录写在各技能的 `special-review.v1.json`(reviewedBy: mashagua,reviewedAt: 2026-11-18)。通过后的机器回执是 `upstream-audit.v1.json`,`reviewedBy` 为 `automated:source-license-metadata-v1`,`reviewedRef` 为新 SHA,`observed_at` 为 `2026-11-18T15:21:35Z`。 为支持上述复核,本次同时加入 `schemas/special-review.v1.schema.json`,并让 `audit_skill_update.py` 在自动核验时读取 excludePaths / budgetExemptPaths / 已接受的依赖与 frontmatter 身份。`excludePaths` 只从审核树省略路径,不能隐藏 LICENSE / NOTICE / COPYING 或依赖清单。没有提高 `MAX_FILE_BYTES`。 ## 本地验证 在当前 main(`23b4124dc4dba88a7a531fe6d502dba9993d0558`)上的工作副本中: - `audit_snapshots`:四个技能均 PASS - `scripts/catalog/test_audit_skill_update.py`:18/18 - `scripts/catalog/test_validate_catalog_metadata.py`:62/62 - `scripts/catalog/test_collection_generator.py`、`test_propose_upstream_updates.py`、`test_check_upstream_health.py`、`test_review_workflow.py`、`scripts/i18n/test_validate_i18n.py`:全部通过 - `validate_catalog_metadata.py --require-complete`:0 error / 104 warning(警告为目录中既有项) - `gen-collection-children.py --check khazix-skills`:OK(6 children) - `scripts/i18n/validate-i18n.py`:0 error - `scripts/i18n/translate.py --check`:通过 本 PR 不代表运行或安全认证,也不自动合并。 |
||
|
|
756b0f500b |
chore: 将 11 个专业技能改为可选安装 (#275)
## 中文 默认安装清单从 42 项减至 31 项,移除企业查询、专业优化和特定媒体供应商集成这 11 项:`baidu-poi-search`、`ccgp-gov-procurement`、`cnipa-patent-search`、`creditchina-query`、`tianyancha-risk`、`multi-source-sentiment`、`workforce-optimization`、`dashscope-image-gen`、`minimax-music-gen`、`minimax-video-gen`、`xiaomi-tts`。 技能正文、sidecar 和市场条目保留,仍可按需安装。其余 31 项默认技能保持不变。`retired` 保持为空,避免清理现有安装或用户之后主动安装的官方副本。 市场校验器改为验证自动安装清单是按 ID 排序的本地技能子集,仍拒绝未知 ID、重复项、乱序以及 active/retired 重叠;新增四项回归测试。中英文 README 同步说明默认安装与市场可选内容的区别,以及退役清理边界。 验证:`uv run --python 3.13 scripts/i18n/test_validate_i18n.py`(23 项通过);`validate-i18n.py`(0 errors,104 条现有警告);`translate.py --check` 通过。客户端使用现有 `packDir` 生成的候选种子已核对 42→31 的精确集合、七项策略关键技能、市场条目保留、退役清单不变、解包 Git checkout 干净;除本 PR 的五个文件外,816 个内容文件逐字节不变。 已检查 desirecore/desirecore#5978 的实际 diff:只调整自我认知目录树、作用域渲染及相关测试,不改默认技能清单或同步逻辑,无直接冲突。该源清单 PR 需先于客户端种子正式发布合入,否则后续市场同步会恢复旧默认清单。 ## English Reduce automatic global installation from 42 to 31 skills by making the eleven specialist integrations listed above optional. Preserve every skill body, sidecar and marketplace listing, and leave the other 31 defaults unchanged. Do not add retirement entries: startup retirement could otherwise remove existing or explicitly installed official copies. Validate the default list as a sorted subset of local skills while retaining rejection of unknown IDs, duplicates, ordering errors and active/retired overlap. Add four regression cases and update both README translations. Validation: 23 focused validator tests passed; repository validation reported zero errors and 104 existing warnings; translation freshness passed. The client candidate seed was generated with the existing packer and independently checked for the exact selection, all seven policy-critical skills, preserved optional listings, unchanged retirement data and a clean extracted Git checkout. All 816 other content files are byte-identical. The actual diff of desirecore/desirecore#5978 only changes self-awareness tree/scope presentation and its tests; it does not affect this default list or synchronization. Merge this source change before releasing the client seed so subsequent market synchronization preserves the new defaults. |
||
|
|
61148f2e73 |
feat(market): 自动核验上游技能更新并记录审核证据 (#237)
## 问题与结果 / Problem and outcome 原流程每周检查上游并更新跟踪 Issue,更新候选的版本、来源和审核记录仍需人工准备。本 PR 增加以下处理: | 项目 | 本 PR 的行为 | | --- | --- | | 1. 检查与候选 | 每天检查上游;每轮最多处理 5 个去重的 Skill 更新候选。自动核验仅接受固定 Git 快照,并要求旧快照已有许可和准入证据。 | | 2. 核验范围 | 比较实际安装范围、根目录及嵌套许可证/Notice、结构化依赖、名称简介、兼容性声明和合集成员。包自身版本可以递增;依赖或脚本声明变化须人工复核。核验阶段不执行上游代码。 | | 3. 核验通过 | 同步 entry 和 sidecar 的来源 ref、可确认的上游版本;写入机器审核身份、真实日期和 `upstream-audit.v1.json`,将证据绑定到来源 URL、新旧 ref、内容路径、许可摘要和检查结果。目录、本地化、翻译新鲜度及适用的合集校验通过后,才创建普通 PR。 | | 4. 无法确认或校验失败 | 保留旧审核记录,创建带具体原因的草稿;不会将旧审核标记为新快照已通过。缺失版本不编造,版本回退被阻止,未知发布日期保持未知。 | | 5. 重复与失败处理 | 保留已有更新 PR 和 hold 决策;同一快照已有关闭 PR 时不重复创建。提交、推送或 PR API 失败时保留覆盖报告,并以失败退出。所有更新均不自动合并。 | | 6. 覆盖报告 | 为顶层 Skill、合集子项和内置内容输出更新状态或阻碍原因。当前 145 个顶层条目加 302 个子项,共 447 条库存记录;这不是 447 次运行验收。ZIP/Web 仅收录条目保持准入阻碍,缺新版发现依据时明确说明。 | 机器核验仅确认有限范围的来源、许可与结构化元数据一致性。非结构化依赖、行为变化、实际运行和安全性仍需结合差异人工复核;不代表上游背书。 The weekly issue-only check becomes a daily pipeline with at most five deduplicated Skill candidates per run. Eligible immutable Git snapshots receive bounded source/license/structured-metadata verification and explicit machine receipts. Catalog and localization checks must pass before a normal PR is created; blocked candidates remain drafts with the old review intact. Existing proposals and holds are preserved, failures retain coverage reports, and nothing auto-merges or claims runtime/security certification. ## Copilot 审核邀请:改动与当前状态 / Copilot review invitation 1. **原失败原因**:旧邀请任务使用 `pull_request` 上下文,请求审核时返回 `403 Resource not accessible by integration`。[失败记录](https://github.com/desirecore/market/actions/runs/41067055993/job/124101102218)属于旧提交 `732cc2a`。 2. **本 PR 的改动**:邀请流程改用 `pull_request_target` 和受信任的 base 上下文,仅调用 PR 元数据 API,不检出或执行 PR 代码。返回 422 时,必须确认当前 head 已有 Copilot 审核记录,才能按已审核处理;其他错误仍失败。 3. **生效范围**:该流程监听 opened、reopened、ready_for_review,未监听 synchronize。邀请修正需合入默认分支后,再在适用事件上验证;本 PR 的推送不能证明新邀请流程已在线生效。 4. **当前实际审核状态**:截至下方验证快照,没有审核记录,也没有待处理审核邀请。`Wait for Copilot review` 运行成功,但日志显示等待约 8 分钟后超时,按现有规则放行,**不代表 Copilot 已审核**。该等待规则未在本 PR 中修改。[等待任务日志](https://github.com/desirecore/market/actions/runs/41309461885/job/124856608594) The old invitation failed with HTTP 403. This PR moves metadata-only invitation requests to the trusted base context and verifies a current-head review before treating HTTP 422 as already reviewed. The change still needs post-merge validation on a supported event. There are currently no submitted or pending review requests; the green waiting job reflects timeout fallback, not an actual Copilot review. ## 验证快照 / Validation snapshot 验证对应提交:`24183e240c945fd72cd0c8a6b10730b18db6d1f3`,2026-11-01。 - **已修复的 CI 错误**:`test_audit_skill_update.py` 曾向 `validate_sidecar` 传入空校验器字典,触发 `KeyError: 'skill'`。现加载真实 Skill client schema,并在两处调用中传入 `ClientEntryValidator`;原测试断言保持不变。 - **本地测试**:自动核验 15、候选发布 9、目录校验器 62、合集生成器 10、上游检查 47、审核邀请流程 1、i18n 校验器 19、Office launcher 11,共 **174 项通过**。 - **本地数据检查**:目录和 i18n 校验均为 0 errors、103 条既有 warnings;翻译新鲜度与 diff 空白检查通过。 - **GitHub CI**:[`i18n Validate`](https://github.com/desirecore/market/actions/runs/41309461898)全部通过,包括目录、翻译新鲜度和联网合集检查;[`i18n Auto-Translate`](https://github.com/desirecore/market/actions/runs/41309461185)成功;[`Wait for Copilot review`](https://github.com/desirecore/market/actions/runs/41309461885)成功,但属于上述超时放行。 - **合并状态**:GitHub 返回 `mergeable: true`、`mergeStateStatus: CLEAN`;当前提交没有失败检查。PR 尚未合并。 - **尚未做的验证**:未触发真实定时更新批次、未批量创建新版 PR、未执行上游代码;新邀请流程权限和真实审核仍待验证。 All 174 local tests pass. Catalog/localization validation reports zero errors and 103 existing warnings. Current-head CI is green, including generated collection checks; GitHub reports CLEAN. Copilot review itself, the revised invitation's online permissions, and a real scheduled publication batch remain unverified. ## 发布前提与关联改动 / Operation and related changes - Actions 自动创建 PR 需要仓库设置允许;本 PR 未调整仓库管理员设置。 - 默认 `GITHUB_TOKEN` 创建的 PR 通常不会触发其他工作流,因此发布候选前会执行目录和本地化检查;合并前仍需核对实际检查与审核结果。 - 客户端同版本内容交付及 Kimi 独立官方包维护:[desirecore#5526](https://github.com/desirecore/desirecore/pull/5526);关联文档:[desirecore-docs#864](https://github.com/desirecore/desirecore-docs/pull/864)。这些链接表示关联范围,不表示本 PR 合并即可发布客户端能力。 |
||
|
|
7189d91395 |
fix(catalog): 校验技能指针的客户端契约,撤回 REA 的单段版本 / validate skill pointers against the client contract (#239)
客户端按 `marketSkillEntrySchema` 校验 `entry.json`,`latestVersion` 只接受 `x.y` 或 `x.y.z`, 不通过的条目在索引时被跳过。#227 写入的上游修订号 `50` 让所有客户端都看不到 reverse-engineer-anything,而 manifest 仍计入它。 - reverse-engineer-anything 恢复为 `release: unknown` 且不声明 `latestVersion`;固定提交与合规审查不变。 - video-use 去掉指针无法声明的 `skillType`,此前客户端一直拒绝这份 sidecar。 - 校验器用导出的客户端 Schema 校验技能指针,并按客户端判据双向比较 sidecar 事实。 Clients skip any `entry.json` whose `latestVersion` is not `x.y` or `x.y.z`, so the upstream revision `50` from #227 hid reverse-engineer-anything from every client. This restores the shape reviewed in #212, drops a `skillType` from video-use that made clients reject its sidecar, and makes the validator enforce the client contract for skill pointers and compare sidecar facts both ways. 验证 / Validation: `validate_catalog_metadata.py --require-complete` 0 errors;真实 MarketSync 与校验器在 43 类变异下判定一致;索引 145 技能、9 Agent、2 团队,0 个 sidecar 被拒。 |
||
|
|
1ced701714 |
fix: 上游巡检允许已审查暂缓覆盖集合新增子技能 (#230)
## Why `upstream-health-hold.json` could only cover `upstream-path-change` and `outdated`. When the upstream head of a held collection adds children that `children` does not declare, the `new-skill` finding stays actionable even after maintainers have reviewed those children and decided not to declare them, so the tracking issue (#213) can never close. `skills/marketingskills` is in this state today: its two new upstream children were reviewed in the 2026-10-27 round (#227), but nothing can hold the finding. ## What changes - `new-skill` is now a holdable status (`HOLDABLE = ("upstream-path-change", "new-skill", "outdated")`). - A hold that lists `new-skill` also checks the undeclared children: - the set of undeclared child paths at branch head must equal the set at the reviewed `head`; otherwise `stale-hold: undeclared children changed since <head> (added …; removed …)`; - the staleness diff adds those undeclared child paths to the installed scope (declared children plus root `LICENSE*`/`NOTICE*`/`COPYING*`), so any change inside them gives `stale-hold: upstream changed within the installed scope or undeclared children since <head>`; - a network error while listing children at the reviewed head is `unreachable`, not a stale hold. - Holds without `new-skill` compare the same scope and keep every existing message. The only wording change for them is the validation error for an unholdable status, which now lists `new-skill` among the holdable statuses. - The discovery filter moves into `undeclared_children()`, which the `new-skill` finding and the hold check share, so both always agree on what is undeclared. - The checker docstring, the tracking-issue guidance in `.github/workflows/upstream-health.yml`, `README.md` and `README.zh-CN.md` describe the extended hold. ## Tests New cases in `scripts/catalog/test_check_upstream_health.py`: - a valid `new-skill` hold is reported as `held`, and stays held after an unrelated upstream change; - a newly added undeclared child, and later the removal of the reviewed ones, make the hold stale; - a content change inside a held undeclared child makes the hold stale; - an `outdated`-only hold on a collection still ignores changes to undeclared children (existing behaviour); - a network error while listing children at the reviewed head stays `unreachable`. The validation test now accepts `new-skill` and still rejects broken, `unreachable`, `unpinned`, `held`, `stale-hold` and `ok`. ## Validation - `scripts/i18n/test_validate_i18n.py`: 19 tests pass. - `scripts/catalog/test_validate_catalog_metadata.py`: 51 tests pass. - `scripts/catalog/test_collection_generator.py`: 10 tests pass. - `scripts/catalog/test_check_upstream_health.py`: 47 tests pass (5 new). - `validate_catalog_metadata.py --require-complete` and `validate-i18n.py`: 0 errors, 103 existing warnings. `translate.py --check`, `actionlint` and `git diff --check` are clean. - Live run on `marketingskills` (entry and hold as on `main`, in a scratch copy, not committed): - with `new-skill` added to the 2026-10-27 hold, the result is `stale-hold`, because upstream has since moved from `17772c7` to `0cd9b3a` and changed declared children. The same hold without `new-skill` is also stale, so this is not caused by the new check. The two undeclared children are unchanged between those heads. - with the reviewed head set to a commit whose tree equals the current head, `new-skill` and `outdated` are both `held` and the summary reports `actionable: false`. ## Follow-up After this lands, the `marketingskills` hold can add `new-skill` to its `statuses`. Its reviewed head needs a fresh review first, because upstream has changed declared children since `17772c7`. The pre-publication sensitive-token scan was run privately by the maintainer and passed. Refs #213. |
||
|
|
ef978c21a2 |
fix: 上游巡检收窄集合对比范围并支持已审查暂缓 (#222)
Collections install only their declared children: the client copies each selected child path at the pinned ref. Yet `outdated` compared the whole upstream repository, so CLI sources, end-to-end tests and changesets forced repins. Compare the declared child paths plus root license/notice files instead; undeclared upstream skills are still reported as `new-skill`. A pin kept on purpose after review was reported again every week, so the tracking issue could never close. A reviewed `upstream-health-hold.json` beside `entry.json` now reports its listed `upstream-path-change`/`outdated` findings as `held` (not actionable) while the pin and the installed-scope content at the reviewed upstream head are unchanged. Otherwise the findings return with an actionable `stale-hold`. Broken, unreachable, `new-skill` and `unpinned` findings cannot be held. CI tests require every hold to be well-formed and to match its entry's `source.ref`. A network error while checking a reviewed head stays `unreachable`. `outdated` rows in the tracking issue now link to the GitHub compare view. The summary JSON reports the held count, and the closing comment mentions remaining holds. Both READMEs document the comparison scope, the hold format and the links. Validation: 42 upstream-health, 10 collection-generator, 51 catalog-metadata and 19 i18n tests pass. Catalog metadata, i18n (0 errors, 106 existing warnings) and translation-freshness checks pass. actionlint and `git diff --check` are clean. A live run over 111 entries reports no broken or unknown entries, and humanlayer-skills is no longer `outdated`. A temporary geo-optimizer hold turned both of its findings into `held` with `actionable: false`; it is not committed. Refs #213. |
||
|
|
1b9e82d95d |
fix(office): 修复独立技能的 Python 依赖入口 (#229)
为 pptx 与 xlsx 提供标准库启动器,使用已准备的受管 XML 依赖,保留目标退出码并避免失败后重放编辑。 同步双语说明、目录版本和固定启动器合同测试。 Refs desirecore/desirecore#5335 |
||
|
|
f7f4fcd035 |
fix: 内置 Office 技能离线资源与中文校验 / offline Office schemas and XML validation (#218)
## 中文 内网环境显式使用 Office skill 校验含 `docProps/core.xml` 的文件时,Schema 仍引用远程 Dublin Core XSD;Windows 默认 GBK 读取中文 UTF-8 XML 也会报错。本修改让 docx/pptx/xlsx 独立携带完整本地 Schema 闭包,并按 XML 编码声明读取文件,保留完整校验。 - 三个 Office skill 分别随包加入 Dublin Core 三份 XSD,复用本地 xml.xsd,补齐来源、原始摘要、许可与适配说明。 - 修正两个 Microsoft XSD 的 ST_String 类型引用,以及 presentation-forge 编辑器脚本路径。 - 市场版本 1.5.11;docx 1.0.4、pptx 1.0.5、xlsx 1.0.4、presentation-forge 0.1.1,同步目录元数据。 - 新增定向回归:遍历所有内置技能的 XSD,拒绝远程依赖并离线编译;模拟 GBK 校验中文 XML,确认非法 Word 节点仍被拒绝。 验证:126 份 XSD 离线编译、2 项回归通过;i18n/catalog 校验均为 0 errors / 105 既有 warnings;translate --check 与 git diff --check 通过。README 两种语言同步。工作树、路径、Git 元数据与发布正文隐私检查通过。 Windows x64 dev 10.0.181 已通过产品 prepare-static 准备随包依赖,并真实调用 Skill(docx):创建、全校验、解包编辑、重新打包、再全校验均退出 0,两次校验各 18 valid / 0 skipped / 0 errors。该实验禁用 pip/npm 依赖索引,保留模型连接;不等同于正式包或全机断网验收。辅助 Grep 有一次旧参数错误,改正后成功;Python 缓存污染安装摘要另列真机测试跟踪。主仓 market.zip 尚未刷新,源 PR 合并后需通过 sync-market 纳入产品。 ## English Office validation in an intranet deployment still depended on remote Dublin Core schemas, and reading Chinese UTF-8 XML with the Windows GBK default could fail. Each Office skill now includes its local schema dependency closure, and validators read XML as bytes so its declared encoding is respected without weakening validation. This also fixes two Microsoft schema type references and the presentation-forge editor script path. Market version becomes 1.5.11; skill versions become docx 1.0.4, pptx 1.0.5, xlsx 1.0.4 and presentation-forge 0.1.1. Vendored schemas include attribution, licensing, original hashes and adaptation notes. Validation: 126 schemas compile offline; both targeted regression tests pass, including GBK input and invalid-node rejection. Catalog/i18n checks pass with 105 existing warnings each; translation freshness and whitespace checks pass. Bilingual README and publication privacy checks are complete. The actual Windows x64 dev session passed explicit docx loading, creation, full validation, editing, repacking and revalidation using product-prepared dependencies. Dependency indexes were disabled while model connectivity remained available. Packaged/cross-platform testing and the observed Python-cache installation-digest drift remain follow-ups. The product bootstrap ZIP will require sync-market after this source PR merges. 真机测试与剩余验收 / Hardware testing and remaining acceptance: https://github.com/desirecore/desirecore/issues/4819 --------- Co-authored-by: Johnson <yeslee1126@gmail.com> |
||
|
|
26a3a4a82a |
fix: 修复上游健康巡检并同步已审查的市场引用 (#207)
Upstream health checks could select a different branch ending in `main`, index internal skills or lowercase reference documents, treat a valid pinned path as broken after an upstream move, and close the tracking issue while unpinned or unknown entries remained. Resolve exact refs and tracked filenames, compare the installed snapshot, and drive issue decisions from structured results. Refresh 26 reviewed pointers, pin DingTalk and Matt Pocock collections, remove the deleted merge-conflict skill, and add the six new public children with reviewed translations. Synchronize sidecars, observed release facts, license evidence and external dependency disclosures. Identical-tree Agent pins and their versions remain unchanged. The per-entry review is recorded in `docs/upstream-health-189-remediation.md`. Validation: 99 unit tests pass; all nine pinned collections reproduce; catalog/i18n and translation-freshness checks pass; online health checks all 41 external entries with zero broken, actionable or unknown results. Existing catalog warnings decrease from 123 to 105 with no new warning groups. Python/workflow shell syntax and whitespace checks pass. Closes #189. |
||
|
|
0dcf2aed3b |
feat(market): 启用团队本地化说明与原始版本
## 中文 启用两支审查团队的中英文完整介绍与隐私说明,保留微信支付上游原始版本 `1.0`,市场版本更新为 `1.5.9`。 解决标书介绍与最新 main 的冲突,保留成员默认收纳说明和用户选择优先的行为。同步条目与 canonical 目录的本地化描述,补齐模型服务配置、可用性、处理授权、条款与费用责任,以及前提不满足时停止相关外部调用的规则。 标书团队 `0.2.3` 引用已合并的 [上游 #7](https://github.com/desirecore-agent/biao-shu-lian-he-shen-cha/pull/7),合同团队 `0.1.40` 引用已合并的 [上游 #51](https://github.com/desirecore-agent/contract-review-team/pull/51)。source、provenance 与 reviewedRef 对齐;成员版本、头像与 `requiredClientVersion: 10.0.178` 保持一致。 本地化字段和原始版本格式所依赖的 desirecore/desirecore#3183 已包含于正式 [v10.0.177](https://github.com/desirecore/desirecore/releases/tag/v10.0.177)。团队自身的 10.0.178 安装要求继续有效。Schema 保持闭集,并明确记录两个分支的本地扩展来源。 验证:84 个市场单元测试通过;完整目录与 i18n、翻译及生成合集新鲜度检查通过,0 错误、123 个既有告警。新增测试覆盖两种 Schema 分支的字段边界和未知属性拒绝。上游静态检查与 11 项收集器回归通过;18 次真实模型回合包含 15 个前提缺失的停止案例和 3 个全部前提确认的正向案例。模型回合验证请求意图和停止信号,未执行完整 Agent Service、市场安装、真实合同或 DOCX 验收。 此前审查意见已处理;Copilot 账户审查额度用尽,最终改动采用人工复核,并遵循仓库已有的检查门禁。 ## English Enable localized full descriptions and privacy disclosures for both review teams, preserve WeChat Pay's original release identifier `1.0`, and advance the Market to `1.5.9`. Resolve the tender-description conflict against current main while retaining nested member display and user preference precedence. Align entry and canonical localized descriptions, disclose model-service prerequisites and operator responsibilities, and stop affected external calls when prerequisites fail. Point Tender `0.2.3` and Contract `0.1.40` to the merged revisions from [upstream #7](https://github.com/desirecore-agent/biao-shu-lian-he-shen-cha/pull/7) and [upstream #51](https://github.com/desirecore-agent/contract-review-team/pull/51), keeping source, provenance and reviewed refs aligned. Preserve members, avatars and the separate `10.0.178` installation requirement. The catalog-format dependency shipped in stable v10.0.177; the closed schema documents its deliberate local i18n extension. Validation: 84 Market unit tests and full catalog/i18n, translation and collection freshness checks pass; zero errors and 123 existing warnings. Upstream static checks and 11 collector regressions pass. Eighteen live model turns include 15 blocked prerequisite cases and three positive controls with all prerequisites confirmed. These turns check request intent and stopping signals; full Agent Service integration, marketplace installation, real-contract acceptance and DOCX acceptance were not performed. Earlier review findings are addressed. Copilot's account quota is exhausted, so final changes received manual review under the repository's existing check policy. |
||
|
|
6cd60a7141 |
feat: 新增外部条目上游健康检查与每周巡检工作流 (#188)
## 背景 外部条目只存上游指针,上游仓库被删除、分支被重写或技能目录移动时,客户端安装会静默失败,目前没有任何机制能发现(例如 `dingtalk-cli` 的上游已 404,见修复 PR)。 ## 变更 - **`scripts/catalog/check_upstream_health.py`**:只读,逐个检查 `skills/`、`agents/`、`teams/` 下的 `entry.json`: - 失效(退出码 1):`gone` 上游不存在 · `bad-branch` 分支不存在 · `bad-ref` 固定提交无法获取 · `bad-path` `source.path`、根 `SKILL.md` 或 children 路径在分支最新提交下缺失 - 提示:`unreachable` 网络错误(不等于失效)· `new-skill` 集合有未声明子技能(发现规则直接复用 `gen-collection-children.py` 的 `discover_children`,两者结论一致)· `outdated` 固定 ref 落后于分支 · `unpinned` 未锁定 ref - 只稀疏检出 `SKILL.md`,39 个条目本地全量运行约 12 秒 - **`scripts/catalog/test_check_upstream_health.py`**:9 个基于本地 Git 仓库的单测,已加入 `i18n-validate.yml`。 - **`.github/workflows/upstream-health.yml`**:每周一 01:23 UTC 运行(可手动触发),仅在 `desirecore/market` 运行: - 报告写入 Job Summary,并维护唯一一个带 `upstream-health` 标签的 Issue:有待处理项时创建或更新,全部正常时评论并关闭 - 有失效条目时任务标红 - 权限仅 `contents: read` + `issues: write`,**不改写任何目录文件**;修复与 `source.ref` 更新仍通过评审 PR(与固定 ref 的审查语义一致) - README 中英文补充用法。 ## 当前主干的检查结果 - 失效 1:`dingtalk-cli`(已有修复 PR) - 未声明子技能 3:`khazix-skills`、`marketingskills`、`mattpocock-skills` - 可更新 21 个,未锁定 1 个 - `amap-jsapi-skill`、`luckin-my-coffee` 在本地因代理显示 `unreachable`,需要 CI 环境确认 ## 验证 ``` uv run scripts/catalog/test_check_upstream_health.py # Ran 9 tests OK uv run scripts/catalog/check_upstream_health.py # 如上 uv run scripts/i18n/validate-i18n.py # 0 error(s) ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0191D9g1FhRQzEGTefUn6mTb Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Yige <a@wyr.me> |
||
|
|
8f7953948f |
fix: 补齐市场静态事实并保持旧客户端兼容 (#184)
## 中文 补齐已有 owner 与已锁定上游内容可证明的许可证、技能类型和收录版本。保留 Anthropic Source Available 和其他附加条件,不把所有内容统一标为 MIT,不提升 listing-only 的安装准入。 README 保留最新的双语结构及以 manifest 为准的数量口径,增加静态目录不存访问量、下载量、评分或 Stars 的边界。 发布兼容性:**本 PR 不包含**两支团队新增的本地化字段,也不包含微信支付 `latestVersion: 1.0`;旧客户端会拒绝这些新字段,另以待发布 PR 保留,等匹配客户端发布后再合并。 验证:47 项目录校验测试、19 项 i18n 测试、5 项合集生成测试通过;完整目录/i18n/翻译新鲜度检查通过,6 个固定来源合集的生成检查通过,2 个浮动来源按既有规则明确跳过。发现并修复了生成器在 Windows 使用反斜杠造成的误报:输出改为 POSIX 路径,比较规则不放宽、不重写合集数据。 ## English Fill only license, type and listed-release facts supported by existing owners or pinned upstream content. Preserve custom license restrictions and acquisition eligibility. Keep the current bilingual README and manifest-derived inventory; do not author usage analytics. This PR deliberately excludes localized team fields and the two-part WeChat Pay version that older clients reject. Those changes remain pending a compatible client release. Validation passes: 47 catalog-validator tests, 19 i18n tests, five collection-generator tests, complete catalog and translation checks, and generated inventory checks for six pinned collections. Two mutable sources remain explicitly skipped. Fix Windows-generated path separators without weakening comparison or changing declared children. |
||
|
|
607045e44e |
chore: 移除误提交的 Python 字节码并新增 .gitignore / drop committed bytecode, add .gitignore (#122)
## 问题 / Problem `scripts/catalog/__pycache__/validate_catalog_metadata.cpython-314.pyc`(60KB)在 #118 被误提交进仓库。 它是跑仓库校验脚本时的就地产物,**会随 `defaults/market.zip` 分发给每一个客户端**,而且只对生成它的那个 Python 版本(3.14)有效——换个版本就是纯粹的死重量。 本仓库此前**没有 `.gitignore`**,所以这类产物每次都得靠人眼发现。 A Python bytecode artifact was accidentally committed in #118. It ships to every client inside `defaults/market.zip` and is only valid for the exact Python version that produced it. The repository had no `.gitignore` at all, so nothing prevented it. ## 改动 / Changes - 删除该 `.pyc` - 新增 `.gitignore`:`__pycache__/`、`*.py[cod]`、`.DS_Store` ## 与主仓库那道闸门的关系 / Relation to the upstream guard desirecore/desirecore#2602 已让 `sync-market` 在同步目录不干净时拒绝打包——今天正是它拦下了我本机跑校验产生的 `cpython-310.pyc`: ``` Error: [sync-market] 同步目录存在未提交内容,拒绝打包: ?? scripts/catalog/__pycache__/validate_catalog_metadata.cpython-310.pyc ``` 但那道断言只看**未提交内容**,拦不住已经进了仓库的 `cpython-314.pyc`。两处配合才完整:`.gitignore` 防止它被提交,洁净断言防止未提交残留被打包。 ## 验证 / Verification - `validate_catalog_metadata.py --require-complete`:0 error,75 sidecars - `validate-i18n.py`:0 error - 新增 `.gitignore` 后重跑校验,新产生的字节码不再出现在 `git status` 中 Co-authored-by: yi-ge <jackyoncode@gmail.com> |
||
|
|
6c303ef21f |
feat(invoice-organizer): 声明为可安装并 pin 到已合并 commit / make Invoice Organizer installable (#118)
接 #117。那个 PR 只登记了条目本身(`availability: listing-only`),用户在市场里**看得到、装不了**。 本 PR 补齐可安装所需的证据链。 Follow-up to #117, which only listed the entry (`listing-only`) — visible in the marketplace but not installable. This PR supplies the evidence chain required for installation. ## 改动 / Changes - `agent.json` 新增 `contentSource`,pin 到 #117 的合并 commit `42a29e9` - sidecar 的 `provenance.content` 与之**归一化后逐字一致** (两侧字段名按各自 schema 写:agent.json 侧是 `repoUrl`(`marketPointerSchema` 的必填字段名), sidecar 侧是 `url`;`normalizeContentSource` 里 `input.url ?? input.repoUrl` 把两者统一成 `url`, 比对发生在归一化之后,取的是 `{kind, url, path, ref, sha256}` 五元组) - `governance.compliance.reviewedRef` 绑定同一 commit;`reviewedAt` 与 `timestamps.reviewedAt` 取同一天 - `governance.availability` 翻成 `installable` - **移除** sidecar 的 `stewardship: "official"` 与 `branding.relationship: "official"` ## 为什么移除 `stewardship: official`(这一条值得单独看) `normalize/sidecar.ts` 只允许 `bundled-builtin` / `system-agent` / `official-pointer` 三种受信来源自称 official。**inline agent 不在其中**,命中即 `catalog.sidecar-forbidden-provider-claim` —— **整份 sidecar 被丢弃**, 静默回落到 `agent.json` 派生的 legacy 默认值。 在 dev 实例上实测确认(同步到 `42a29e9` 之后): ``` 客户端拿到的 governance: {"availability":"listing-only","license":{"state":"unknown"}, "redistribution":"verify-package-terms","listingMaintainer":{...}} sidecar 里写的却是: license: {state:"known", value:"MIT", evidencePath:"LICENSE"}, redistribution: "allowed" catalogDiagnostics: null ``` 也就是说:sidecar 被整份丢弃,而**维护者没有任何反馈**。 `dingtalk-workspace` 也有同样的 `stewardship: "official"`,它的 sidecar **同样一直在被静默丢弃** (实测它的客户端 governance 与本条目改之前完全一样)。这条不在本 PR 范围内, 建议单独处理;DesireCore 主仓库那边我另外记了一条「sidecar 被拒的诊断没有透出到任何 API」的缺口。 ## 验证 / Verification 直接调用客户端的真实代码路径(不是照着文档推断): ``` hydrateCatalogSidecar success=true diagnostics=[] compareMarketCatalogConsistency consistent=true mismatches=[] evaluateCatalogAcquisitionEligibility allowed=true reasons=[] legacy provenance.content: {"kind":"git","url":"https://github.com/desirecore/market.git", "path":"agents/invoice-organizer","ref":"42a29e99a0…"} sidecar provenance.content: {同上,逐字一致} ``` `compareMarketCatalogConsistency` 对 inline agent 会**逐字比对** `provenance.content`; 不一致会让整份 sidecar 静默降级回 listing-only,而 Python 校验器对 inline 条目 直接跳过这项比对(`_validate_content_consistency` 对 inline 早退),抓不到。 所以这一项只能靠上面这条客户端侧的验证兜住。 ## 校验 / Validation ``` validate_catalog_metadata.py --require-complete 0 error, 129 warning, agents=4, sidecars=74 validate-i18n.py 0 error, 129 warning translate.py --check ok gen-collection-children.py --check ok ``` 129 条 warning 全部来自 `skills/*` 的存量条目,`invoice-organizer` **零命中**。 |
||
|
|
8265c8f4a9 |
feat(workforce-optimization): governed nonexpert clarification and evidence (#106)
## 摘要 / Summary 补问、原话解释与真人确认分离;增加版本能力预检、sourceField/evidenceLinks、有限语义用例及正确工件依赖顺序。 Separate answers, interpretation and human confirmation; add capability discovery, explicit source/evidence bindings, finite semantic checks and artifact ordering. 发现描述覆盖“仅澄清”入口;有歧义的原话保持缺口,不把“不确定”塞入精确枚举或规范化值。按当前对话语言加载框架与固定事实门尾注。 当前请求中已唯一确定的值会写成类型化、待真人确认的 `node.value`;只有未知或仍有歧义的事实才保持 `needs_input`。 Discovery covers clarify-only requests. Ambiguous raw answers remain unresolved, rather than becoming exact placeholder values. The framework and fixed fact-gate footer follow the current conversation language. Exact values uniquely supplied by the current request become typed, human-reviewable `node.value` proposals; only genuinely unknown or ambiguous facts remain `needs_input`. 应用/服务重启或重试 fork 后,入口必须在当前父轮重新加载 Skill,并在委派前用 ToolCatalog 核实阶段工具;子 Agent 不得突破未激活父级的能力上限。 After an app/service restart or retry fork, the entry Agent reloads the Skill in the current parent turn and verifies stage tools before delegation; a child never expands an unactivated parent ceiling. 新的 decision-grade `OptimizationSpec` 强制使用 v2,并完整声明 `semantic_contract` 中的 solve intent 及所有 objective/variable/constraint/data reference 的单位/维度;legacy v1 仅只读兼容。 New decision-grade `OptimizationSpec` artifacts use v2 and a complete semantic contract for solve intent plus every material objective, variable, constraint and data reference; legacy v1 remains read-only compatibility. ## 验证 / Validation - Scoped Skill/i18n/catalog check passes with zero errors. Existing repository warnings remain. - Publication safety check passed, including hidden working-tree files, new paths, branch/commit metadata and collaboration text. - 双语说明与 source hash 已同步,版本更新为 2.7.0;缺少新平台契约时保持普通澄清,不模拟缺失门禁。 - Bilingual bodies and source hashes are synchronized at version 2.7.0. Older clients stay in plain-text clarification when capability discovery fails. ## 状态 / Status Runtime acceptance is still in progress; draft only. No customer data, credentials, solver software or deployment settings are included. 真机验收仍在进行,本 PR 暂为草稿。保留外部求解器许可证、部署和费用披露;本变更不包含求解器、客户数据或凭据。 --------- Co-authored-by: yige <yige@yigedeMacBook-Neo.local> |
||
|
|
e77c658958 |
feat: 市场支持团队条目类型并上架合同审查团队 (#110)
## 变更 / What
市场此前只有 `agents` 与 `skills` 两类条目。本 PR 加入**团队(teams)**条目类型,并上架第一条真实团队
listing。
The market supported only `agents` and `skills`. This PR adds a
**teams** entry type and lists the first real team.
## 一、支持团队条目类型
「支持一种新条目类型」实际涉及 4 组共 11 个文件,比表面看到的多:
**客户端契约快照**
- 新增 `schemas/market-team-entry.client.schema.json`,用 esbuild 打包客户端
`packages/schemas/src/market.ts` 后导出生成。用同样方法重新生成
`market-agent-entry.client.schema.json` 验证过管线——字节完全一致(含属性顺序),确认不是手工誊抄。
**Sidecar schema**
- `identity.kind` 枚举加 `team`;新增 `$defs.teamSpec`;接入 `spec.oneOf` 与
kind→spec 派发
**校验器(工作量主要在这里)**
- `scripts/catalog/validate_catalog_metadata.py`:`load_legacy`
原先硬编码只认两个根目录。抽出 `CATALOG_ROOTS` 常量同时驱动允许的父目录集合与错误文案;按 kind 分派客户端 schema
校验;`teams` 进 stats 与 `--require-complete` 覆盖统计;把**严格 provenance
比对**与「可安装 pointer 必须自带不可变 ref」两道门禁扩展到团队
- `scripts/i18n/validate-i18n.py`:**它独立重算计数并逐个校验 `entry.json`**,不接团队会漏校
- `.github/workflows/i18n-validate.yml`:变更检测的 grep 不含 `teams/`——**一个只改
teams 的 PR 会报「无 i18n 相关变更,跳过校验」然后零校验通过**
- 测试:`test_validate_catalog_metadata.py` 29→47,`test_validate_i18n.py`
9→17
**顺带修正一条本就不对的规则**:`icon` 此前被要求「每个 entry.json 都必须有非空内联 SVG」,但运行时 schema 里
`marketAgentSchema` 与 `marketTeamSchema` **都没有 `icon` 字段**(只有 skill
有)。也就是说这条规则对 Agent pointer 同样在强加死重量,只因本仓库暂无 agent pointer 条目而未暴露。改为
`ICON_RENDERED_KINDS = {"skill"}`,agent/team 声明 icon
时给**警告**而非错误,文案说明「下一个维护者会以为改它能改变卡片」。
## 二、上架合同审查团队
`teams/contract-review-team/`(`entry.json` + sidecar)。
**团队条目是 fork 指针卡,不分发正文**:市场只存展示元数据 + git-only `source`,真实定义(`team.json`
/ `members.json` / `shared/`)在 `source.repoUrl` 指向的仓库里。安装即
`forkTeam`,更新即 `git pull`——组合固定,因此**没有** `installPolicy` /
`updatePolicy`。
| 字段 | 值 | 依据 |
|---|---|---|
| `source.ref` | `73cd87a9901cc548871927e9d5dbec8e4cc6c2b1` | v0.1.1
的**完整 SHA**。tag 不是可复现 pin,validator 有测试专门拒绝 |
| `latestVersion` | `0.1.1` | 上游真实 tag,与 `release.version` 交叉校验 |
| `license` | `MIT` | 上游仓库真有 LICENSE,已在 pinned ref 的快照中复验 |
| `redistribution` | `source-pointer-only` |
市场从不打包团队正文,只给指针——这是交付形态,与许可证宽松与否无关 |
| `requiredClientVersion` | `10.0.137` | 六个成员都声明了 `FileDigest`
内置工具,它随该版本发布 |
| `memberCount` / `memberNames` | 6 / 5 名 | schema 规定前者**含**组长、后者**不含**
|
| `availability` | `listing-only` | 见下 |
**`availability` 为什么不是 `installable`**:四项证据满足两项(不可变 pin ✓、已知 license
✓),缺的 `reviewedAt` 与 `governance.compliance`
本质是**一次尚未发生的治理审查**——需要具名方在具体日期针对这个确切 ref 审过许可合规、第三方内容与商标使用。没发生的事不能写进目录。
补充一个事实:本仓库**零个 sidecar 有 `compliance` 块,29 个 pointer 条目全是
listing-only**,`installable` 路径从未在任何真实条目上走过。这不阻止安装——fork 由 `source` 驱动。
**`license.evidencePath` 的基准此前是未定义的**:schema 只说
`safeRelativePath`,没规定相对谁。仓库里仅有的两个先例(`guizang-ppt`、`presentation-forge`)都是
vendored 技能,LICENSE 物理上在条目目录里。按那个读法,pointer 条目写 `evidencePath`
断言的是市场目录下有该文件——对 pointer 永远不成立。新增 `license-evidence` 规则按条目形态分派:vendored
要求文件存在(error),pointer 要求条目已 pin(warning),两种读法写进 README。
## 校验 / Validation
```
test_validate_catalog_metadata.py 47 tests OK
test_validate_i18n.py 17 tests OK
test_collection_generator.py exit 0
validate_catalog_metadata.py --require-complete
0 error, 116 warning (agents=1, teams=1, publishableSkills=62, sidecars=64)
validate-i18n.py / --online 0 error, 116 warning
translate.py --check exit 0
gen-collection-children.py --check exit 0
```
116 warnings 即加入团队之前的基线——**本条 listing 贡献 0 个警告**。
真实条目上的反向控制(跑在 rsync 副本上,仓库保持干净):
```
source.kind=zip → team-entry-schema (error)
install/updatePolicy 出现 → team-entry-schema (error)
requiredClientVersion 漂移 → legacy-consistency (error)
memberCount 漂移 → legacy-consistency (error)
provenance ref 漂移 → legacy-consistency (error)
可安装但无不可变 ref → installable-evidence (error)
evidencePath 在未 pin 的 pointer → license-evidence (warning)
```
另用**客户端真实校验器**(`parseMarketTeamEntry`,不是快照)验证条目通过,且多写一个字段会被拒。
## 公开信息边界 / Public information boundary
全树扫描无新增命中。团队内容使用「某某科技(北京)有限公司」这类标准中文占位。
---------
Co-authored-by: yi-ge <mizan57533@gmail.com>
|
||
|
|
d76db984b6 |
fix: 对齐 Agent 指针目录与客户端校验契约 (#103)
## 问题 / Problem 市场 CI 要求每个 Agent 条目都有 catalog sidecar,但 sidecar 校验器只接受相邻的 agent.json。客户端已支持的 Agent entry.json 指针因此无法满足完整覆盖门禁。 The catalog completeness gate requires sidecars for every Agent, while the validator previously read only agent.json. Valid Agent pointer entries could not satisfy CI. ## 修改 / Changes - Agent 主文件严格二选一:内联 agent.json 或指针 entry.json;目录 slug 与安装源 UUID 保持分离。 - 使用从主仓固定提交导出的完整客户端 Agent entry Schema,先校验原始类型、字段、版本、路径和策略组合,再比较 sidecar。 - 对齐 latestVersion、固定来源、许可/治理、兼容性和有效的缺省 market/market 策略,拒绝 sidecar 单方面提升托管权限。 - 未修改产品条目、manifest、现有 sidecar Schema 或 CI 完整性要求。 Agent pointers now pass the pinned client input schema before source metadata consistency checks. Effective default policies are compared without promoting catalog metadata into authority. Existing inline Agents and Skills retain their validation paths; no entries or CI requirements change. ## 验证 / Validation - 29 + 4 + 9 项定向 Python 测试通过。 - 完整 i18n、catalog --require-complete、translation freshness 检查通过;116 条既有警告与基线一致,无新增。 - 原始客户端 Schema 与固定主仓来源逐项比较一致(仅增加溯源注释)。 - 独立代码审查发现的原始契约与缺省策略问题已修复并复核。 - 公开信息边界检查覆盖完整工作树、隐藏文件、链接目标与新增 Git 元数据,通过。 Targeted tests, full catalog/i18n/freshness validation, source-schema comparison and independent review passed. Existing warnings are unchanged. This PR repairs catalog validation; it does not claim runtime installation of a new product. --------- Co-authored-by: yige <yige@yigedeMacBook-Neo.local> |
||
|
|
a205ef20f0 |
feat: 迁移统一目录元数据契约 (#102)
## 中文 - 为 System Agent、34 个 Builtin Skill、28 个 Pointer/Collection 条目增加 catalog sidecar - 覆盖 147 个 collection child,并固定可证明的来源;无法证明的内容保持 listing-only/unknown - 增加 strict Schema、validator、collection check 与 CI 完整性门禁 ## English - Add catalog metadata sidecars for the System Agent, 34 built-in Skills, and 28 pointer/collection entries - Cover 147 collection children while keeping unverifiable facts listing-only or unknown - Add strict schemas, validators, deterministic collection checks, and CI completeness gates ## 验证 / Verification - Catalog validator 17/17 - Collection generator 4/4 - 63 sidecars, 147 children, zero errors |
||
|
|
4bc2d41b12 |
test(market): publish temporary QA agent (#88)
Temporary QA-only Agent pointer for validating the real publish, install, and delist lifecycle.\n\n- Source repo is public and MIT licensed\n- Pointer is pinned to immutable commit dd4abbe342f25d0569dba152ce1be3fb867c3474\n- No user data, credentials, or third-party content\n- A follow-up PR will remove this entry after installation verification |
||
|
|
27589d013d |
fix(skills): 修复 14 个 pointer 条目安装失败 + 7 个合集声明 children (#81)
## 背景 / Background 市场里 25 个 pointer 条目中有 **14 个点安装必然失败**,客户端返回 502「源仓库中未找到 SKILL.md(pointer 指向有误)」。 根因是 `entry.json` 的 `source` 指错:客户端按 `source.path` 定位内容(缺省则取仓库根),而这些条目的 `path` 缺失或 URL 指向了 HTML 页面,`contentDir/SKILL.md` 自然不存在。 Of the 25 pointer entries, **14 always failed to install** with a 502. The `source` pointers were wrong: `path` was missing (so the client looked at the repo root) or `repoUrl` pointed at an HTML page instead of the content. ## 改动 / Changes ### 1. 补 `source.path`(5 个) | 条目 | path | 上游 SKILL.md 实际位置 | |---|---|---| | `impeccable` | `plugin/skills/impeccable` | 根目录没有;`plugin/` 与 `.claude/` 两份内容逐字节一致,取中立的分发目录 | | `ai-news-radar` | `skills/ai-news-radar` | 仓库另有 `skills/radar`,取与条目 id 对应的 | | `taste-skill` | `skills/taste-skill` | 同名子目录 | | `wechatpay-skills` | `wechatpay-payment-integration` | 仓库另有 `wechatpay-product-coupon` 未覆盖,见下方遗留项 | | `luckin-my-coffee` | `my-coffee` | zip 内有一层顶层目录 | ### 2. 修正 web 类条目的源地址(2 个) `amap-jsapi-skill` / `dingtalk-api` 原先指向 ClawHub 的**网页**(`content-type: text/html`),客户端只在 markdown 时才写成 `SKILL.md`,HTML 会落成 `index.html`,校验必失败。 - `amap-jsapi-skill` → 改用 ClawHub 文件 API(返回 `text/markdown`)。该技能在 ClawHub 的发布包 `version.files` 只有一个 `SKILL.md`,单文件抓取正是对的形态。 - `dingtalk-api` → ClawHub 包有 38 个文件(`scripts/*.ts` 等),单文件抓不全,改指内容完整的 GitHub 上游 `ogenes/dingtalk-api` 并锁 ref。 ### 3. 合集条目声明 `children`(7 个,147 个子技能) 这 7 个的上游是「一个仓库装着 N 个平级技能」,没有单一 SKILL.md 可指,靠改 `path` 修不了。配合客户端新增的合集能力(desirecore 主仓库 PR),`entry.json` 现在可声明子技能清单,市场仍是一个条目,安装时由用户勾选装哪几个。 | 条目 | 子技能数 | |---|---| | `marketingskills` | 49 | | `mattpocock-skills` | 35 | | `larksuite-cli` | 27 | | `baoyu-skills` | 21 | | `wecom-cli` | 7 | | `khazix-skills` | 5 | | `netease-skills` | 3 | 新增 `scripts/gen-collection-children.py`:按 `entry.json` 锁定的 ref 克隆上游、扫描子技能、读 frontmatter 生成 `children`。约定「仓库有顶层 `skills/` 就只扫它」——否则会收录 `larksuite/cli` 的 linter 测试夹具 `internal/qualitygate/skillscan/testdata/skills/lark-demo`。 ### 4. `netease-skills` 分支修正 `repoBranch` 写的是 `main`,上游默认分支是 `master`,此前 clone 必然失败(`Could not find main`)。 ### 5. 版本号 `manifest.json` `1.2.24` → `1.2.25`。 ## 验证 / Verification - `uv run scripts/i18n/validate-i18n.py` — OK - `uv run scripts/i18n/validate-i18n.py --online` — OK - **真实运行的 agent-service 上逐个安装**(独立 home + standalone 服务,非模拟):18 个非合集 pointer 条目 **18/18 成功**并完整落盘;7 个合集条目 **7/7 成功**,并验证了部分安装、追加、取消勾选卸载、装到 Agent 私有目录。 ## 遗留项 / Known gaps - `wechatpay-skills` 只覆盖了 `wechatpay-payment-integration`,同仓库的 `wechatpay-product-coupon` 未上架。条目名是复数,后续可拆成两条或改成合集。 - `children[].i18n` 目前只有 `shortDesc`(取自上游 description),**没有中文名**——子技能名沿用上游 id(如 `lark-approval`),以保证与上游文档、Agent 加载路径一致。宝玉 / Matt Pocock / Marketing 三个合集的描述本身就是英文。如需中文化,可接 `i18n-translate.yml` 覆盖 `children` 字段。 - 在线校验目前只查 URL 可达性,**查不出 `path` 指向的目录里有没有 SKILL.md**——这 14 个坏条目当初就是这么一路绿灯合进主干的。建议后续给 `--online` 加这条断言。 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: xieyuanxiang <xieyuanxiang123@gmail.com> |
||
|
|
20b29df7a4 |
feat: 发布通用人效与资源优化能力
增加跨行业的人效与资源优化需求澄清、模型求解与独立验收能力,并固化公共市场的信息边界与发布前检查。 |
||
|
|
f8d6ddeaf3 |
feat(market): 为外部技能补充图标 (#50)
## Summary / 摘要 Add inline SVG icons to all 20 external pointer skills, so their cards no longer fall back to an empty icon. The market catalog version is bumped from `1.2.8` to `1.2.9`. 为全部 20 个外部 pointer skill 补齐内联 SVG 图标,市场卡片不再显示为空;市场版本由 `1.2.8` 升至 `1.2.9`。 ## Compatibility / 兼容性 Depends on desirecore/desirecore#1177, which permits the `icon` field in strict pointer-entry validation and forwards it through the offline list/detail responses. That PR must merge first. ## Skill → icon screenshot / Skill 与图标截图 The preview labels every card with its display name and id.  Covered skills: `agent-reach`, `ai-news-radar`, `amap-jsapi-skill`, `dingtalk-api`, `flyai-skill`, `follow-builders`, `ian-xiaohei-illustrations`, `karpathy-guidelines`, `khazix-skills`, `larksuite-cli`, `last30days`, `luckin-my-coffee`, `mattpocock-skills`, `minimax-image-gen`, `minimax-tts`, `mt-paotui-for-client`, `netease-skills`, `taste-skill`, `wechatpay-skills`, and `wecom-cli`. ## Validation / 验证 - `uv run scripts/i18n/validate-i18n.py` - `uv run scripts/i18n/translate.py --check` - Parsed all 20 `entry.json` icons as SVG XML - `git diff --check` - Rendered the committed preview asset locally |
||
|
|
0b9aa38699 |
fix(skills): 禁止自动注入完整技能内容 (#49)
## Summary - 将 dashscope-image-gen、image-to-image、markdown、tech-diagram、xiaomi-tts 改为仅按需加载,并递增 patch 版本 - 在 Market validator 与 JSON Schema 中禁止 `disable-model-invocation: false` - 将回归测试接入 `i18n Validate`,同步中英文技能编写规范 ## Root cause and impact 这 5 个技能在首次引入时即声明 `disable-model-invocation: false`,导致完整技能正文进入普通请求的 system prompt。修改后市场技能只能声明 `true` 或省略该字段,完整内容仅在显式调用 Skill 工具后加载。 ## Validation - `uv run --quiet scripts/i18n/test_validate_i18n.py` - `uv run --quiet scripts/i18n/validate-i18n.py` - `uv run --quiet scripts/i18n/translate.py --check` - `python3 -m json.tool scripts/i18n/schema/skill-frontmatter.schema.json` - `actionlint .github/workflows/i18n-validate.yml` - `git diff --check` |
||
|
|
1b002e5778 |
强化市场校验与索引元数据
合并市场索引、分类、i18n 校验、skill-creator 工具和已修改 skill 版本号更新。 |
||
|
|
6fa7af4c62 |
feat(i18n): OpenAI 兼容翻译后端 + fork PR 自动翻译回推 (#39)
## 目标
1. 翻译后端支持**任意 OpenAI 兼容接口**(自定义 URL +
Token):OpenAI、DeepSeek、Qwen、one-api/new-api 网关、vLLM 等
2. **fork PR 也能自动翻译并回推**——不再要求外部贡献者自己跑翻译脚本
## translate.py
- 新增 `TRANSLATE_BACKEND=openai` 后端:`TRANSLATE_ENDPOINT`(或
`OPENAI_BASE_URL`,以 /v1 结尾)+ `TRANSLATE_API_KEY`(或 `OPENAI_API_KEY`)
- gpt-5/o 系模型名自动用 `max_completion_tokens` 且不传 temperature;其余模型走经典
`max_tokens` + `temperature=0.1` 契约
- 已用本地 mock 服务器端到端验证两种契约、env 与 CLI 两种配置方式、产物 frontmatter(`translated_by:
ai:openai:<model>`)
## workflow 安全模型(评审重点)
触发器从 `pull_request` 改为 `pull_request_target`(fork PR 获得 secrets 与写 token
的唯一途径),配套的防护:
- **绝不执行 PR 代码**:workflow 与 `scripts/i18n/*` 一律来自 base 分支;PR 内容通过
`refs/pull/N/merge` 以**纯数据**方式覆盖(仅
`skills/`、`manifest.json`、`categories.json`)
- 覆盖后 `find skills -type l -delete` 丢弃符号链接(防经软链读 runner 文件系统并借"翻译"外泄)
- PR 派生值(head repo/ref)一律经 `env:` 注入,不在 `run:` 内 `${{ }}` 插值(防命令注入)
- 回推:在 PR head 的独立 worktree 上**只应用翻译产物文件**后用 bot token 推送;head SHA
变更则放弃(让新 run 接手);bot actor 触发的 run 直接跳过(防循环)
## 使用自定义端点需要配置
| 类型 | 名称 | 值 |
|---|---|---|
| secret | `TRANSLATE_API_KEY` | 你的 token |
| secret 或 variable | `TRANSLATE_ENDPOINT` | 如
`https://your-gateway.example.com/v1` |
| variable | `TRANSLATE_BACKEND` | `openai` |
| variable | `TRANSLATE_MODEL` | 端点上的模型 id |
注:推送到 fork 分支要求 `DESIRECORE_BOT_TOKEN` 是具有本仓库 push 权限的**用户
PAT**(GITHUB_TOKEN 与 App token 推不了 fork),且 PR 勾选 Allow edits by
maintainers;推不了时会以清晰错误失败并打标签。
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
|
||
|
|
e9e75c0f1d |
feat: add guizang-ppt market skill (vendored from op7418, AGPL-3.0) (#20)
## 概述 / Summary 新增市场技能 **`guizang-ppt`**(归藏网页 PPT),vendored 自上游开源项目 [op7418/guizang-ppt-skill](https://github.com/op7418/guizang-ppt-skill)。 Add a new **market skill** `guizang-ppt` — generates single-file HTML horizontal-swipe slide decks (web PPT) in two visual systems (editorial "magazine × e-ink" / "Swiss International"). Vendored from the upstream open-source project. ## 变更内容 / Changes - `skills/guizang-ppt/`:SKILL.md(DesireCore frontmatter 覆盖层 + 上游正文)、`references/`(10)、`assets/`(2 模板 + motion.min.js + 9 张 webp)、`scripts/validate-swiss-deck.mjs`、`LICENSE`(AGPL-3.0)、`NOTICE.md`(署名与合规) - `skills/guizang-ppt/_desirecore/`:DesireCore 维护态(不随上游覆盖) - `frontmatter.yaml`:市场 frontmatter 覆盖层(i18n: zh-CN 源 + en-US 显示串,body 暂回退中文,留给 CI 翻译) - `upstream.json`:上游溯源(commit `014c572`、AGPL-3.0、作者 歸藏/op7418) - `scripts/vendor/guizang-ppt.mjs`:可复用的 vendor 更新脚本(`--src <本地路径>` 或 `--ref <tag>`) - `manifest.json`:`version` → `1.2.3`,`stats.totalSkills` → 25 ## 定位 / Positioning - **仅市场可选安装**:未加入 `builtin-skills.json`,不随客户端开机自动安装;用户在市场按需安装。 - 分类 `creative`;与已有 `pptx`(生成 .pptx 文件)区分:本技能生成 **HTML deck**。 ## 许可与署名 / License & Attribution 上游为 **AGPL-3.0**。本技能保留原 `LICENSE` 与作者署名(`NOTICE.md` + `metadata.author` + `market.maintainer`),作为聚合内容分发。 ## 校验 / Validation - `python3 scripts/i18n/validate-i18n.py skills/guizang-ppt` → `OK: no i18n issues found.` ## 手动更新流程 / Manual update 上游发版时:`node scripts/vendor/guizang-ppt.mjs --ref <tag>` → 核对 diff → 必要时 bump `_desirecore/frontmatter.yaml#version` 与 `manifest.json` → 提交。 --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
d189be877c |
fix(i18n): GPT-5 / o-series 不支持自定义 temperature (#11)
## 接 PR #8 的进一步根因 本地用 personal PAT 端到端验证时发现:付费 quota 已生效、`gpt-5-mini` 可访问、`max_completion_tokens` 修复正确,但 translate.py 仍 400: ``` "message": "Unsupported value: 'temperature' does not support 0.1 with this model. Only the default (1) value is supported." "param": "temperature" "code": "unsupported_value" ``` GPT-5 系列和 o-series(o1 / o3 / o4)作为 reasoning models 强制 `temperature=1`,不允许自定义。 ## 改动 `call_github_models` 基于 model id 条件设置 `temperature`: - `gpt-5*` / `*o1*` / `*o3*` / `*o4*` → 不发该字段(用默认 1) - 其他 model(gpt-4 系列、Anthropic Claude)→ 保持 `temperature=0.1`(翻译任务偏好 deterministic) ## 验证 本地实际跑通:`GITHUB_TOKEN=$(gh auth token) uv run --quiet scripts/i18n/translate.py skills/markdown` ``` skills/markdown → en-US: - calling github/openai/gpt-5-mini for en-US translation ... - wrote root SKILL.md with translated body (3838 chars) ``` gpt-5-mini 返回 HTTP 200,3838 字符英文 body 正确写入,Markdown 结构保留。 |
||
|
|
f190a84881 |
fix(i18n): GPT-5 用 max_completion_tokens 解锁付费 quota 真实翻译能力 (#8)
## 根因 我以为 PR #4 的 translate 失败是 `gpt-5-mini` 在免费 tier 不可用 / payload too large / quota 用尽。**实际不是**——付费 quota 已生效,gpt-5-mini 可访问。真正原因是 **OpenAI Chat Completions 2024+ 契约变化**: - GPT-5 系列要求 `max_completion_tokens` - 旧的 `max_tokens` 会被拒绝:`HTTP 400 {"error":{"code":"unsupported_parameter","param":"max_tokens"}}` - translate.py 之前对 400 也 retry 3 次,连续 retry 撞 RPM 触发 429,把“参数错误”错误诊断为“quota 用尽” 通过本地 curl 直接调 API 确认:gpt-5-mini + max_completion_tokens 返回 HTTP 200。 ## 改动 - `call_github_models`: `max_tokens` → `max_completion_tokens`(GPT-4 也接受新参数名,向前兼容) - `_post_with_retries`: 400 直接 raise 并打印 response body(payload 不会变,retry 浪费 quota);429/5xx retry 前先打印 body 让 budget / rate-limit 详情可见 ## 验证 - 本地 curl 用 gpt-5-mini + max_completion_tokens:HTTP 200 通过 - CI 上本 PR 不触及 skill,translate workflow 走 skip 分支(验证 detect-changes 不破坏现有逻辑) - 合并后再开一个 verify PR 实际触发翻译验证端到端 |
||
|
|
229bc8157f |
fix: 补全 dashscope-image-gen 和 xiaomi-tts 的 i18n CI 校验 (#4)
## 变更说明 修复 dashscope-image-gen 和 xiaomi-tts 的 i18n CI 校验、补全英文翻译,并连带修复其他 stale skill 的 source_hash 漂移问题。 ### dashscope-image-gen / xiaomi-tts(PR 主线) - `name` 字段从中文改为目录名(CI rule-1 要求 lowercase ASCII + hyphens)。 - 补全 `metadata.i18n` 块:`locales`、`zh-CN` (含 body 指向 SKILL.zh-CN.md)、`en-US`(含 description / body=./SKILL.md)。 - 新增 `SKILL.zh-CN.md`(zh-CN body 文件)。 - **root SKILL.md 改写为英文 body**(与 SKILL.zh-CN.md 内容对应),由本 PR 手工翻译;`default_locale=en-US`、`source_locale=zh-CN`,与 docs/I18N.md 约定一致:root SKILL.md = default_locale body (en-US)、SKILL.zh-CN.md = source_locale body (zh-CN)。 - 两 locale 锁为 `translated_by: human` + 正确 `source_hash`。 - 内容质量修复:流程标题 "严格按此两步执行" 改为 "严格按此三步执行";强制规则 2 措辞精确化(/tmp 仅作中转);xiaomi-tts 用户意图映射表中 `response_format` 改为 `audio.format` 与请求体参数表一致;zh-CN.description 改为纯中文。 - locale header 由 shell 转义残留 `<\!--` 修正为标准 `<!-- locale: zh-CN -->`。 ### 连带:6 个 main 上已 stale 的 skill(避免 translate workflow 失败) - `manage-skills` / `minimax-music-gen` / `minimax-video-gen` / `skill-creator` / `web-access`:`en-US.source_hash` 重新计算为当前 zh-CN source 实际 hash;`translated_by` 由 `ai:claude-opus-4-7` 改为 `human` 以锁定现有翻译不被自动重译覆盖。 - `markdown`:补正 `en-US.source_hash`(之前是占位 `sha256:0000000000000000`)。 - 这些 skill 的 `en-US` 翻译内容保持不变,仅修正元数据。 ### scripts/i18n/translate.py 容错增强 - 413 Payload Too Large 时不再 retry(payload 不会变小,retry 浪费时间)。 - 主循环 catch RuntimeError,把单个 skill 的失败写入 `plan["errors"]` 后继续处理下一个 skill,避免一个大文件 fail 整个 workflow。 - `--check` 模式下 plans 含 errors 也 exit 1(之前仅看 needs_translation,broad except 会把异常吃掉导致误报通过)。 ## Test plan - [x] `i18n-validate` 通过 - [x] `i18n-translate --check` 显示所有 skill `up-to-date` 或 `human-locked, skipping` - [x] CI 上 `validate` / `translate` / `wait-for-copilot-review` 全绿 - [ ] Copilot 评审 conversation 全部 resolve - [ ] Squash merge --------- Co-authored-by: yi-ge <a@wyr.me> |
||
|
|
8bdda4afb1 |
feat: skills i18n 改造(schemaVersion 1.1,零向后兼容) (#1)
* feat: skills i18n 改造 — schemaVersion 1.1,零向后兼容
把 21 个 skills + 1 个 agent + manifest/categories 全量迁移到 schemaVersion 1.1
的 i18n 结构,配套 CI AI 翻译流水线(GitHub Models)与本地工具链。
## 关键变更
### 数据结构(破坏性,schemaVersion 1.0 → 1.1)
- SKILL.md: 顶层 name 改为 ASCII slug(== 目录名,符合 agentskills.io 规范);
中文显示名/short_desc/description 全部迁入 metadata.i18n.<locale>
- agents/<id>/agent.json: shortDesc/fullDesc/tags/persona.{role,traits} 迁入
i18n.<locale>;changelog[].changes 改为 { <locale>: string[] } 对象
- categories.json: 每个分类的 label/description 迁入 i18n.<locale>,顶层只剩
color/icon
- manifest.json: 加 supportedLocales / defaultLocale;顶层 description 迁入
i18n.<locale>
### Body 文件结构
- 根 SKILL.md = frontmatter + default_locale (en-US) body
- SKILL.<locale>.md = 各 locale 的 markdown body(首行 <!-- locale: xx --> 自校验)
### 工具链(scripts/i18n/)
- glossary.json: zh→en 术语表 + do_not_translate 白名单
- schema/skill-frontmatter.schema.json: i18n frontmatter JSON Schema
- validate-i18n.py: 8 条校验规则(name 合规 / locale 完整性 / hash 一致性等)
- translate.py: GitHub Models / Anthropic 双 backend,sha256 增量翻译
- migrate.py: 一次性迁移脚本(旧格式 → i18n 结构)
### CI(.github/workflows/)
- i18n-validate.yml: PR 触发跑 validate + translate --check
- i18n-translate.yml: PR 触发用 GitHub Models(默认 openai/gpt-5-mini)翻译缺失
locale,自动追加 commit;可切到 ANTHROPIC_API_KEY 走 Claude
### 文档
- docs/I18N.md: 作者贡献指南(schema 说明 / 提交流程 / 常见问题)
- README.md: 加多语言段落
## 验证
- uv run scripts/i18n/validate-i18n.py: OK,49 文件 0 错误
- uv run scripts/i18n/translate.py --check: 0 stale locale
- 21 skills 标题数 zh-CN == en-US 严格对齐(最大 66=66)
- skills-ref 规范校验:全部通过(顶层 name ASCII slug + description 单字段)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(i18n): 修复 PR #1 review 反馈的 6 项问题
- schema: translated_by 正则放宽为 ^(human|ai:[A-Za-z0-9._:/-]+)$,接受
'ai:github:openai/gpt-5-mini' 这类 backend:model 形式(CI 翻译输出格式)
- README + docs/I18N.md: 修正"CI 用 Claude API"误导描述,正确说明默认是
GitHub Models(openai/gpt-5-mini)+ GITHUB_TOKEN,可选切到 Anthropic
- skills/minimax-tts/SKILL.md & SKILL.zh-CN.md: 删除多余的 ``` 闭合,避免
Markdown 后续渲染错乱
- skills/docx/SKILL.md: 翻译时丢失的 • Unicode escape 示例已恢复,
与 zh-CN 版本对齐
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|