rainskills 0.1.35 → 0.1.37
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/bin/rainskills-tools.js +10 -3
- package/install.sh +3 -2
- 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/SKILL.md +1 -1
- package/rainbond-app-assistant/evals/04-delivered-stop-without-promotion.response.md +7 -0
- package/rainbond-app-assistant/evals/11-delivered-with-proxy-and-local-binding.response.md +7 -0
- package/rainbond-app-assistant/evals/16-source-delivered-manual-validation.response.md +7 -0
- package/rainbond-app-assistant/references/output-contract.md +17 -0
- package/rainbond-app-assistant/references/runtime-gate.md +2 -2
- package/rainbond-app-assistant/references/workflow-rules.md +10 -1
- package/rainbond-app-version-assistant/SKILL.md +1 -1
- package/rainbond-delivery-verifier/SKILL.md +8 -1
- package/rainbond-env-sync/SKILL.md +1 -1
- package/rainbond-fullstack-bootstrap/SKILL.md +2 -2
- 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/scripts/installed-version.js +1 -1
- package/rainbond-platform-installer/scripts/platform-installer.js +3 -0
- package/rainbond-platform-installer/scripts/telemetry.js +5 -2
- 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/scripts/validate_customer_output.py +19 -0
package/README.md
CHANGED
|
@@ -247,7 +247,7 @@ node ~/.rainbond/lib/rainskills/bin/rainskills.js platform install --onboarding-
|
|
|
247
247
|
|
|
248
248
|
Rainskills 会在用户下一次发起业务动作时,由本地运行时立即返回环境查询结果,并另行启动后台任务静默检查更新。更新只跟随 npm `latest` 指向的正式版。当前版本是 RC 或其他预发布版本时不会查询、不会自动升级;npm 上的新 RC 版本也不参与正式版自动升级。
|
|
249
249
|
|
|
250
|
-
发现更高的正式版后,后台任务只委托到经过校验的精确版本,例如 `rainskills@0.1.
|
|
250
|
+
发现更高的正式版后,后台任务只委托到经过校验的精确版本,例如 `rainskills@0.1.37`,不会执行浮动的 `@latest` 业务代码。新版本原子刷新已经安装的 Rainskills Skills;当前业务继续使用启动时已经加载的版本,最迟从下一条新任务开始使用新版。npm 超时、版本检查失败、安装位置不安全或文件迁移失败时会保留旧版本,且不会阻塞或改变当前操作。
|
|
251
251
|
|
|
252
252
|
升级只更新 Rainskills 自身,不触发 Rainbond 安装、运行环境选择、登录授权或重新对接,也不会新增 Agent MCP 配置。更新内容仅包括 Skills 和本地 CLI。原始业务操作会继续执行;只有该业务操作本身需要运行环境时,才按既有门禁检查当前连接。可用连接直接复用,401 只重新授权一次,403 立即停止,从未连接过运行环境时才进入环境选择。
|
|
253
253
|
|
package/SKILL.md
CHANGED
|
@@ -54,7 +54,7 @@ Hermes Agent 中必须使用 `terminal` 以 `background=true` 启动授权命令
|
|
|
54
54
|
|
|
55
55
|
DeepSeek Harness 和 WorkBuddy 也必须保持原命令附着直到退出;如果宿主把长命令转成持久终端或后台任务,只能轮询该原始命令句柄,不得另起 `runtime status` 推测授权结果。WorkBuddy 安装后若当前任务的 Skill 清单尚未刷新,在下一条业务动作前先刷新 Skill 列表或新建任务,不得退回内置 Sites 代替 Rainbond 部署。
|
|
56
56
|
|
|
57
|
-
Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.
|
|
57
|
+
Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.37`):
|
|
58
58
|
|
|
59
59
|
- 状态:执行 `runtime status --json`。
|
|
60
60
|
- 首次连接:执行 `runtime connect <target> --saas` 或 `runtime connect <target> --rainbond-url <Console origin>`。
|
package/bin/rainskills-tools.js
CHANGED
|
@@ -478,7 +478,10 @@ async function executeWithUsageTelemetry(command, config) {
|
|
|
478
478
|
const telemetry = tracksUsage ? createBridgeTelemetry(config) : null;
|
|
479
479
|
if (telemetry) await telemetry.flushPending(3).catch(() => {});
|
|
480
480
|
try {
|
|
481
|
-
const
|
|
481
|
+
const executionCommand = telemetry?.installationId
|
|
482
|
+
? { ...command, telemetryInstallationId: telemetry.installationId }
|
|
483
|
+
: command;
|
|
484
|
+
const output = await execute(executionCommand, config);
|
|
482
485
|
if (telemetry) {
|
|
483
486
|
const firstUse = telemetry.recordFirstUse("success");
|
|
484
487
|
const active = telemetry.recordActiveDaily();
|
|
@@ -1362,8 +1365,12 @@ async function execute(command, config) {
|
|
|
1362
1365
|
arguments: argumentsValue,
|
|
1363
1366
|
};
|
|
1364
1367
|
if (operation) {
|
|
1365
|
-
params._meta = {
|
|
1366
|
-
|
|
1368
|
+
params._meta = { "com.rainbond/rainskills": buildAuditMetadata(operation, skillBinding) };
|
|
1369
|
+
}
|
|
1370
|
+
if (command.telemetryInstallationId) {
|
|
1371
|
+
params._meta ||= {};
|
|
1372
|
+
params._meta["com.rainbond/telemetry"] = {
|
|
1373
|
+
installation_id: command.telemetryInstallationId,
|
|
1367
1374
|
};
|
|
1368
1375
|
}
|
|
1369
1376
|
const result = await rpcRequest(config, "tools/call", params);
|
package/install.sh
CHANGED
|
@@ -558,7 +558,7 @@ PY
|
|
|
558
558
|
event_id="$(python3 -c 'import json,sys; print(json.load(sys.stdin)["event_id"])' <<<"$payload" 2>/dev/null || true)"
|
|
559
559
|
pending_file="$telemetry_dir/pending-v2/${event_id}.json"
|
|
560
560
|
(
|
|
561
|
-
if curl --silent --show-error --connect-timeout 2 --max-time 3 \
|
|
561
|
+
if curl --silent --show-error --fail --connect-timeout 2 --max-time 3 \
|
|
562
562
|
-X POST "$RAINSKILLS_TELEMETRY_REPORT_URL" \
|
|
563
563
|
-H 'Content-Type: application/json' \
|
|
564
564
|
--data-binary "$payload" >/dev/null 2>&1; then
|
|
@@ -754,7 +754,7 @@ report_rainskills_lifecycle_event() {
|
|
|
754
754
|
local blocked_reason="${6:-}"
|
|
755
755
|
local auth_method="${7:-}"
|
|
756
756
|
|
|
757
|
-
|
|
757
|
+
rainskills_v2_enabled || return 0
|
|
758
758
|
[[ -n "$RAINSKILLS_INSTALL_ATTEMPT_ID" ]] || return 0
|
|
759
759
|
command -v python3 >/dev/null 2>&1 || return 0
|
|
760
760
|
RAINSKILLS_TELEMETRY_SEQUENCE=$((RAINSKILLS_TELEMETRY_SEQUENCE + 1))
|
|
@@ -1066,6 +1066,7 @@ handle_installer_exit() {
|
|
|
1066
1066
|
cleanup_device_flow
|
|
1067
1067
|
cleanup_mcp_validation
|
|
1068
1068
|
report_unhandled_rainskills_installation_failure "$exit_code"
|
|
1069
|
+
wait || true
|
|
1069
1070
|
}
|
|
1070
1071
|
|
|
1071
1072
|
die() {
|
|
@@ -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.37 <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
|
|
|
@@ -54,7 +54,7 @@ Hermes Agent 中必须使用 `terminal` 以 `background=true` 启动授权命令
|
|
|
54
54
|
|
|
55
55
|
DeepSeek Harness 和 WorkBuddy 也必须保持原命令附着直到退出;如果宿主把长命令转成持久终端或后台任务,只能轮询该原始命令句柄,不得另起 `runtime status` 推测授权结果。WorkBuddy 安装后若当前任务的 Skill 清单尚未刷新,在下一条业务动作前先刷新 Skill 列表或新建任务,不得退回内置 Sites 代替 Rainbond 部署。
|
|
56
56
|
|
|
57
|
-
Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.
|
|
57
|
+
Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.37`):
|
|
58
58
|
|
|
59
59
|
- 状态:执行 `runtime status --json`。
|
|
60
60
|
- 首次连接:执行 `runtime connect <target> --saas` 或 `runtime connect <target> --rainbond-url <Console origin>`。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rainskills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.37",
|
|
4
4
|
"description": "Interactive Rainbond skill installer for Codex, Claude Code, Pi Agent, DeepSeek Harness, WorkBuddy, and Hermes Agent",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/goodrain/rainskills#readme",
|
|
@@ -56,7 +56,7 @@ workspace context 包含 `enterprise_id`、`team_id`、`team_name` 和 `region_n
|
|
|
56
56
|
|
|
57
57
|
普通请求只给用户可用的中文结果:
|
|
58
58
|
|
|
59
|
-
-
|
|
59
|
+
- 成功:只报真实交付结果;加载 [output contract](references/output-contract.md),以“部署成功后的固定动作块”收尾。
|
|
60
60
|
- 未完成:输出“部署失败。”、一句直接原因;仅在确有安全可执行方案时增加“解决办法”。
|
|
61
61
|
- 默认不得展示内部对象、状态枚举、Skill/工具名、YAML、JSON 或英文编排标题。
|
|
62
62
|
- 过程消息和最终结果中的工作空间一律用 `team_name` 展示,可连同 `region_name` 写成“工作空间 / 集群”;除非用户明确要求调试原始数据,不展示 `team_id`。
|
|
@@ -46,6 +46,16 @@
|
|
|
46
46
|
- when browser confirmation remains, add at most one short validation note
|
|
47
47
|
- include proxy/mirror usage when it affected the deployment
|
|
48
48
|
- include warnings that matter after delivery, such as development-only database auth or missing production persistence
|
|
49
|
+
- every reply whose result line is `部署成功。` or `部署成功,待浏览器访问确认。` must append the following fixed block exactly once after all other sections, with no prose after it:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
你接下来可以:
|
|
53
|
+
|
|
54
|
+
1. 修改代码并重新部署
|
|
55
|
+
2. 将当前应用创建快照发布版本,用于部署到生产环境
|
|
56
|
+
3. 查看运行日志
|
|
57
|
+
4. 将应用迁移到自己的 Rainbond
|
|
58
|
+
```
|
|
49
59
|
- do not expose orchestration enums, lower-level skill names, `Blocking Issue: none`, or the internal action ledger
|
|
50
60
|
|
|
51
61
|
Default concise section order:
|
|
@@ -75,6 +85,13 @@
|
|
|
75
85
|
|
|
76
86
|
### 处理记录
|
|
77
87
|
- 使用镜像代理完成依赖拉取
|
|
88
|
+
|
|
89
|
+
你接下来可以:
|
|
90
|
+
|
|
91
|
+
1. 修改代码并重新部署
|
|
92
|
+
2. 将当前应用创建快照发布版本,用于部署到生产环境
|
|
93
|
+
3. 查看运行日志
|
|
94
|
+
4. 将应用迁移到自己的 Rainbond
|
|
78
95
|
```
|
|
79
96
|
|
|
80
97
|
### Structured contract mode
|
|
@@ -5,7 +5,7 @@ Canonical progressive-loading contract: `rainskills.skill-runtime-contract.v1`.
|
|
|
5
5
|
<!-- rainskills-runtime-gate:start -->
|
|
6
6
|
## 单运行环境 CLI 门禁(最高优先级)
|
|
7
7
|
|
|
8
|
-
本机只允许连接一个 Rainbond 运行环境。当前 Skill 在本会话第一次调用 Rainbond 前,执行固定 launcher 的 `runtime status --json`。返回 `connected` 且 `usable=true`,并且 `package_version` 与本 Skill JSON contract 的 `package_version` 完全一致后,所有查询和变更才可通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行。缺少或不一致时必须先执行当前固定版本 `rainskills@0.1.
|
|
8
|
+
本机只允许连接一个 Rainbond 运行环境。当前 Skill 在本会话第一次调用 Rainbond 前,执行固定 launcher 的 `runtime status --json`。返回 `connected` 且 `usable=true`,并且 `package_version` 与本 Skill JSON contract 的 `package_version` 完全一致后,所有查询和变更才可通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行。缺少或不一致时必须先执行当前固定版本 `rainskills@0.1.37` 的更新/修复流程并重新取得一致状态;不得在版本错配时继续业务调用。不得配置或直接调用客户端 MCP,不得执行环境枚举或业务 operation 生命周期命令,也不得生成或传递运行环境 ID、业务 operation ID 或 intent JSON。
|
|
9
9
|
|
|
10
10
|
没有运行环境时,让用户选择 Rainbond Cloud 或一个已有/新建的私有 Rainbond,并执行对应的 `runtime connect`。连接和重新授权必须进入浏览器 Device Flow,不复用 Shell 中缓存的 JWT;新凭据通过 live probe 后才覆盖唯一运行环境。CLI 返回 401 时,只读调用可在 `runtime reconnect` 成功后重试一次;写调用不得自动重放,必须先查询平台真实状态。403 直接停止,不重新授权。
|
|
11
11
|
|
|
@@ -26,7 +26,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
26
26
|
```json
|
|
27
27
|
{
|
|
28
28
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
29
|
-
"package_version": "rainskills@0.1.
|
|
29
|
+
"package_version": "rainskills@0.1.37",
|
|
30
30
|
"runtime_status": [
|
|
31
31
|
"node",
|
|
32
32
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -423,7 +423,16 @@
|
|
|
423
423
|
具体的 provider 命名约定、connection env 变量名(`DB_*` / `REDIS_*` / `KAFKA_*` 等是示例,按 provider 文档实际名字为准)、以及依赖 alias 细节,详见 bootstrap modules/30-creation-rules.md 的相关章节。
|
|
424
424
|
24. 不要自动拉起本地 Docker Desktop/OrbStack、执行本地 Docker build/push、或推送临时镜像作为兜底;这属于 delivery-mode 策略切换,必须先得到用户明确确认。
|
|
425
425
|
25. 每次运行内部仍必须形成 `AppAssistantResult` 结果对象,但默认用户答复不一定暴露 YAML。
|
|
426
|
-
当 `source_app_delivery` 的 runtime healthy、没有 blocker、控制台部署位置和公网访问地址都已确定,且 delivery 已 `delivered` 或只剩浏览器人工确认时,默认使用简洁中文交付报告,不追加 `### Structured Output
|
|
426
|
+
当 `source_app_delivery` 的 runtime healthy、没有 blocker、控制台部署位置和公网访问地址都已确定,且 delivery 已 `delivered` 或只剩浏览器人工确认时,默认使用简洁中文交付报告,不追加 `### Structured Output`。报告的全部现有内容结束后,必须以以下固定动作块收尾;动作块只出现一次,后面不得再追加文字:
|
|
427
|
+
|
|
428
|
+
```text
|
|
429
|
+
你接下来可以:
|
|
430
|
+
|
|
431
|
+
1. 修改代码并重新部署
|
|
432
|
+
2. 将当前应用创建快照发布版本,用于部署到生产环境
|
|
433
|
+
3. 查看运行日志
|
|
434
|
+
4. 将应用迁移到自己的 Rainbond
|
|
435
|
+
```
|
|
427
436
|
26. 只有在自动化/评测明确要求结构化契约,或用户明确要求 YAML、JSON、调试详情、内部状态对象时,才把 `AppAssistantResult` 渲染为最终 fenced `yaml`。部署失败、仍在构建、存在 blocker/handoff/身份歧义或进入 dev-to-test promotion 都不是默认暴露 YAML 的理由。
|
|
428
437
|
27. 如果本次使用了 Git、镜像仓库或其他传输代理,必须在默认交付报告的处理记录或注意事项中说明;在结构化模式下也必须写入 `actions_performed[].details`。
|
|
429
438
|
代理事实属于执行记录,不是强制暴露 YAML 的理由。
|
|
@@ -38,7 +38,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
38
38
|
```json
|
|
39
39
|
{
|
|
40
40
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
41
|
-
"package_version": "rainskills@0.1.
|
|
41
|
+
"package_version": "rainskills@0.1.37",
|
|
42
42
|
"runtime_status": [
|
|
43
43
|
"node",
|
|
44
44
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -22,6 +22,13 @@ description: "Use only when the user explicitly asks for final delivery or acces
|
|
|
22
22
|
- 运行环境地址:<Rainbond Console 或应用管理页面地址>
|
|
23
23
|
- 应用访问地址:<部署完成后真实可访问的应用地址>
|
|
24
24
|
- 已完成操作:<用一句话概括本轮实际完成的项目识别、应用创建、组件构建、启动和访问验证;只列真实执行过的操作>
|
|
25
|
+
|
|
26
|
+
你接下来可以:
|
|
27
|
+
|
|
28
|
+
1. 修改代码并重新部署
|
|
29
|
+
2. 将当前应用创建快照发布版本,用于部署到生产环境
|
|
30
|
+
3. 查看运行日志
|
|
31
|
+
4. 将应用迁移到自己的 Rainbond
|
|
25
32
|
```
|
|
26
33
|
|
|
27
34
|
部署失败或未完成时只输出:
|
|
@@ -61,7 +68,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
61
68
|
```json
|
|
62
69
|
{
|
|
63
70
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
64
|
-
"package_version": "rainskills@0.1.
|
|
71
|
+
"package_version": "rainskills@0.1.37",
|
|
65
72
|
"runtime_status": [
|
|
66
73
|
"node",
|
|
67
74
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -38,7 +38,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
38
38
|
```json
|
|
39
39
|
{
|
|
40
40
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
41
|
-
"package_version": "rainskills@0.1.
|
|
41
|
+
"package_version": "rainskills@0.1.37",
|
|
42
42
|
"runtime_status": [
|
|
43
43
|
"node",
|
|
44
44
|
"<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
|
<!-- rainskills-runtime-gate:start -->
|
|
18
18
|
## 单运行环境 CLI 门禁(最高优先级)
|
|
19
19
|
|
|
20
|
-
本机只允许连接一个 Rainbond 运行环境。当前 Skill 在本会话第一次调用 Rainbond 前,执行固定 launcher 的 `runtime status --json`。返回 `connected` 且 `usable=true`,并且 `package_version` 与本 Skill JSON contract 的 `package_version` 完全一致后,所有查询和变更才可通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行。缺少或不一致时必须先执行当前固定版本 `rainskills@0.1.
|
|
20
|
+
本机只允许连接一个 Rainbond 运行环境。当前 Skill 在本会话第一次调用 Rainbond 前,执行固定 launcher 的 `runtime status --json`。返回 `connected` 且 `usable=true`,并且 `package_version` 与本 Skill JSON contract 的 `package_version` 完全一致后,所有查询和变更才可通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行。缺少或不一致时必须先执行当前固定版本 `rainskills@0.1.37` 的更新/修复流程并重新取得一致状态;不得在版本错配时继续业务调用。不得配置或直接调用客户端 MCP,不得执行环境枚举或业务 operation 生命周期命令,也不得生成或传递运行环境 ID、业务 operation ID 或 intent JSON。
|
|
21
21
|
|
|
22
22
|
没有运行环境时,让用户选择 Rainbond Cloud 或一个已有/新建的私有 Rainbond,并执行对应的 `runtime connect`。连接和重新授权必须进入浏览器 Device Flow,不复用 Shell 中缓存的 JWT;新凭据通过 live probe 后才覆盖唯一运行环境。CLI 返回 401 时,只读调用可在 `runtime reconnect` 成功后重试一次;写调用不得自动重放,必须先查询平台真实状态。403 直接停止,不重新授权。
|
|
23
23
|
|
|
@@ -38,7 +38,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
38
38
|
```json
|
|
39
39
|
{
|
|
40
40
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
41
|
-
"package_version": "rainskills@0.1.
|
|
41
|
+
"package_version": "rainskills@0.1.37",
|
|
42
42
|
"runtime_status": [
|
|
43
43
|
"node",
|
|
44
44
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -61,7 +61,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
61
61
|
```json
|
|
62
62
|
{
|
|
63
63
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
64
|
-
"package_version": "rainskills@0.1.
|
|
64
|
+
"package_version": "rainskills@0.1.37",
|
|
65
65
|
"runtime_status": [
|
|
66
66
|
"node",
|
|
67
67
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -26,7 +26,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
26
26
|
```json
|
|
27
27
|
{
|
|
28
28
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
29
|
-
"package_version": "rainskills@0.1.
|
|
29
|
+
"package_version": "rainskills@0.1.37",
|
|
30
30
|
"runtime_status": [
|
|
31
31
|
"node",
|
|
32
32
|
"<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.37` 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 连接或修改服务器。
|
|
@@ -2539,6 +2539,7 @@ async function runResume(onboardingId, {
|
|
|
2539
2539
|
throw error;
|
|
2540
2540
|
} finally {
|
|
2541
2541
|
runtimeLease?.stop();
|
|
2542
|
+
await resumeTelemetry?.flush?.();
|
|
2542
2543
|
}
|
|
2543
2544
|
}
|
|
2544
2545
|
|
|
@@ -3201,6 +3202,8 @@ async function runInstall(options, {
|
|
|
3201
3202
|
try {
|
|
3202
3203
|
await installOperation(options);
|
|
3203
3204
|
} finally {
|
|
3205
|
+
await activeOperation?.telemetry?.flush?.();
|
|
3206
|
+
activeOperation = null;
|
|
3204
3207
|
closeSshSession(activeSshSession);
|
|
3205
3208
|
activeSshSession = null;
|
|
3206
3209
|
operationLock.release();
|
|
@@ -13,7 +13,10 @@ const CLIENTS = new Set([
|
|
|
13
13
|
]);
|
|
14
14
|
const PLATFORMS = new Set(["darwin", "linux", "win32"]);
|
|
15
15
|
const CONTROL_MODES = new Set(["posix", "wsl", "windows-native"]);
|
|
16
|
-
const TARGETS = new Set([
|
|
16
|
+
const TARGETS = new Set([
|
|
17
|
+
"local-linux", "local-macos", "local-windows", "remote-linux",
|
|
18
|
+
"host-cluster", "existing-kubernetes",
|
|
19
|
+
]);
|
|
17
20
|
const ACTIONS = new Set(["install", "refresh"]);
|
|
18
21
|
const LIFECYCLE_STATUSES = new Set(["started", "completed", "blocked", "failed", "interrupted", "skipped"]);
|
|
19
22
|
const LEGACY_PHASES = new Set(["started", "authorized", "configured", "failed"]);
|
|
@@ -98,7 +101,7 @@ function createLifecycleTelemetry({
|
|
|
98
101
|
randomUUID = crypto.randomUUID,
|
|
99
102
|
now = () => new Date().toISOString(),
|
|
100
103
|
timeoutMs = 1500,
|
|
101
|
-
enabled = process.env.
|
|
104
|
+
enabled = process.env.RAINSKILLS_TELEMETRY_DISABLED !== "1",
|
|
102
105
|
} = {}) {
|
|
103
106
|
let sequence = 0;
|
|
104
107
|
const deliveries = new Set();
|
|
@@ -29,7 +29,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
29
29
|
```json
|
|
30
30
|
{
|
|
31
31
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
32
|
-
"package_version": "rainskills@0.1.
|
|
32
|
+
"package_version": "rainskills@0.1.37",
|
|
33
33
|
"runtime_status": [
|
|
34
34
|
"node",
|
|
35
35
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -38,7 +38,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
38
38
|
```json
|
|
39
39
|
{
|
|
40
40
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
41
|
-
"package_version": "rainskills@0.1.
|
|
41
|
+
"package_version": "rainskills@0.1.37",
|
|
42
42
|
"runtime_status": [
|
|
43
43
|
"node",
|
|
44
44
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -38,7 +38,7 @@ Hermes Agent 执行带 `--input -` 的一次性业务命令时,使用 `termina
|
|
|
38
38
|
```json
|
|
39
39
|
{
|
|
40
40
|
"schema": "rainskills.single-runtime-contract.v1",
|
|
41
|
-
"package_version": "rainskills@0.1.
|
|
41
|
+
"package_version": "rainskills@0.1.37",
|
|
42
42
|
"runtime_status": [
|
|
43
43
|
"node",
|
|
44
44
|
"<home>/.rainbond/lib/rainskills/bin/rainskills.js",
|
|
@@ -28,6 +28,17 @@ SECRET_ASSIGNMENT = re.compile(
|
|
|
28
28
|
|
|
29
29
|
MASKED_VALUES = {"***", "[masked]", "<masked>", "redacted", "<redacted>", "null"}
|
|
30
30
|
|
|
31
|
+
SUCCESSFUL_DEPLOYMENT_NEXT_ACTIONS = """你接下来可以:
|
|
32
|
+
|
|
33
|
+
1. 修改代码并重新部署
|
|
34
|
+
2. 将当前应用创建快照发布版本,用于部署到生产环境
|
|
35
|
+
3. 查看运行日志
|
|
36
|
+
4. 将应用迁移到自己的 Rainbond"""
|
|
37
|
+
|
|
38
|
+
SUCCESSFUL_DEPLOYMENT_PATTERN = re.compile(
|
|
39
|
+
r"(?m)^部署成功(?:,待浏览器访问确认)?。$"
|
|
40
|
+
)
|
|
41
|
+
|
|
31
42
|
|
|
32
43
|
def validate_customer_output(response_text: str, expected: dict[str, Any] | None = None) -> list[str]:
|
|
33
44
|
errors: list[str] = []
|
|
@@ -48,6 +59,14 @@ def validate_customer_output(response_text: str, expected: dict[str, Any] | None
|
|
|
48
59
|
errors.append("customer response appears to expose secret material")
|
|
49
60
|
break
|
|
50
61
|
|
|
62
|
+
if SUCCESSFUL_DEPLOYMENT_PATTERN.search(response_text):
|
|
63
|
+
if response_text.count(SUCCESSFUL_DEPLOYMENT_NEXT_ACTIONS) != 1:
|
|
64
|
+
errors.append(
|
|
65
|
+
"successful deployment response must contain the four customer next actions exactly once"
|
|
66
|
+
)
|
|
67
|
+
if not response_text.rstrip().endswith(SUCCESSFUL_DEPLOYMENT_NEXT_ACTIONS):
|
|
68
|
+
errors.append("successful deployment response must end with the customer next actions")
|
|
69
|
+
|
|
51
70
|
assertions = (expected or {}).get("assert", {})
|
|
52
71
|
for needle in assertions.get("prose_contains", []):
|
|
53
72
|
if needle not in response_text:
|