rainskills 0.1.24 → 0.1.25
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.
- package/README.md +1 -1
- package/SKILL.md +1 -1
- package/marketplace/rainskills/.claude-plugin/plugin.json +1 -1
- package/marketplace/rainskills/.codex-plugin/plugin.json +1 -1
- package/marketplace/rainskills/skills/rainskills/SKILL.md +2 -2
- package/package.json +1 -1
- package/rainbond-app-assistant/references/runtime-gate.md +1 -1
- package/rainbond-app-version-assistant/SKILL.md +1 -1
- package/rainbond-delivery-verifier/SKILL.md +1 -1
- package/rainbond-env-sync/SKILL.md +1 -1
- package/rainbond-fullstack-bootstrap/SKILL.md +1 -1
- package/rainbond-fullstack-troubleshooter/SKILL.md +1 -1
- package/rainbond-opensource-app-deploy/references/runtime-gate.md +1 -1
- package/rainbond-platform-installer/SKILL.md +1 -1
- package/rainbond-platform-installer/references/installation-policy.json +1 -6
- package/rainbond-platform-installer/references/installation-policy.md +2 -2
- package/rainbond-platform-installer/references/troubleshooting.md +1 -1
- package/rainbond-platform-installer/scripts/installed-version.js +1 -1
- package/rainbond-platform-installer/scripts/platform-installer.js +1 -10
- package/rainbond-platform-installer/scripts/platform-routing.js +3 -2
- package/rainbond-platform-installer/scripts/windows-platform.js +0 -9
- package/rainbond-platform-query/SKILL.md +1 -1
- package/rainbond-project-init/SKILL.md +1 -1
- package/rainbond-template-installer/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -223,7 +223,7 @@ node ~/.rainbond/lib/rainskills/bin/rainskills.js platform install --onboarding-
|
|
|
223
223
|
|
|
224
224
|
Rainskills 会在用户下一次发起业务动作时,由本地运行时立即返回环境查询结果,并另行启动后台任务静默检查更新。更新只跟随 npm `latest` 指向的正式版。当前版本是 RC 或其他预发布版本时不会查询、不会自动升级;npm 上的新 RC 版本也不参与正式版自动升级。
|
|
225
225
|
|
|
226
|
-
发现更高的正式版后,后台任务只委托到经过校验的精确版本,例如 `rainskills@0.1.
|
|
226
|
+
发现更高的正式版后,后台任务只委托到经过校验的精确版本,例如 `rainskills@0.1.25`,不会执行浮动的 `@latest` 业务代码。新版本原子刷新已经安装的 Rainskills Skills;当前业务继续使用启动时已经加载的版本,最迟从下一条新任务开始使用新版。npm 超时、版本检查失败、安装位置不安全或文件迁移失败时会保留旧版本,且不会阻塞或改变当前操作。
|
|
227
227
|
|
|
228
228
|
升级只更新 Rainskills 自身,不触发 Rainbond 安装、运行环境选择、登录授权或重新对接,也不会新增 Agent MCP 配置。更新内容仅包括 Skills 和本地 CLI。原始业务操作会继续执行;只有该业务操作本身需要运行环境时,才按既有门禁检查当前连接。可用连接直接复用,401 只重新授权一次,403 立即停止,从未连接过运行环境时才进入环境选择。
|
|
229
229
|
|
package/SKILL.md
CHANGED
|
@@ -44,7 +44,7 @@ Rainskills 安装完成,下一条消息即可直接使用。
|
|
|
44
44
|
|
|
45
45
|
`runtime connect` 的 Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT。
|
|
46
46
|
|
|
47
|
-
Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.
|
|
47
|
+
Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.25`):
|
|
48
48
|
|
|
49
49
|
- 状态:执行 `runtime status --json`。
|
|
50
50
|
- 首次连接:执行 `runtime connect <target> --saas` 或 `runtime connect <target> --rainbond-url <Console origin>`。
|
|
@@ -14,7 +14,7 @@ This is the single marketplace entry for the complete Rainskills product. The in
|
|
|
14
14
|
3. Keep stdin, stdout, and stderr attached. When `RAINSKILLS_USER_INPUT_REQUIRED` appears, pause for that installer choice. If the installer emits `rainskills.next-action.v1`, execute only its fixed `argv` through the same launcher; never evaluate output as a shell command. If the adjacent `bin/rainskills.js` exists, use it for fixed next actions; otherwise use the same versioned npm package fallback described below.
|
|
15
15
|
4. Stay attached until every independent Skill is installed. Do not select, connect, or configure an application runtime during installation. In the user-facing response, output only the fixed completion message below.
|
|
16
16
|
|
|
17
|
-
If the adjacent installer is missing, check the local Node.js version before choosing the fallback. With `npx` and Node.js 18 or newer, use `npx --yes rainskills@0.1.
|
|
17
|
+
If the adjacent installer is missing, check the local Node.js version before choosing the fallback. With `npx` and Node.js 18 or newer, use `npx --yes rainskills@0.1.25 <target>`. With no Node.js or a version below 18, use `bash <(curl -fsSL https://get.rainbond.com/rainskills/install.sh) <target>` instead. Omit `<target>` only when the host cannot be determined reliably. Keep either command attached to the interactive terminal. For an update or repair, refresh this marketplace Skill first, then run the installer again; it compares and updates every independent internal Skill.
|
|
18
18
|
|
|
19
19
|
Skills-only 安装不需要 Node.js;CDN fallback 只负责安装 Skill 文件,不代表运行环境连接、应用部署或平台安装已经可执行。用户首次提出需要运行环境的动作时,对应业务 Skill 才检查 Node.js;固定 Rainskills launcher 需要 Node.js 18 或更高版本。缺失或版本过低时保留原始 intent 并停止,等待用户或 agent 明确同意安装或升级 Node.js,安装完成消息不得提前提示 Node.js。
|
|
20
20
|
|
|
@@ -44,7 +44,7 @@ Rainskills 安装完成,下一条消息即可直接使用。
|
|
|
44
44
|
|
|
45
45
|
`runtime connect` 的 Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT。
|
|
46
46
|
|
|
47
|
-
Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.
|
|
47
|
+
Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.25`):
|
|
48
48
|
|
|
49
49
|
- 状态:执行 `runtime status --json`。
|
|
50
50
|
- 首次连接:执行 `runtime connect <target> --saas` 或 `runtime connect <target> --rainbond-url <Console origin>`。
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ Canonical progressive-loading contract: `rainskills.skill-runtime-contract.v1`.
|
|
|
14
14
|
```json
|
|
15
15
|
{
|
|
16
16
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
17
|
-
"package_version": "rainskills@0.1.
|
|
17
|
+
"package_version": "rainskills@0.1.25",
|
|
18
18
|
"runtime_status": [
|
|
19
19
|
"node",
|
|
20
20
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -17,7 +17,7 @@ description: "Use when a user explicitly asks for an existing Rainbond app versi
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
19
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
20
|
-
"package_version": "rainskills@0.1.
|
|
20
|
+
"package_version": "rainskills@0.1.25",
|
|
21
21
|
"runtime_status": [
|
|
22
22
|
"node",
|
|
23
23
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -49,7 +49,7 @@ description: "Use only when the user explicitly asks for final delivery or acces
|
|
|
49
49
|
```json
|
|
50
50
|
{
|
|
51
51
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
52
|
-
"package_version": "rainskills@0.1.
|
|
52
|
+
"package_version": "rainskills@0.1.25",
|
|
53
53
|
"runtime_status": [
|
|
54
54
|
"node",
|
|
55
55
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -17,7 +17,7 @@ description: "Use when a user explicitly asks to sync non-sensitive preview or p
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
19
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
20
|
-
"package_version": "rainskills@0.1.
|
|
20
|
+
"package_version": "rainskills@0.1.25",
|
|
21
21
|
"runtime_status": [
|
|
22
22
|
"node",
|
|
23
23
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -17,7 +17,7 @@ description: "Use only when the user explicitly asks to create the Rainbond app
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
19
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
20
|
-
"package_version": "rainskills@0.1.
|
|
20
|
+
"package_version": "rainskills@0.1.25",
|
|
21
21
|
"runtime_status": [
|
|
22
22
|
"node",
|
|
23
23
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -49,7 +49,7 @@ description: "Use only when the user explicitly asks for a bounded build, runtim
|
|
|
49
49
|
```json
|
|
50
50
|
{
|
|
51
51
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
52
|
-
"package_version": "rainskills@0.1.
|
|
52
|
+
"package_version": "rainskills@0.1.25",
|
|
53
53
|
"runtime_status": [
|
|
54
54
|
"node",
|
|
55
55
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -14,7 +14,7 @@ Canonical progressive-loading contract: `rainskills.skill-runtime-contract.v1`.
|
|
|
14
14
|
```json
|
|
15
15
|
{
|
|
16
16
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
17
|
-
"package_version": "rainskills@0.1.
|
|
17
|
+
"package_version": "rainskills@0.1.25",
|
|
18
18
|
"runtime_status": [
|
|
19
19
|
"node",
|
|
20
20
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -32,7 +32,7 @@ Do not use it to deploy an application to an existing Rainbond. Route those requ
|
|
|
32
32
|
## Workflow
|
|
33
33
|
|
|
34
34
|
1. Read [installation-policy.md](references/installation-policy.md).
|
|
35
|
-
2. Use the installed local launcher `["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"]`; its protected runtime package marker is `rainskills@0.1.
|
|
35
|
+
2. Use the installed local launcher `["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"]`; its protected runtime package marker is `rainskills@0.1.25` and must equal this package's `package.json`. For a Rainskills marker, first validate schema `rainskills.next-action.v1`, action, onboarding id, and the bounded `argv` array, then append that array to the launcher. Never use `latest` or evaluate a shell string from output.
|
|
36
36
|
3. 业务 Skill 的四项运行环境菜单会把本机或独立服务器选择写入 `rainskills.next-action.v1` 的显式 `--location`;收到这类 next-action 后直接执行固定 argv,不得再次调用 `private-deployment-location`。只有用户直接要求安装 Rainbond 平台且尚未选择部署位置时,才执行 launcher + `["runtime", "message", "--id", "private-deployment-location"]` 并原样输出固定的三项部署位置消息:选择 1 后执行带 `["--location", "local", "--mode", "single-node"]` 的 `platform install`;选择 2 后执行带 `["--location", "server"]` 的 `platform install`,由 helper 继续显示固定的服务器类型消息;选择 3 后执行 launcher + `["runtime", "message", "--id", "private-console-origin"]` 并进入已有环境连接,不得执行 `platform install`。平台安装 onboarding 只保存安装断点,不保存或恢复业务 intent。
|
|
37
37
|
4. Let the helper perform one read-only preflight against the already selected local or remote target, then show resources, blockers, and applicable host changes. Never invoke `platform install` without an explicit `--location`; the helper must not ask for the deployment location again.
|
|
38
38
|
5. 主机集群开始前必须获得 explicit confirmation,并使用受限 AI 交接:首次调用在固定安装 argv 后追加 `--agent-handoff`,记录该子进程会话;用户确认后,使用相同固定 argv 追加 `--agent-handoff --yes` 一次。不得向等待进程写入 `y`、不得启动第二个竞争安装、不得 `kill` 安装进程,也不得让用户复制完整安装或恢复命令。用户取消时,仅使用同一 argv 追加 `--agent-handoff --cancel`;它只能清除匹配的待确认状态,不能建立 SSH 连接或修改服务器。
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "rainskills.platform-installation-policy.v2",
|
|
3
|
-
"recommended": {
|
|
4
|
-
"cpu_cores": 4,
|
|
5
|
-
"memory_bytes": 8589934592,
|
|
6
|
-
"disk_bytes": 53687091200
|
|
7
|
-
},
|
|
8
3
|
"minimums": {
|
|
9
4
|
"cpu_cores": 2,
|
|
10
5
|
"memory_bytes": 4294967296,
|
|
11
|
-
"disk_bytes":
|
|
6
|
+
"disk_bytes": 10737418240
|
|
12
7
|
},
|
|
13
8
|
"required_ports": [80, 443, 7070],
|
|
14
9
|
"supported_control_platforms": ["linux", "darwin", "win32"],
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
- 控制端支持 Linux、macOS 和 Windows;Rainbond 目标支持 Linux、macOS,以及 Windows 本地预览路径中的专用 WSL2 环境。
|
|
8
8
|
- Linux `x64` / `arm64`:选择“部署到本机”时安装到当前设备;选择“部署到独立服务器”时通过 SSH 安装到其他 Linux 服务器。不提供回车默认项。
|
|
9
|
-
- macOS `x64` / `arm64
|
|
9
|
+
- macOS `x64` / `arm64`:可安装到当前 Mac,也可选择独立 Linux 服务器。
|
|
10
10
|
- Windows:与其他控制端使用同一份“部署到本机 / 部署到独立服务器 / 部署到已有 Rainbond”选择;本机路径目前为 preview,只支持 Windows 10 build 19041+ / Windows 11 x64 工作站。
|
|
11
|
-
-
|
|
11
|
+
- 预检最低门槛为 2 核 CPU、4 GB 内存、10 GB 可用磁盘。达到最低门槛时继续安装,最终以 Rainbond 实际部署验证为准。
|
|
12
12
|
- 安装前端口 `80`、`443`、`7070` 必须空闲。
|
|
13
13
|
|
|
14
14
|
远程单机只接受 `user@host` 或 `~/.ssh/config` 主机别名;ROI 主机集群逐节点使用配置中的 root 地址和端口。两种方式都先用 `BatchMode=yes` 检查现有免密连接。远程单机检查失败时固定输出一条版本锁定的 `ssh prepare`;主机集群先检查全部节点,再一次列出所有未就绪节点并输出一条版本锁定的 `ssh prepare-cluster --cluster-config`。用户只在自己电脑的系统终端执行,OpenSSH 读取每台服务器的指纹确认和一次密码;命令只准备公钥连接,不安装 Rainbond。全部完成后只统一回复一次“已完成”。恢复后所有 `ssh` / `scp` 均为免密非交互调用。Rainskills 不接收聊天中的 SSH 密码或私钥,也不支持离线安装或自动清理冲突环境。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 安装问题处理
|
|
2
2
|
|
|
3
|
-
-
|
|
3
|
+
- **资源不足**:低于预检最低门槛(2 核 / 4 GB / 10 GB)时停止安装,否则继续。最终以 Rainbond 实际部署验证结果为准。
|
|
4
4
|
- **端口占用**:停止安装,提示用户处理占用 `80`、`443`、`7070` 的服务,不主动停止服务。
|
|
5
5
|
- **已有 Rainbond**:停止新安装,建议返回 Rainskills 选择“已经有,填写平台地址”。
|
|
6
6
|
- **权限不足**:Linux 需要 root 或已经可用的 `sudo -n`,不得在聊天中索取密码。
|
|
@@ -1094,10 +1094,8 @@ function gibibytes(bytes) {
|
|
|
1094
1094
|
|
|
1095
1095
|
function evaluatePreflight(facts) {
|
|
1096
1096
|
const blockers = [];
|
|
1097
|
-
const warnings = [];
|
|
1098
1097
|
const effects = [];
|
|
1099
1098
|
const minimums = POLICY.minimums;
|
|
1100
|
-
const recommended = POLICY.recommended;
|
|
1101
1099
|
if (!POLICY.supported_platforms.includes(facts.platform)) {
|
|
1102
1100
|
blockers.push(`不支持当前系统 ${facts.platform},首版仅支持 Linux 和 macOS`);
|
|
1103
1101
|
}
|
|
@@ -1106,18 +1104,12 @@ function evaluatePreflight(facts) {
|
|
|
1106
1104
|
}
|
|
1107
1105
|
if (facts.cpuCores < minimums.cpu_cores) {
|
|
1108
1106
|
blockers.push(`CPU 最低需要 ${minimums.cpu_cores} 核,当前 ${facts.cpuCores} 核`);
|
|
1109
|
-
} else if (facts.cpuCores < recommended.cpu_cores) {
|
|
1110
|
-
warnings.push(`CPU ${facts.cpuCores} 核低于推荐配置 ${recommended.cpu_cores} 核`);
|
|
1111
1107
|
}
|
|
1112
1108
|
if (facts.memoryBytes < minimums.memory_bytes) {
|
|
1113
1109
|
blockers.push(`内存最低需要 ${gibibytes(minimums.memory_bytes).toFixed(0)} GB,当前 ${gibibytes(facts.memoryBytes).toFixed(1)} GB`);
|
|
1114
|
-
} else if (facts.memoryBytes < recommended.memory_bytes) {
|
|
1115
|
-
warnings.push(`内存 ${gibibytes(facts.memoryBytes).toFixed(1)} GB 低于推荐配置 ${gibibytes(recommended.memory_bytes).toFixed(0)} GB`);
|
|
1116
1110
|
}
|
|
1117
1111
|
if (facts.diskBytes < minimums.disk_bytes) {
|
|
1118
1112
|
blockers.push(`可用磁盘最低需要 ${gibibytes(minimums.disk_bytes).toFixed(0)} GB,当前 ${gibibytes(facts.diskBytes).toFixed(1)} GB`);
|
|
1119
|
-
} else if (facts.diskBytes < recommended.disk_bytes) {
|
|
1120
|
-
warnings.push(`可用磁盘 ${gibibytes(facts.diskBytes).toFixed(1)} GB 低于推荐配置 ${gibibytes(recommended.disk_bytes).toFixed(0)} GB`);
|
|
1121
1113
|
}
|
|
1122
1114
|
if (facts.occupiedPorts.length > 0) blockers.push(`端口 ${facts.occupiedPorts.join("、")} 已被占用`);
|
|
1123
1115
|
if (facts.platform === "linux" && !facts.hasPrivilege) blockers.push("Linux 安装需要 root 或已配置可用的 sudo -n 权限");
|
|
@@ -1135,7 +1127,7 @@ function evaluatePreflight(facts) {
|
|
|
1135
1127
|
}
|
|
1136
1128
|
effects.push("启动 privileged rainbond 容器并写入持久化数据");
|
|
1137
1129
|
|
|
1138
|
-
return { ok: blockers.length === 0, blockers,
|
|
1130
|
+
return { ok: blockers.length === 0, blockers, effects };
|
|
1139
1131
|
}
|
|
1140
1132
|
|
|
1141
1133
|
function extractConsoleUrl(output) {
|
|
@@ -1720,7 +1712,6 @@ function preflightMessage(facts, assessment, target) {
|
|
|
1720
1712
|
"",
|
|
1721
1713
|
`${facts.cpuCores} 核 CPU / ${gibibytes(facts.memoryBytes).toFixed(1)} GB 内存 / ${gibibytes(facts.diskBytes).toFixed(1)} GB 可用磁盘`,
|
|
1722
1714
|
];
|
|
1723
|
-
if (facts.platform === "darwin") lines.push("macOS 安装依赖 OrbStack,首次准备时间通常比 Linux 更长。");
|
|
1724
1715
|
if (!assessment.ok) {
|
|
1725
1716
|
lines.push("", "需要先处理:", ...assessment.blockers.map((blocker) => `- ${blocker}`));
|
|
1726
1717
|
return lines.join("\n");
|
|
@@ -9,6 +9,7 @@ const LOCATIONS = new Set(["local", "server"]);
|
|
|
9
9
|
const SERVER_MODES = new Set(["single-node", "host-cluster", "existing-kubernetes"]);
|
|
10
10
|
const LEGACY_TARGETS = new Set(["local-linux", "local-macos", "local-windows", "remote-linux"]);
|
|
11
11
|
const LOCAL_TARGETS = new Set(["local-linux", "local-macos", "local-windows"]);
|
|
12
|
+
const SSH_TARGET_PROMPT = "Linux SSH 地址(例如 root@192.168.1.20 或主机别名)";
|
|
12
13
|
const CONTROL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f]/u;
|
|
13
14
|
const CREDENTIAL_LIKE_VALUE = /^(?:gh[pousr]_|github_pat_|xox[baprs]-|sk-[A-Za-z0-9_-]{16,}|AKIA[A-Z0-9]{12,}|eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$)/i;
|
|
14
15
|
|
|
@@ -181,7 +182,7 @@ function writeMissingSsh(write) {
|
|
|
181
182
|
writeUserMessage(
|
|
182
183
|
write,
|
|
183
184
|
"platform.server-ssh",
|
|
184
|
-
|
|
185
|
+
SSH_TARGET_PROMPT,
|
|
185
186
|
);
|
|
186
187
|
}
|
|
187
188
|
|
|
@@ -291,7 +292,7 @@ async function selectPlatformRoute({
|
|
|
291
292
|
});
|
|
292
293
|
}
|
|
293
294
|
while (!remoteHost) {
|
|
294
|
-
remoteHost = (await ask(
|
|
295
|
+
remoteHost = (await ask(`${SSH_TARGET_PROMPT}: `)).trim();
|
|
295
296
|
if (!remoteHost) write("SSH 地址不能为空。\n");
|
|
296
297
|
}
|
|
297
298
|
}
|
|
@@ -789,9 +789,7 @@ function evaluateWindowsPreflight(facts, policy, expectedUserSid) {
|
|
|
789
789
|
if (!windowsPolicy) throw new Error("缺少 Windows 安装策略");
|
|
790
790
|
|
|
791
791
|
const blockers = [];
|
|
792
|
-
const warnings = [];
|
|
793
792
|
const minimums = policy.minimums;
|
|
794
|
-
const recommended = policy.recommended;
|
|
795
793
|
if (!windowsPolicy.supported_product_types.includes(facts.productType)) {
|
|
796
794
|
blockers.push("仅支持 Windows 工作站版本,当前系统不是受支持的 Windows 工作站");
|
|
797
795
|
}
|
|
@@ -808,18 +806,12 @@ function evaluateWindowsPreflight(facts, policy, expectedUserSid) {
|
|
|
808
806
|
if (!facts.uacEnabled) blockers.push("必须启用 Windows UAC,才能安全执行需要管理员权限的固定操作");
|
|
809
807
|
if (Number(facts.cpuCores) < minimums.cpu_cores) {
|
|
810
808
|
blockers.push(`CPU 最低需要 ${minimums.cpu_cores} 核,当前 ${Number(facts.cpuCores) || 0} 核`);
|
|
811
|
-
} else if (Number(facts.cpuCores) < recommended.cpu_cores) {
|
|
812
|
-
warnings.push(`CPU ${Number(facts.cpuCores) || 0} 核低于推荐配置 ${recommended.cpu_cores} 核`);
|
|
813
809
|
}
|
|
814
810
|
if (Number(facts.memoryBytes) < minimums.memory_bytes) {
|
|
815
811
|
blockers.push(`内存最低需要 ${gibibytes(minimums.memory_bytes).toFixed(0)} GB,当前 ${gibibytes(facts.memoryBytes).toFixed(1)} GB`);
|
|
816
|
-
} else if (Number(facts.memoryBytes) < recommended.memory_bytes) {
|
|
817
|
-
warnings.push(`内存 ${gibibytes(facts.memoryBytes).toFixed(1)} GB 低于推荐配置 ${gibibytes(recommended.memory_bytes).toFixed(0)} GB`);
|
|
818
812
|
}
|
|
819
813
|
if (Number(facts.diskBytes) < minimums.disk_bytes) {
|
|
820
814
|
blockers.push(`可用磁盘最低需要 ${gibibytes(minimums.disk_bytes).toFixed(0)} GB,当前 ${gibibytes(facts.diskBytes).toFixed(1)} GB`);
|
|
821
|
-
} else if (Number(facts.diskBytes) < recommended.disk_bytes) {
|
|
822
|
-
warnings.push(`可用磁盘 ${gibibytes(facts.diskBytes).toFixed(1)} GB 低于推荐配置 ${gibibytes(recommended.disk_bytes).toFixed(0)} GB`);
|
|
823
815
|
}
|
|
824
816
|
if (!facts.virtualizationEnabled) blockers.push("未检测到可用的固件虚拟化,请先在 BIOS/UEFI 中启用虚拟化");
|
|
825
817
|
if (facts.wslInstalled && !windowsPolicy.networking_modes.includes(String(facts.wslNetworkingMode || "").toLowerCase())) {
|
|
@@ -856,7 +848,6 @@ function evaluateWindowsPreflight(facts, policy, expectedUserSid) {
|
|
|
856
848
|
return {
|
|
857
849
|
ok: blockers.length === 0,
|
|
858
850
|
blockers,
|
|
859
|
-
warnings,
|
|
860
851
|
effects: [
|
|
861
852
|
"启用 WSL 2 和虚拟机平台组件(可能需要重启 Windows)",
|
|
862
853
|
"安装或更新经过验证的 WSL 运行时",
|
|
@@ -17,7 +17,7 @@ description: Use for a user-requested, read-only Rainbond platform query about t
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
19
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
20
|
-
"package_version": "rainskills@0.1.
|
|
20
|
+
"package_version": "rainskills@0.1.25",
|
|
21
21
|
"runtime_status": [
|
|
22
22
|
"node",
|
|
23
23
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -17,7 +17,7 @@ description: "Use only when the user explicitly asks to initialize or link a loc
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
19
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
20
|
-
"package_version": "rainskills@0.1.
|
|
20
|
+
"package_version": "rainskills@0.1.25",
|
|
21
21
|
"runtime_status": [
|
|
22
22
|
"node",
|
|
23
23
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -17,7 +17,7 @@ description: "Use when the user explicitly asks to install a local or cloud Rain
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
19
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
20
|
-
"package_version": "rainskills@0.1.
|
|
20
|
+
"package_version": "rainskills@0.1.25",
|
|
21
21
|
"runtime_status": [
|
|
22
22
|
"node",
|
|
23
23
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|