mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-12-05 12:59:21 +08:00
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.
This commit is contained in:
5 files changed
+46
-30
No files matched your search
@@ -57,6 +57,32 @@ class BuiltinSkillManifestTests(unittest.TestCase):
|
||||
VALIDATOR.validate_builtin_manifest(report, payload, skills)
|
||||
return report.issues
|
||||
|
||||
def test_allows_optional_local_skills_without_retirement(self) -> None:
|
||||
self.assertEqual([], self.validate(
|
||||
{"skills": ["default-skill"], "retired": []},
|
||||
["default-skill", "optional-skill"],
|
||||
))
|
||||
|
||||
def test_allows_no_automatic_installations(self) -> None:
|
||||
self.assertEqual([], self.validate(
|
||||
{"skills": [], "retired": []},
|
||||
["optional-skill"],
|
||||
))
|
||||
|
||||
def test_rejects_non_local_automatic_installations(self) -> None:
|
||||
issues = self.validate(
|
||||
{"skills": ["missing-skill"], "retired": []},
|
||||
["optional-skill"],
|
||||
)
|
||||
self.assertTrue(any("contains non-local skills" in issue.message for issue in issues))
|
||||
|
||||
def test_rejects_duplicate_active_skills(self) -> None:
|
||||
issues = self.validate(
|
||||
{"skills": ["default-skill", "default-skill"], "retired": []},
|
||||
["default-skill", "optional-skill"],
|
||||
)
|
||||
self.assertTrue(any("duplicate Skill IDs" in issue.message for issue in issues))
|
||||
|
||||
def test_allows_disjoint_sorted_retired_ids(self) -> None:
|
||||
self.assertEqual([], self.validate(
|
||||
{"skills": ["new-skill"], "retired": ["old-skill"]},
|
||||
|
||||
@@ -15,7 +15,7 @@ Checks:
|
||||
6. Frontmatter parses cleanly; heading count of locale body matches source body (+/- 0).
|
||||
7. categories.json's per-category i18n covers all locales declared in manifest.json.
|
||||
8. Top-level description is 1-1024 chars (spec); top-level name is 1-64 chars (spec).
|
||||
9. Skill/Agent/Team counts and builtin skill index match the repository contents.
|
||||
9. Skill/Agent/Team counts match the repository contents; the builtin skill index is a sorted local subset.
|
||||
10. Skill, Agent, Team, and entry.json category references exist in categories.json.
|
||||
11. entry.json pointers have the required marketplace fields, valid inline SVG icons, and safe source URLs.
|
||||
Team pointers additionally accept only git sources, because a team is installed by forking
|
||||
@@ -437,20 +437,17 @@ def validate_builtin_manifest(
|
||||
f"active and retired Skill IDs overlap {overlap}",
|
||||
))
|
||||
|
||||
expected = sorted(skill_md_names)
|
||||
actual = list(skills)
|
||||
if actual != expected:
|
||||
missing = sorted(set(expected) - set(actual))
|
||||
extra = sorted(set(actual) - set(expected))
|
||||
order_issue = not missing and not extra
|
||||
parts = []
|
||||
if missing:
|
||||
parts.append(f"missing local SKILL.md skills {missing}")
|
||||
if extra:
|
||||
parts.append(f"contains non-local skills {extra}")
|
||||
if order_issue:
|
||||
parts.append("skills list is not sorted")
|
||||
report.add(Issue("builtin-skills.json", "builtin-skills", "; ".join(parts)))
|
||||
# Local content also serves optional marketplace installations. Only the
|
||||
# explicitly selected subset is installed automatically by the client.
|
||||
non_local = sorted(set(skills) - set(skill_md_names))
|
||||
if non_local:
|
||||
report.add(Issue(
|
||||
"builtin-skills.json",
|
||||
"builtin-skills",
|
||||
f"contains non-local skills {non_local}",
|
||||
))
|
||||
if skills != sorted(skills):
|
||||
report.add(Issue("builtin-skills.json", "builtin-skills", "skills list is not sorted"))
|
||||
|
||||
|
||||
def validate_agent_json(report: Report, agent_file: Path, category_ids: set[str]) -> None:
|
||||
|
||||
Reference in new issue
Block a user