rainskills 0.1.19 → 0.1.21
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 +34 -39
- package/SKILL.md +12 -10
- package/bin/rainskills-tools.js +114 -240
- package/bin/rainskills.js +134 -591
- package/install.sh +68 -94
- 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 +13 -11
- package/package.json +2 -2
- package/rainbond-app-assistant/SKILL.md +116 -151
- package/rainbond-app-version-assistant/SKILL.md +98 -98
- package/rainbond-delivery-verifier/SKILL.md +98 -68
- package/rainbond-env-sync/SKILL.md +98 -69
- package/rainbond-fullstack-bootstrap/SKILL.md +101 -89
- package/rainbond-fullstack-bootstrap/modules/10-context-loading.md +1 -1
- package/rainbond-fullstack-troubleshooter/SKILL.md +98 -68
- package/rainbond-opensource-app-deploy/SKILL.md +102 -81
- package/rainbond-platform-installer/SKILL.md +4 -4
- package/rainbond-platform-installer/scripts/auto-update.js +0 -9
- package/rainbond-platform-installer/scripts/installed-version.js +1 -1
- package/rainbond-platform-installer/scripts/platform-installer.js +3 -89
- package/rainbond-platform-installer/scripts/runtime-state.js +14 -251
- package/rainbond-platform-installer/scripts/single-runtime.js +114 -0
- package/rainbond-platform-installer/scripts/user-message.js +3 -49
- package/rainbond-platform-installer/scripts/windows-client-config.js +0 -51
- package/rainbond-platform-installer/scripts/windows-onboarding.js +0 -3
- package/rainbond-platform-installer/scripts/windows-platform.ps1 +1 -1
- package/rainbond-platform-query/SKILL.md +103 -61
- package/rainbond-project-init/SKILL.md +102 -79
- package/rainbond-template-installer/SKILL.md +102 -80
- package/rainbond-platform-installer/scripts/environment-credentials.js +0 -225
- package/rainbond-platform-installer/scripts/environment-registry.js +0 -349
- package/rainbond-platform-installer/scripts/local-runtime-commands.js +0 -180
- package/rainbond-platform-installer/scripts/local-runtime.js +0 -58
- package/rainbond-platform-installer/scripts/runtime-context-resolver.js +0 -189
- package/rainbond-platform-installer/scripts/runtime-credentials.js +0 -163
- package/rainbond-platform-installer/scripts/runtime-intents.js +0 -386
- package/rainbond-platform-installer/scripts/runtime-operations.js +0 -597
- package/rainbond-platform-installer/scripts/windows-client-config.ps1 +0 -9
- package/rainbond-platform-installer/scripts/windows-read-user-environment.ps1 +0 -16
|
@@ -38,94 +38,124 @@ description: "Use only when the user explicitly asks for a bounded build, runtim
|
|
|
38
38
|
<!-- rainskills-user-result:end -->
|
|
39
39
|
|
|
40
40
|
<!-- rainskills-runtime-gate:start -->
|
|
41
|
-
##
|
|
41
|
+
## 单运行环境 CLI 门禁(最高优先级)
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
本机只允许连接一个 Rainbond 运行环境。当前 Skill 在本会话第一次调用 Rainbond 前,执行固定 launcher 的 `runtime status --json`。返回 `connected` 且 `usable=true` 后,所有查询和变更直接通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行。不得配置或直接调用客户端 MCP,不得执行环境枚举或业务 operation 生命周期命令,也不得生成或传递运行环境 ID、业务 operation ID 或 intent JSON。
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
没有运行环境时,让用户选择 Rainbond Cloud 或一个已有/新建的私有 Rainbond,并执行对应的 `runtime connect`。连接和重新授权必须进入浏览器 Device Flow,不复用 Shell 中缓存的 JWT;新凭据通过 live probe 后才覆盖唯一运行环境。CLI 返回 401 时,只读调用可在 `runtime reconnect` 成功后重试一次;写调用不得自动重放,必须先查询平台真实状态。403 直接停止,不重新授权。
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
`context resolve` 是无状态调用:单一工作空间直接返回上下文,多个候选返回组合选项;用户选择后由当前任务直接携带 team/region 参数,不执行 `context select`,不写本地 operation。所有可变 `call` 仍需先取得 confirmation ID,再以完全相同的输入追加 `--confirm` 执行一次。
|
|
48
48
|
|
|
49
|
-
Node.js 前置检查通过后,每次请求先执行本地 launcher + `["environment", "list", "--json"]`,按用户明确指定的运行环境选择不可变环境 ID;未指定时只用全局默认环境,默认不可用时停止且不回退。生成 UUID 后执行本地 launcher + `["operation", "begin", "--operation-id", "<uuid>", "--environment-id", "<id>", "--intent-json", "<intent-json>"]`,并在之后每个 Rainbond MCP 调用中加入 `rainskills_operation_id`。环境、团队和应用只属于本次操作,禁止保存项目绑定;同一项目可以部署到多个环境。明确“团队”表示环境内团队;明确“运行环境/平台”表示环境;裸名称同时匹配环境和团队时必须询问。
|
|
50
|
-
|
|
51
|
-
第一步检查 Node.js 是否存在且主版本不低于 18。Node.js 缺失或低于 18 时,只说明“Rainskills 执行组件需要 Node.js 18 或更高版本”并停止:不选择运行环境,不调用 MCP,不猜测替代命令。只有用户或 agent 明确同意后才安装或升级 Node.js,再从同一原始 intent 继续。
|
|
52
|
-
|
|
53
|
-
固定 launcher 是 `["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"]`;运行包版本标记为 `rainskills@0.1.19`,且必须与本技能包 `package.json` 一致。把 launcher 与参数拼成 argv 数组直接执行,禁止 `rainskills@latest` 或执行 shell 字符串。
|
|
54
|
-
|
|
55
|
-
本地 launcher 必须从当前 Skill 所在目录的同级目录定位 `rainbond-platform-installer/scripts/local-runtime.js`,解析为绝对路径后使用 `["node", "<绝对路径>"]` 执行。`environment list`、`operation begin`、`operation complete` 和 `runtime message` 只能使用本地 launcher;本地 launcher 只读取已安装文件和本机受保护状态,不得访问 npm 或其它网络。只有用户选定连接运行环境后,才使用上面的固定本地 launcher。
|
|
56
|
-
|
|
57
|
-
所有 Rainbond 查询和变更必须通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行,并绑定本次 operation ID。禁止 Agent 直接调用 Rainbond MCP,也不得启动本地 Rainskills MCP 服务;只允许执行 CLI 返回的结构化结果与确认续接 argv。
|
|
58
|
-
|
|
59
|
-
业务操作开始后,必须使用 runtime contract 的 `input_commands.context-resolve` 完整 argv 和配套 stdin。返回 `resolved` 时只使用该 operation 已保存的企业、工作空间和集群上下文;返回 `needs-selection` 时,把 CLI 返回的“工作空间 + 集群”组合选项一次性列给用户,不得逐项询问,也不得让用户提供 enterprise_id。用户选择后必须使用 `input_commands.context-select` 的完整 argv 和配套 stdin;选择成功后继续原操作,同一 operation 不再重复查询上下文。
|
|
60
|
-
|
|
61
|
-
只有 CLI 返回并通过校验的 `rainskills.next-action.v1` argv 才能执行续接。普通失败一律禁止自动重试:不得再次执行原命令,不得执行 `--help`、`sleep`、`rg`、`grep`,不得搜索 Rainskills 源码;同一 `operation complete` 最多执行一次。
|
|
62
|
-
|
|
63
|
-
<!-- rainskills-runtime-contract:start -->
|
|
64
49
|
```json
|
|
65
50
|
{
|
|
66
|
-
"schema": "rainskills.
|
|
67
|
-
"package_version": "rainskills@0.1.
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
51
|
+
"schema": "rainskills.single-runtime-contract.v1",
|
|
52
|
+
"package_version": "rainskills@0.1.21",
|
|
53
|
+
"runtime_status": [
|
|
54
|
+
"node",
|
|
55
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
56
|
+
"runtime",
|
|
57
|
+
"status",
|
|
58
|
+
"--json"
|
|
59
|
+
],
|
|
60
|
+
"runtime_connect": {
|
|
61
|
+
"saas": [
|
|
62
|
+
"node",
|
|
63
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
64
|
+
"runtime",
|
|
65
|
+
"connect",
|
|
66
|
+
"<target>",
|
|
67
|
+
"--saas"
|
|
68
|
+
],
|
|
69
|
+
"private_existing": [
|
|
70
|
+
"node",
|
|
71
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
72
|
+
"runtime",
|
|
73
|
+
"connect",
|
|
74
|
+
"<target>",
|
|
75
|
+
"--rainbond-url",
|
|
76
|
+
"<console-origin>"
|
|
77
|
+
],
|
|
78
|
+
"install_private": [
|
|
79
|
+
"node",
|
|
80
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
81
|
+
"runtime",
|
|
82
|
+
"connect",
|
|
83
|
+
"<target>",
|
|
84
|
+
"--install-private",
|
|
85
|
+
"--location",
|
|
86
|
+
"<local-or-server>"
|
|
87
|
+
],
|
|
88
|
+
"reconnect": [
|
|
89
|
+
"node",
|
|
90
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
91
|
+
"runtime",
|
|
92
|
+
"reconnect",
|
|
93
|
+
"<target>"
|
|
94
|
+
]
|
|
98
95
|
},
|
|
99
96
|
"input_commands": {
|
|
100
|
-
"
|
|
101
|
-
"argv": [
|
|
97
|
+
"context_resolve": {
|
|
98
|
+
"argv": [
|
|
99
|
+
"node",
|
|
100
|
+
"<home>/.rainbond/bin/rainskills-tools.js",
|
|
101
|
+
"context",
|
|
102
|
+
"resolve",
|
|
103
|
+
"--input",
|
|
104
|
+
"-",
|
|
105
|
+
"--skill-id",
|
|
106
|
+
"rainbond-fullstack-troubleshooter"
|
|
107
|
+
],
|
|
102
108
|
"stdin": {
|
|
103
|
-
"required": [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "context", "select", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-fullstack-troubleshooter"],
|
|
108
|
-
"stdin": {
|
|
109
|
-
"selection_id": "<selection-id>",
|
|
110
|
-
"option_id": "<option-id>"
|
|
109
|
+
"required": [
|
|
110
|
+
"enterprise",
|
|
111
|
+
"workspace"
|
|
112
|
+
]
|
|
111
113
|
}
|
|
112
114
|
},
|
|
113
115
|
"read": {
|
|
114
|
-
"argv": [
|
|
116
|
+
"argv": [
|
|
117
|
+
"node",
|
|
118
|
+
"<home>/.rainbond/bin/rainskills-tools.js",
|
|
119
|
+
"read",
|
|
120
|
+
"<tool>",
|
|
121
|
+
"--input",
|
|
122
|
+
"-",
|
|
123
|
+
"--skill-id",
|
|
124
|
+
"rainbond-fullstack-troubleshooter"
|
|
125
|
+
],
|
|
115
126
|
"stdin_schema_source": "tool-catalog"
|
|
116
127
|
},
|
|
117
128
|
"call": {
|
|
118
|
-
"argv": [
|
|
129
|
+
"argv": [
|
|
130
|
+
"node",
|
|
131
|
+
"<home>/.rainbond/bin/rainskills-tools.js",
|
|
132
|
+
"call",
|
|
133
|
+
"<tool>",
|
|
134
|
+
"--input",
|
|
135
|
+
"-",
|
|
136
|
+
"--skill-id",
|
|
137
|
+
"rainbond-fullstack-troubleshooter"
|
|
138
|
+
],
|
|
119
139
|
"stdin_schema_source": "tool-catalog"
|
|
140
|
+
},
|
|
141
|
+
"call_confirm": {
|
|
142
|
+
"argv": [
|
|
143
|
+
"node",
|
|
144
|
+
"<home>/.rainbond/bin/rainskills-tools.js",
|
|
145
|
+
"call",
|
|
146
|
+
"<tool>",
|
|
147
|
+
"--input",
|
|
148
|
+
"-",
|
|
149
|
+
"--skill-id",
|
|
150
|
+
"rainbond-fullstack-troubleshooter",
|
|
151
|
+
"--confirm",
|
|
152
|
+
"<confirmation-id>"
|
|
153
|
+
],
|
|
154
|
+
"stdin_schema_source": "same-confirmed-input"
|
|
120
155
|
}
|
|
121
156
|
}
|
|
122
157
|
}
|
|
123
158
|
```
|
|
124
|
-
<!-- rainskills-runtime-contract:end -->
|
|
125
|
-
|
|
126
|
-
target 只允许 `codex`、`claude`、`pi`、`all`。校验 intent 后只执行 existing scope 的完整 argv;只消费 schema 为 `rainskills.next-action.v1` 且校验后的 `argv` 数组。
|
|
127
|
-
|
|
128
|
-
连接完成后用固定 `onboarding-id` 执行 launcher + `["intent", "resume", "--onboarding-id", "<同一 onboarding-id>"]`,恢复原始 intent 和 `resume_step`。401 先执行 launcher + `["runtime", "record-failure", "--onboarding-id", "<同一 onboarding-id>", "--step", "<当前固定步骤>", "--reason", "credential-expired"]`,再仅一次执行 launcher + `["runtime", "reconnect", "--onboarding-id", "<同一 onboarding-id>"]` 后 resume,只重试该步骤;第二次 401 停止。403 执行 launcher + `["runtime", "record-failure", "--onboarding-id", "<同一 onboarding-id>", "--step", "<当前固定步骤>", "--reason", "permission-denied"]` 后停止,不得 reconnect、重新授权或自动重试。
|
|
129
159
|
<!-- rainskills-runtime-gate:end -->
|
|
130
160
|
|
|
131
161
|
受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
|
|
@@ -6,97 +6,124 @@ description: "Use when a user wants to deploy an open-source application that is
|
|
|
6
6
|
# Rainbond Open-source App Deploy
|
|
7
7
|
|
|
8
8
|
<!-- rainskills-runtime-gate:start -->
|
|
9
|
-
##
|
|
9
|
+
## 单运行环境 CLI 门禁(最高优先级)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
本机只允许连接一个 Rainbond 运行环境。当前 Skill 在本会话第一次调用 Rainbond 前,执行固定 launcher 的 `runtime status --json`。返回 `connected` 且 `usable=true` 后,所有查询和变更直接通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行。不得配置或直接调用客户端 MCP,不得执行环境枚举或业务 operation 生命周期命令,也不得生成或传递运行环境 ID、业务 operation ID 或 intent JSON。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
没有运行环境时,让用户选择 Rainbond Cloud 或一个已有/新建的私有 Rainbond,并执行对应的 `runtime connect`。连接和重新授权必须进入浏览器 Device Flow,不复用 Shell 中缓存的 JWT;新凭据通过 live probe 后才覆盖唯一运行环境。CLI 返回 401 时,只读调用可在 `runtime reconnect` 成功后重试一次;写调用不得自动重放,必须先查询平台真实状态。403 直接停止,不重新授权。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
`context resolve` 是无状态调用:单一工作空间直接返回上下文,多个候选返回组合选项;用户选择后由当前任务直接携带 team/region 参数,不执行 `context select`,不写本地 operation。所有可变 `call` 仍需先取得 confirmation ID,再以完全相同的输入追加 `--confirm` 执行一次。
|
|
16
16
|
|
|
17
|
-
Node.js 前置检查通过后,每次请求先执行本地 launcher + `["environment", "list", "--json"]`,按用户明确指定的运行环境选择不可变环境 ID;未指定时只用全局默认环境,默认不可用时停止且不回退。生成 UUID 后执行本地 launcher + `["operation", "begin", "--operation-id", "<uuid>", "--environment-id", "<id>", "--intent-json", "<intent-json>"]`。此后每个 Rainbond 能力调用只能通过受保护的本地 Rainskills CLI 执行,并携带同一 operation ID;CLI 会将 `rainskills_operation_id` 写入审计元数据。环境、团队和应用只属于本次操作,禁止保存项目级绑定;同一项目可以部署到多个环境。明确“团队”表示环境内团队;明确“运行环境/平台”表示环境;裸名称同时匹配环境和团队时必须询问确认。
|
|
18
|
-
|
|
19
|
-
用户只给出 Harbor 这类应用名称、没有 Compose、Helm 或镜像描述符时,不得猜测 `source_kind` 或构造 `opensource-deploy` intent;改由 `rainbond-app-assistant` 以其通用部署 intent 启动。只有已有描述符时才使用本 Skill,并且 intent 必须同时包含 `type: "opensource-deploy"` 和该描述符对应的 `source_kind`。
|
|
20
|
-
|
|
21
|
-
第一步检查 Node.js 是否存在且主版本不低于 18。Node.js 缺失或低于 18 时,只说明“Rainskills 执行组件需要 Node.js 18 或更高版本”并停止:不选择运行环境,不调用 MCP,不猜测替代命令。只有用户或 agent 明确同意后才安装或升级 Node.js,再从同一原始 intent 继续。
|
|
22
|
-
|
|
23
|
-
固定 launcher 是 `["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"]`;运行包版本标记为 `rainskills@0.1.19`,且必须与本技能包 `package.json` 一致。把 launcher 与参数拼成 argv 数组直接执行,禁止 `rainskills@latest`,禁止拼接或执行 shell 字符串。
|
|
24
|
-
|
|
25
|
-
本地 launcher 必须从当前 Skill 所在目录的同级目录定位 `rainbond-platform-installer/scripts/local-runtime.js`,解析为绝对路径后使用 `["node", "<绝对路径>"]` 执行。`environment list`、`operation begin`、`operation complete` 和 `runtime message` 只能使用本地 launcher;本地 launcher 只读取已安装文件和本机受保护状态,不得访问 npm 或其它网络。只有用户选定连接或安装运行环境后,才使用固定 launcher。
|
|
26
|
-
|
|
27
|
-
所有 Rainbond 查询和变更都必须执行本地 `~/.rainbond/bin/rainskills-tools.js`,不得让 Agent 直接调用 Rainbond MCP,也不得启动本地 Rainskills MCP 服务。固定业务 argv 为 `["node", "<home>/.rainbond/bin/rainskills-tools.js", "<status|list|describe|read|call>", "...", "--operation-id", "<uuid>", "--skill-id", "rainbond-opensource-app-deploy"]`;写操作必须只消费 CLI 返回的确认 ID,再用同一 argv 加 `--confirm <confirmation-id>` 执行。
|
|
28
|
-
|
|
29
|
-
业务操作开始后,必须使用 runtime contract 的 `input_commands.context-resolve` 完整 argv 和配套 stdin。返回 `resolved` 时只使用该 operation 已保存的企业、工作空间和集群上下文;返回 `needs-selection` 时,把 CLI 返回的“工作空间 + 集群”组合选项一次性列给用户,不得逐项询问,也不得让用户提供 enterprise_id。用户选择后必须使用 `input_commands.context-select` 的完整 argv 和配套 stdin;选择成功后继续原操作,同一 operation 不再重复查询上下文。
|
|
30
|
-
|
|
31
|
-
只有 CLI 返回并通过校验的 `rainskills.next-action.v1` argv 才能执行续接。普通失败一律禁止自动重试:不得再次执行原命令,不得执行 `--help`、`sleep`、`rg`、`grep`,不得搜索 Rainskills 源码;同一 `operation complete` 最多执行一次。
|
|
32
|
-
|
|
33
|
-
<!-- rainskills-runtime-contract:start -->
|
|
34
17
|
```json
|
|
35
18
|
{
|
|
36
|
-
"schema": "rainskills.
|
|
37
|
-
"package_version": "rainskills@0.1.
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
19
|
+
"schema": "rainskills.single-runtime-contract.v1",
|
|
20
|
+
"package_version": "rainskills@0.1.21",
|
|
21
|
+
"runtime_status": [
|
|
22
|
+
"node",
|
|
23
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
24
|
+
"runtime",
|
|
25
|
+
"status",
|
|
26
|
+
"--json"
|
|
27
|
+
],
|
|
28
|
+
"runtime_connect": {
|
|
29
|
+
"saas": [
|
|
30
|
+
"node",
|
|
31
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
32
|
+
"runtime",
|
|
33
|
+
"connect",
|
|
34
|
+
"<target>",
|
|
35
|
+
"--saas"
|
|
36
|
+
],
|
|
37
|
+
"private_existing": [
|
|
38
|
+
"node",
|
|
39
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
40
|
+
"runtime",
|
|
41
|
+
"connect",
|
|
42
|
+
"<target>",
|
|
43
|
+
"--rainbond-url",
|
|
44
|
+
"<console-origin>"
|
|
45
|
+
],
|
|
46
|
+
"install_private": [
|
|
47
|
+
"node",
|
|
48
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
49
|
+
"runtime",
|
|
50
|
+
"connect",
|
|
51
|
+
"<target>",
|
|
52
|
+
"--install-private",
|
|
53
|
+
"--location",
|
|
54
|
+
"<local-or-server>"
|
|
55
|
+
],
|
|
56
|
+
"reconnect": [
|
|
57
|
+
"node",
|
|
58
|
+
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
59
|
+
"runtime",
|
|
60
|
+
"reconnect",
|
|
61
|
+
"<target>"
|
|
62
|
+
]
|
|
69
63
|
},
|
|
70
64
|
"input_commands": {
|
|
71
|
-
"
|
|
72
|
-
"argv": [
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
"context_resolve": {
|
|
66
|
+
"argv": [
|
|
67
|
+
"node",
|
|
68
|
+
"<home>/.rainbond/bin/rainskills-tools.js",
|
|
69
|
+
"context",
|
|
70
|
+
"resolve",
|
|
71
|
+
"--input",
|
|
72
|
+
"-",
|
|
73
|
+
"--skill-id",
|
|
74
|
+
"rainbond-opensource-app-deploy"
|
|
75
|
+
],
|
|
79
76
|
"stdin": {
|
|
80
|
-
"
|
|
81
|
-
|
|
77
|
+
"required": [
|
|
78
|
+
"enterprise",
|
|
79
|
+
"workspace"
|
|
80
|
+
]
|
|
82
81
|
}
|
|
83
82
|
},
|
|
84
83
|
"read": {
|
|
85
|
-
"argv": [
|
|
84
|
+
"argv": [
|
|
85
|
+
"node",
|
|
86
|
+
"<home>/.rainbond/bin/rainskills-tools.js",
|
|
87
|
+
"read",
|
|
88
|
+
"<tool>",
|
|
89
|
+
"--input",
|
|
90
|
+
"-",
|
|
91
|
+
"--skill-id",
|
|
92
|
+
"rainbond-opensource-app-deploy"
|
|
93
|
+
],
|
|
86
94
|
"stdin_schema_source": "tool-catalog"
|
|
87
95
|
},
|
|
88
96
|
"call": {
|
|
89
|
-
"argv": [
|
|
97
|
+
"argv": [
|
|
98
|
+
"node",
|
|
99
|
+
"<home>/.rainbond/bin/rainskills-tools.js",
|
|
100
|
+
"call",
|
|
101
|
+
"<tool>",
|
|
102
|
+
"--input",
|
|
103
|
+
"-",
|
|
104
|
+
"--skill-id",
|
|
105
|
+
"rainbond-opensource-app-deploy"
|
|
106
|
+
],
|
|
90
107
|
"stdin_schema_source": "tool-catalog"
|
|
108
|
+
},
|
|
109
|
+
"call_confirm": {
|
|
110
|
+
"argv": [
|
|
111
|
+
"node",
|
|
112
|
+
"<home>/.rainbond/bin/rainskills-tools.js",
|
|
113
|
+
"call",
|
|
114
|
+
"<tool>",
|
|
115
|
+
"--input",
|
|
116
|
+
"-",
|
|
117
|
+
"--skill-id",
|
|
118
|
+
"rainbond-opensource-app-deploy",
|
|
119
|
+
"--confirm",
|
|
120
|
+
"<confirmation-id>"
|
|
121
|
+
],
|
|
122
|
+
"stdin_schema_source": "same-confirmed-input"
|
|
91
123
|
}
|
|
92
124
|
}
|
|
93
125
|
}
|
|
94
126
|
```
|
|
95
|
-
<!-- rainskills-runtime-contract:end -->
|
|
96
|
-
|
|
97
|
-
target 只允许 `codex`、`claude`、`pi`、`all`。校验 intent 后只执行 new scope 的完整 argv;只消费 schema 为 `rainskills.next-action.v1` 且完成字段校验后的 `argv` 数组。
|
|
98
|
-
|
|
99
|
-
连接完成后用固定 `onboarding-id` 执行 launcher + `["intent", "resume", "--onboarding-id", "<同一 onboarding-id>"]`,恢复原始 intent 和 `resume_step`。401 先执行 launcher + `["runtime", "record-failure", "--onboarding-id", "<同一 onboarding-id>", "--step", "<当前固定步骤>", "--reason", "credential-expired"]`,再仅一次执行 launcher + `["runtime", "reconnect", "--onboarding-id", "<同一 onboarding-id>"]` 后 resume,只重试该步骤;第二次 401 停止。403 执行 launcher + `["runtime", "record-failure", "--onboarding-id", "<同一 onboarding-id>", "--step", "<当前固定步骤>", "--reason", "permission-denied"]` 后停止,不得 reconnect、重新授权或自动重试。
|
|
100
127
|
<!-- rainskills-runtime-gate:end -->
|
|
101
128
|
|
|
102
129
|
受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
|
|
@@ -115,17 +142,11 @@ target 只允许 `codex`、`claude`、`pi`、`all`。校验 intent 后只执行
|
|
|
115
142
|
请提示“请选择应用要运行的环境:”,并只显示:
|
|
116
143
|
|
|
117
144
|
1) 云端环境(免费体验)
|
|
118
|
-
2)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
请选择部署位置:
|
|
123
|
-
|
|
124
|
-
1、部署到本机
|
|
125
|
-
2、部署到独立服务器
|
|
126
|
-
3、部署到已有 Rainbond
|
|
145
|
+
2) 本机环境
|
|
146
|
+
3) 独立服务器
|
|
147
|
+
4) 已有 Rainbond
|
|
127
148
|
|
|
128
|
-
选择 1 时执行 `install-private` 并使用 `["--location", "local"]`;选择
|
|
149
|
+
选择 1 时执行 `saas` route;选择 2 时执行 `install-private` 并使用 `["--location", "local"]`;选择 3 时执行 `install-private` 并使用 `["--location", "server"]`;选择 4 时执行本地 launcher + `["runtime", "message", "--id", "private-console-origin"]` 后执行 `private-existing`。不得显示“私有环境”或部署位置中间层,不得在运行环境准备完成前继续读取或修改部署描述文件。
|
|
129
150
|
<!-- rainskills-runtime-routing:end -->
|
|
130
151
|
|
|
131
152
|
## 部署类 skill 怎么选
|
|
@@ -32,8 +32,8 @@ 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.
|
|
36
|
-
3.
|
|
35
|
+
2. Use the installed local launcher `["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"]`; its protected runtime package marker is `rainskills@0.1.21` 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
|
+
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 连接或修改服务器。
|
|
39
39
|
6. 如果 helper 输出 `platform.host-cluster-server-input`,只原样展示受保护 `servers.txt` 的固定正文并等待用户回复“已完成”,随后在原任务中重跑同一安装 argv。若输出 `platform.ssh-authentication`,同样只原样展示正文并等待;单台服务器消息包含一条 `ssh prepare`,主机集群消息必须一次列出全部未就绪节点及一条 `ssh prepare-cluster`,不得按节点拆成多轮。确认后的主机集群安装必须保持当前任务附着,直至安装、验证和授权完成;若收到 `RAINSKILLS_OPERATION_LOCK_BUSY`,继续等待已经记录的会话,不得重试或中断它。若会话因 SIGINT/SIGTERM 结束,只能在同一任务用匹配的 `--agent-handoff --yes` 进行安全恢复。不得只凭官方脚本退出码推断成功。
|
|
@@ -43,7 +43,7 @@ Do not use it to deploy an application to an existing Rainbond. Route those requ
|
|
|
43
43
|
<!-- rainskills-platform-routing:start -->
|
|
44
44
|
## Progressive Target Routing
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
只有用户直接要求安装 Rainbond 平台且尚未选择部署位置时,第一层原样展示:
|
|
47
47
|
|
|
48
48
|
```text
|
|
49
49
|
请选择部署位置:
|
|
@@ -91,7 +91,7 @@ SSH 免密连接检查必须先检查全部节点。存在未就绪节点时,
|
|
|
91
91
|
|
|
92
92
|
## Interaction Rules
|
|
93
93
|
|
|
94
|
-
- Linux、macOS 和 Windows
|
|
94
|
+
- 只有尚未由业务 Skill 四项菜单选定位置时,Linux、macOS 和 Windows 才使用 Progressive Target Routing 中同一份三项部署位置消息;不得根据操作系统生成另一套选项或默认选中任何位置。
|
|
95
95
|
- 选择部署到本机后再按控制端系统进入对应本地实现:macOS 使用 OrbStack;Windows 使用专用 WSL2 发行版和固定 `local-windows` helper。不要把这些实现差异写入第一层选择文案。
|
|
96
96
|
- Do not ask the user to understand or enter WSL commands. Show the read-only checks first, then explain UAC, downloads, host networking, and a possible Windows reboot before requesting confirmation.
|
|
97
97
|
- Let the fixed helper request UAC. If Windows must reboot, preserve the checkpoint and use only the verified resume task or exact printed resume command.
|
|
@@ -622,15 +622,6 @@ function hasActiveOperation({
|
|
|
622
622
|
stateStore
|
|
623
623
|
);
|
|
624
624
|
if (onboarding && onboarding.stage !== "configured") return true;
|
|
625
|
-
const operationsDirectory = path.join(home, ".rainbond", "rainskills", "operations");
|
|
626
|
-
if (!fs.existsSync(operationsDirectory)) return false;
|
|
627
|
-
const directoryInfo = fs.lstatSync(operationsDirectory);
|
|
628
|
-
if (directoryInfo.isSymbolicLink() || !directoryInfo.isDirectory()) return true;
|
|
629
|
-
for (const entry of fs.readdirSync(operationsDirectory, { withFileTypes: true })) {
|
|
630
|
-
if (!entry.isFile() || !entry.name.endsWith(".json")) return true;
|
|
631
|
-
const operation = stateStore.readProtectedJson(path.join(operationsDirectory, entry.name));
|
|
632
|
-
if (["awaiting-environment", "active"].includes(operation?.stage)) return true;
|
|
633
|
-
}
|
|
634
625
|
return false;
|
|
635
626
|
} catch {
|
|
636
627
|
return true;
|