mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-12-05 09:59:22 +08:00
2d96fc9c41ccedbd3c1a3e0358913eb489b799ab
19
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9054c3a2d1 |
将 Market 健康报告改为每天北京时间 09:20 (#375)
## 修改 仅将 `.github/workflows/upstream-health.yml` 的 cron 从 `23 1 * * *` 改为 `20 1 * * *`(UTC 01:20,北京时间每天 09:20),同步更新同行注释。 不改手动触发、审计步骤、权限、并发或 #213 发布逻辑。合并到默认分支后生效。GitHub Actions 的计划任务可能晚于设定时间开始。 |
||
|
|
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 的五条既有告警,不修改任何技能资源、结构、子项选择或安装方式。 |
||
|
|
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 合并即可发布客户端能力。 |
||
|
|
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 |
||
|
|
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. |
||
|
|
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> |
||
|
|
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>
|
||
|
|
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 |
||
|
|
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 版本号更新。 |
||
|
|
44ea27c3d0 |
fix(ci): 翻译回推 commit 移除 [skip ci] (#41)
PR #40 实测发现:bot 回推的翻译 commit 带 `[skip ci]`,把新 SHA 上所有 workflow 都压掉了,必需检查(validate/translate/wait-for-copilot-review)永远不报告,PR 反而无法合并。 - 防循环不依赖 `[skip ci]`——translate job 的 bot actor 判断已经保证(bot 触发时 job skipped,而 skipped 满足必需检查) - validate / copilot 本来就应该在翻译产物上重跑 - 已加注释防止回归 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
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>
|
||
|
|
8b02ffdde1 |
fix(ci): i18n-translate 支持 fork PR (#38)
## 问题 PR #36(来自 fork)触发 `i18n Auto-Translate` workflow 失败,两处报错: 1. **checkout 失败**:`ref: github.event.pull_request.head.ref` 未指定 `repository:`,fork 的 head 分支在主仓库不存在 → `A branch or tag with the name 'add-mattpocock-skills' could not be found` 2. **失败打标签 403**:fork PR 的 `GITHUB_TOKEN` 被强制只读、拿不到 `DESIRECORE_BOT_TOKEN` secret → `Resource not accessible by integration` ## 修复 - **checkout**:同仓库 PR 仍检出 head 分支(保留自动回推翻译);fork PR 改用 `github.ref`(即 `refs/pull/N/merge`,base 仓库中一定存在) - **新增 "Fail fork PR with stale translations" 步骤**:fork PR 缺翻译时在消耗模型 token 之前直接失败,并提示贡献者本地运行 `uv run scripts/i18n/translate.py` 补交翻译 - **Commit & push / Label on failure** 两个写操作步骤加同仓库判断,fork PR 跳过 同仓库 PR 与 workflow_dispatch 行为完全不变。 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
a7b85a08c5 |
fix(i18n): sync dashscope-image-gen & xiaomi-tts zh-CN body with local (#13)
## Summary - 用本地 `defaults/global-skills/` 中的最新中文 body 内容更新远程 `SKILL.zh-CN.md` - 更新 zh-CN `source_hash` 以反映最新内容 - 解锁 en-US `translated_by`,允许 CI 自动重新翻译英文 body ## 变更文件 - `skills/dashscope-image-gen/SKILL.zh-CN.md` — 中文 body 同步至本地最新版本 - `skills/dashscope-image-gen/SKILL.md` — 更新 source_hash + 解锁 en-US - `skills/xiaomi-tts/SKILL.zh-CN.md` — 中文 body 同步至本地最新版本 - `skills/xiaomi-tts/SKILL.md` — 更新 source_hash + 解锁 en-US |
||
|
|
0ca53a7306 |
ci(i18n-translate): 仅翻译本 PR 改动的 skill,避免 stale 雪崩 (#6)
## 背景 PR #4 翻译失败的根因:`translate.py` 总扫描整个 `skills/` 目录,任何一个 skill 的 stale source_hash 都会触发翻译并占用 GitHub Models quota。一个大文件(如 manage-skills 14KB)撞免费 tier 8K input 上限 → 413 → 整个 workflow fail → ruleset 阻塞合并。 虽然 GitHub Models 已升级付费 quota(200K input 不会再 413),但 scope 收敛仍是更稳健的做法:单 PR token 消耗与改动量成正比,而不是与整个 repo 的 stale skill 数成正比。 ## 改动 - `detect-changes` step 在 `pull_request` 事件下提取本 PR 实际触及的 skill 目录(去重到 `skills/<name>` 粒度),输出到 `GITHUB_OUTPUT skill_paths` - `precheck`(--check)与 `Translate stale locales` 步骤把 `skill_paths` 作为位置参数传给 `translate.py`,仅检查/翻译相关 skill - `manifest.json` / `categories.json` 变动时回退到全扫描(这些影响 i18n fallback 链 / supportedLocales 全局语义) - `workflow_dispatch` 仍默认全扫描;其 `skill` 输入参数优先级最高 ## 验证 - 本地测试 detect-changes shell 提取逻辑:skill 文件 → 正确去重;manifest.json → 全扫描;无相关改动 → relevant=false - 本地 `translate.py --check skills/<name>` 正常工作 - 本 PR 自身仅触及 `.github/workflows/i18n-translate.yml`,detect-changes 应输出 `relevant=false`,translate 整体走 skip 分支 ## Test plan - [ ] CI 上 `validate` / `translate` / `wait-for-copilot-review` 全绿 - [ ] Copilot 评审通过 / conversation resolved - [ ] Squash merge |
||
|
|
9ee4c3a367 |
ci: 引入分支保护配套工作流(path 过滤 → detect-changes,AI review 自动化) (#5)
## Summary / 概要
为了让 `main` 分支保护规则在所有 PR 上稳定生效,调整两个现有 i18n workflow 并新增两个 AI review 配套
workflow。
### 已配置的 main ruleset(ID 16298003)
- 只允许 squash merge,禁止 force push / 删除
- 必需 status check:`validate`、`translate`,require
`strict_required_status_checks_policy=true`(必须 rebase 最新)
- PR
rule:`required_approving_review_count=0`、`required_review_thread_resolution=true`、`dismiss_stale_reviews_on_push=true`
- `bypass_actors=[]`:管理员也不能绕过
### 本 PR 改动
1. **i18n-validate / i18n-translate**:移除 `on.pull_request.paths`,把过滤下移到
job 内 `detect-changes` step。路径不相关时跳过实际逻辑但 job 仍 success,避免 required
check 因 path 过滤缺失而卡死非 i18n PR。
2. **auto-request-copilot-review** (新增):PR
opened/reopened/ready_for_review 时自动 `POST
/pulls/{n}/requested_reviewers` 加 Copilot 为 reviewer。
3. **wait-for-copilot-review** (新增):PR
opened/reopened/synchronize/ready_for_review 时启动,轮询 reviews API 等待
`copilot-pull-request-reviewer[bot]` 在当前 head SHA 提交 review。超时 8 分钟则
fail。
- 选择 polling 而不是 `pull_request_review` 事件触发是因为:Copilot bot 触发的
`pull_request_review` 事件被 GitHub 视为 first-time contributor,workflow run
会卡在 `action_required` 状态需 maintainer 在 web UI 手动批准,无法自动化。
合并后会再 PATCH ruleset 16298003,把 `wait-for-copilot-review` 加入 required
status checks 作为强制门槛。
## Test plan
- [x] `i18n-validate` 在本 PR 上跑出 success(PR 仅触及
`.github/workflows/`,relevant=false,走 skip 分支)
- [x] `i18n-translate` 同上
- [x] `auto-request-copilot-review` 跑出 success,Copilot 被自动加为 reviewer
- [x] `wait-for-copilot-review` 在 polling 窗口内捕获到 Copilot review 并 pass
- [ ] 解决 Copilot 提的 conversations 后能 squash merge
- [ ] 合并后用 PATCH ruleset 把 `wait-for-copilot-review` 加入 required checks
|
||
|
|
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>
|