moluoxixi-ai-rules 0.2.12 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -138,3 +138,11 @@ installation:
138
138
  - 角色专属资产:放在 `roles/<role>/`。角色只选择能力,无需逐个复制公共供应商配置。
139
139
 
140
140
  公共分发和能力测试放在 `scripts/lib/__test__/`;角色专属测试放在 `roles/<role>/__test__/`。
141
+
142
+ ## 安装验证
143
+
144
+ 先执行 `npm run build`。`npm test` 中的 `role-install.e2e.test.mjs` 从空 AIRules home 开始,通过临时 `git://` 远端实际下载供应商,保留完整菱形继承声明,并执行真实 CLI 与 npm setup。用例覆盖重复 skills、MCP 和 setup 去重、父角色私有资产隔离、重复安装、冲突拒绝,以及 setup 失败后保留旧资产和宿主配置。宿主包含 Claude、Codex 和 OpenCode;用户目录、Git 配置与 npm prefix 均隔离。
145
+
146
+ `npm run verify:packed-airules` 把 npm tarball 安装到独立消费项目,再用打包后的 CLI 执行同一组安装用例。CI 在 Linux、Windows 和 macOS 上运行这些检查。
147
+
148
+ `npm run verify:remote-role-install` 从真实 GitHub 上游下载当前 AIRules commit 与 capability 固定的供应商 commit,安装 `common`、`productivity` 和 `frontend` 的菱形组合,比较 skills 与可视化资源内容,并校验三种宿主的 MCP 配置。该检查需要联网,由 Linux CI 执行;它验证安装与配置,不启动 MCP 服务或调用模型。
@@ -383,7 +383,7 @@ function materializePlan(plan, role) {
383
383
  }
384
384
  catch (error) {
385
385
  removeBestEffort(buildRoot);
386
- throw new Error('Failed to materialize vendor staging', { cause: error });
386
+ throw new Error(`Failed to materialize vendor staging: ${String(error)}`, { cause: error });
387
387
  }
388
388
  }
389
389
  function validateInventory(stagingRoot, finalVendorRoot, role, roleStagingRoot) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "moluoxixi-ai-rules",
3
3
  "type": "module",
4
- "version": "0.2.12",
4
+ "version": "0.2.13",
5
5
  "description": "Remote AI role asset distribution for supported hosts.",
6
6
  "license": "MIT",
7
7
  "repository": "https://github.com/moluoxixi/AIRules",
@@ -31,6 +31,7 @@
31
31
  "airules": "node bin/airules.js",
32
32
  "build": "tsc -p tsconfig.build.json",
33
33
  "verify:packed-airules": "node scripts/verify-packed-airules.mjs",
34
+ "verify:remote-role-install": "node scripts/verify-remote-role-install.mjs",
34
35
  "prebuild": "node scripts/clean-dist.mjs",
35
36
  "prepare": "husky",
36
37
  "prepack": "npm run build",