mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-12-05 09:39: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
@@ -107,9 +107,11 @@ A local skill lives at `skills/<id>/SKILL.md` and combines YAML frontmatter with
|
|||||||
|
|
||||||
Only `SKILL.md` carries frontmatter. Localized `SKILL.<locale>.md` files contain the body, start with the corresponding locale comment, and are referenced by the i18n metadata. For example, `SKILL.zh-CN.md` starts with `<!-- locale: zh-CN -->`. Market skills must set `disable-model-invocation: true` or omit the field; `false` is rejected.
|
Only `SKILL.md` carries frontmatter. Localized `SKILL.<locale>.md` files contain the body, start with the corresponding locale comment, and are referenced by the i18n metadata. For example, `SKILL.zh-CN.md` starts with `<!-- locale: zh-CN -->`. Market skills must set `disable-model-invocation: true` or omit the field; `false` is rejected.
|
||||||
|
|
||||||
Register every local built-in skill in `builtin-skills.json.skills`, supply its sidecar, and use a valid market category. See the [frontmatter schema](scripts/i18n/schema/skill-frontmatter.schema.json), [Web Access example](skills/web-access/SKILL.md), and [i18n authoring guide](docs/I18N.md) (Chinese).
|
Register only the local skills selected for automatic global installation in `builtin-skills.json.skills`, sorted by ID. Other local skills remain available for optional marketplace installation; they do not need an entry in this list. Every local skill still needs its sidecar and a valid market category. See the [frontmatter schema](scripts/i18n/schema/skill-frontmatter.schema.json), [Web Access example](skills/web-access/SKILL.md), and [i18n authoring guide](docs/I18N.md) (Chinese).
|
||||||
|
|
||||||
The `retired` list identifies former built-in skills that clients may retire at startup. Clients remove only market/bundled copies tracked in `skills.lock` whose `SKILL.md` hash still matches the installation record. Manually installed or locally modified copies are preserved. An ID must never appear in both `skills` and `retired`.
|
Removing an ID from `skills` stops automatic installation and updates without removing existing installations or its marketplace listing. Do not add it to `retired` merely to make it optional: retirement may also remove an unchanged official copy that a user installed from the marketplace.
|
||||||
|
|
||||||
|
The `retired` list explicitly requests cleanup of former built-in installations at startup. Clients require managed bundled or official-market ownership, an unchanged installed-tree digest, and no local runtime state before removing a copy. Unmanaged, third-party, locally modified, or runtime-bearing copies are preserved. An ID must never appear in both `skills` and `retired`.
|
||||||
|
|
||||||
### External skills and collections
|
### External skills and collections
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -107,9 +107,11 @@ uv run scripts/i18n/validate-i18n.py
|
|||||||
|
|
||||||
只有 `SKILL.md` 包含 frontmatter。`SKILL.<locale>.md` 仅包含对应语言正文,以匹配的语言注释开头,并由 i18n 元数据引用。例如,`SKILL.zh-CN.md` 的首行是 `<!-- locale: zh-CN -->`。市场技能的 `disable-model-invocation` 只能设为 `true` 或省略,`false` 会被拒绝。
|
只有 `SKILL.md` 包含 frontmatter。`SKILL.<locale>.md` 仅包含对应语言正文,以匹配的语言注释开头,并由 i18n 元数据引用。例如,`SKILL.zh-CN.md` 的首行是 `<!-- locale: zh-CN -->`。市场技能的 `disable-model-invocation` 只能设为 `true` 或省略,`false` 会被拒绝。
|
||||||
|
|
||||||
每个本地内置技能都必须登记到 `builtin-skills.json.skills`,提供 sidecar,并使用有效分类。参考 [frontmatter Schema](scripts/i18n/schema/skill-frontmatter.schema.json)、[联网访问技能](skills/web-access/SKILL.md)和[多语言作者指南](docs/I18N.md)。
|
只有需要自动安装到全局的本地技能才登记到 `builtin-skills.json.skills`,并按 ID 排序。其他本地技能仍可从市场按需安装,无需进入此清单。所有本地技能仍须提供 sidecar,并使用有效分类。参考 [frontmatter Schema](scripts/i18n/schema/skill-frontmatter.schema.json)、[联网访问技能](skills/web-access/SKILL.md)和[多语言作者指南](docs/I18N.md)。
|
||||||
|
|
||||||
`retired` 用于声明客户端可在启动时退役的旧内置技能。客户端只删除同时满足以下条件的副本:由 `skills.lock` 记录为市场或随包内容,且 `SKILL.md` 哈希仍与安装记录一致。手动安装或经过本地修改的副本会被保留。同一个 ID 不得同时出现在 `skills` 和 `retired` 中。
|
从 `skills` 移除 ID 只停止自动安装和更新,不删除已有安装或市场条目。仅改为可选安装时不要加入 `retired`:退役机制也可能清理用户从市场主动安装、内容未修改的官方副本。
|
||||||
|
|
||||||
|
`retired` 用于明确要求在启动时清理旧内置安装。客户端仅在确认随包或官方市场管理归属、完整安装树摘要未偏离且没有本地运行状态时删除副本。无管理证据、第三方来源、本地修改或带有运行状态的副本均保留。同一个 ID 不得同时出现在 `skills` 和 `retired` 中。
|
||||||
|
|
||||||
### 外部技能与技能集合
|
### 外部技能与技能集合
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
{
|
{
|
||||||
"skills": [
|
"skills": [
|
||||||
"app-developer",
|
"app-developer",
|
||||||
"baidu-poi-search",
|
|
||||||
"ccgp-gov-procurement",
|
|
||||||
"clone-agent",
|
"clone-agent",
|
||||||
"cnipa-patent-search",
|
|
||||||
"code-intelligence",
|
"code-intelligence",
|
||||||
"configuring-compute",
|
"configuring-compute",
|
||||||
"create-agent",
|
"create-agent",
|
||||||
"creditchina-query",
|
|
||||||
"dashscope-image-gen",
|
|
||||||
"delete-agent",
|
"delete-agent",
|
||||||
"dev-environment-setup",
|
"dev-environment-setup",
|
||||||
"discover-agent",
|
"discover-agent",
|
||||||
@@ -21,9 +16,6 @@
|
|||||||
"manage-skills",
|
"manage-skills",
|
||||||
"manage-teams",
|
"manage-teams",
|
||||||
"markdown",
|
"markdown",
|
||||||
"minimax-music-gen",
|
|
||||||
"minimax-video-gen",
|
|
||||||
"multi-source-sentiment",
|
|
||||||
"nodejs-runtime",
|
"nodejs-runtime",
|
||||||
"pdf",
|
"pdf",
|
||||||
"pptx",
|
"pptx",
|
||||||
@@ -33,14 +25,11 @@
|
|||||||
"s3-storage-operations",
|
"s3-storage-operations",
|
||||||
"skill-creator",
|
"skill-creator",
|
||||||
"tech-diagram",
|
"tech-diagram",
|
||||||
"tianyancha-risk",
|
|
||||||
"tool-mcp-authoring",
|
"tool-mcp-authoring",
|
||||||
"update-agent",
|
"update-agent",
|
||||||
"using-services",
|
"using-services",
|
||||||
"web-access",
|
"web-access",
|
||||||
"workflow",
|
"workflow",
|
||||||
"workforce-optimization",
|
|
||||||
"xiaomi-tts",
|
|
||||||
"xlsx"
|
"xlsx"
|
||||||
],
|
],
|
||||||
"retired": []
|
"retired": []
|
||||||
|
|||||||
@@ -57,6 +57,32 @@ class BuiltinSkillManifestTests(unittest.TestCase):
|
|||||||
VALIDATOR.validate_builtin_manifest(report, payload, skills)
|
VALIDATOR.validate_builtin_manifest(report, payload, skills)
|
||||||
return report.issues
|
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:
|
def test_allows_disjoint_sorted_retired_ids(self) -> None:
|
||||||
self.assertEqual([], self.validate(
|
self.assertEqual([], self.validate(
|
||||||
{"skills": ["new-skill"], "retired": ["old-skill"]},
|
{"skills": ["new-skill"], "retired": ["old-skill"]},
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Checks:
|
|||||||
6. Frontmatter parses cleanly; heading count of locale body matches source body (+/- 0).
|
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.
|
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).
|
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.
|
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.
|
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
|
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}",
|
f"active and retired Skill IDs overlap {overlap}",
|
||||||
))
|
))
|
||||||
|
|
||||||
expected = sorted(skill_md_names)
|
# Local content also serves optional marketplace installations. Only the
|
||||||
actual = list(skills)
|
# explicitly selected subset is installed automatically by the client.
|
||||||
if actual != expected:
|
non_local = sorted(set(skills) - set(skill_md_names))
|
||||||
missing = sorted(set(expected) - set(actual))
|
if non_local:
|
||||||
extra = sorted(set(actual) - set(expected))
|
report.add(Issue(
|
||||||
order_issue = not missing and not extra
|
"builtin-skills.json",
|
||||||
parts = []
|
"builtin-skills",
|
||||||
if missing:
|
f"contains non-local skills {non_local}",
|
||||||
parts.append(f"missing local SKILL.md skills {missing}")
|
))
|
||||||
if extra:
|
if skills != sorted(skills):
|
||||||
parts.append(f"contains non-local skills {extra}")
|
report.add(Issue("builtin-skills.json", "builtin-skills", "skills list is not sorted"))
|
||||||
if order_issue:
|
|
||||||
parts.append("skills list is not sorted")
|
|
||||||
report.add(Issue("builtin-skills.json", "builtin-skills", "; ".join(parts)))
|
|
||||||
|
|
||||||
|
|
||||||
def validate_agent_json(report: Report, agent_file: Path, category_ids: set[str]) -> None:
|
def validate_agent_json(report: Report, agent_file: Path, category_ids: set[str]) -> None:
|
||||||
|
|||||||
Reference in new issue
Block a user