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.
Files changed (40) hide show
  1. package/README.md +34 -39
  2. package/SKILL.md +12 -10
  3. package/bin/rainskills-tools.js +114 -240
  4. package/bin/rainskills.js +134 -591
  5. package/install.sh +68 -94
  6. package/marketplace/rainskills/.claude-plugin/plugin.json +1 -1
  7. package/marketplace/rainskills/.codex-plugin/plugin.json +1 -1
  8. package/marketplace/rainskills/skills/rainskills/SKILL.md +13 -11
  9. package/package.json +2 -2
  10. package/rainbond-app-assistant/SKILL.md +116 -151
  11. package/rainbond-app-version-assistant/SKILL.md +98 -98
  12. package/rainbond-delivery-verifier/SKILL.md +98 -68
  13. package/rainbond-env-sync/SKILL.md +98 -69
  14. package/rainbond-fullstack-bootstrap/SKILL.md +101 -89
  15. package/rainbond-fullstack-bootstrap/modules/10-context-loading.md +1 -1
  16. package/rainbond-fullstack-troubleshooter/SKILL.md +98 -68
  17. package/rainbond-opensource-app-deploy/SKILL.md +102 -81
  18. package/rainbond-platform-installer/SKILL.md +4 -4
  19. package/rainbond-platform-installer/scripts/auto-update.js +0 -9
  20. package/rainbond-platform-installer/scripts/installed-version.js +1 -1
  21. package/rainbond-platform-installer/scripts/platform-installer.js +3 -89
  22. package/rainbond-platform-installer/scripts/runtime-state.js +14 -251
  23. package/rainbond-platform-installer/scripts/single-runtime.js +114 -0
  24. package/rainbond-platform-installer/scripts/user-message.js +3 -49
  25. package/rainbond-platform-installer/scripts/windows-client-config.js +0 -51
  26. package/rainbond-platform-installer/scripts/windows-onboarding.js +0 -3
  27. package/rainbond-platform-installer/scripts/windows-platform.ps1 +1 -1
  28. package/rainbond-platform-query/SKILL.md +103 -61
  29. package/rainbond-project-init/SKILL.md +102 -79
  30. package/rainbond-template-installer/SKILL.md +102 -80
  31. package/rainbond-platform-installer/scripts/environment-credentials.js +0 -225
  32. package/rainbond-platform-installer/scripts/environment-registry.js +0 -349
  33. package/rainbond-platform-installer/scripts/local-runtime-commands.js +0 -180
  34. package/rainbond-platform-installer/scripts/local-runtime.js +0 -58
  35. package/rainbond-platform-installer/scripts/runtime-context-resolver.js +0 -189
  36. package/rainbond-platform-installer/scripts/runtime-credentials.js +0 -163
  37. package/rainbond-platform-installer/scripts/runtime-intents.js +0 -386
  38. package/rainbond-platform-installer/scripts/runtime-operations.js +0 -597
  39. package/rainbond-platform-installer/scripts/windows-client-config.ps1 +0 -9
  40. package/rainbond-platform-installer/scripts/windows-read-user-environment.ps1 +0 -16
@@ -6,95 +6,124 @@ description: "Use when a user explicitly asks to sync non-sensitive preview or p
6
6
  # Rainbond Env Sync
7
7
 
8
8
  <!-- rainskills-runtime-gate:start -->
9
- ## 运行环境门禁(最高优先级)
9
+ ## 单运行环境 CLI 门禁(最高优先级)
10
10
 
11
- ### CLI 调用格式(强制)
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
- 所有可变 `call` 都必须使用完整 argv:`call <tool> --input - --operation-id <uuid> --skill-id rainbond-env-sync`。CLI 返回确认 ID 后,只能在同一 argv 末尾加入 `--confirm <confirmation-id>`;不得省略 `--skill-id`、猜测参数,或根据泛化错误反复重试。
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 MCP 调用中加入 `rainskills_operation_id`。环境、团队和应用只属于本次操作,禁止保存项目绑定;同一项目可以部署到多个环境。明确“团队”表示环境内团队;明确“运行环境/平台”表示环境;裸名称同时匹配环境和团队时必须询问。
18
-
19
- 第一步检查 Node.js 是否存在且主版本不低于 18。Node.js 缺失或低于 18 时,只说明“Rainskills 执行组件需要 Node.js 18 或更高版本”并停止:不选择运行环境,不调用 MCP,不猜测替代命令。只有用户或 agent 明确同意后才安装或升级 Node.js,再从同一原始 intent 继续。
20
-
21
- 固定 launcher 是 `["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"]`;运行包版本标记为 `rainskills@0.1.19`,且必须与本技能包 `package.json` 一致。把 launcher 与参数拼成 argv 数组直接执行,禁止 `rainskills@latest` 或执行 shell 字符串。
22
-
23
- 本地 launcher 必须从当前 Skill 所在目录的同级目录定位 `rainbond-platform-installer/scripts/local-runtime.js`,解析为绝对路径后使用 `["node", "<绝对路径>"]` 执行。`environment list`、`operation begin`、`operation complete` 和 `runtime message` 只能使用本地 launcher;本地 launcher 只读取已安装文件和本机受保护状态,不得访问 npm 或其它网络。只有用户选定连接运行环境后,才使用上面的固定本地 launcher。
24
-
25
- 所有 Rainbond 查询和变更必须通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行,并绑定本次 operation ID。禁止 Agent 直接调用 Rainbond MCP,也不得启动本地 Rainskills MCP 服务;只允许执行 CLI 返回的结构化结果与确认续接 argv。
26
-
27
- 业务操作开始后,必须使用 runtime contract 的 `input_commands.context-resolve` 完整 argv 和配套 stdin。返回 `resolved` 时只使用该 operation 已保存的企业、工作空间和集群上下文;返回 `needs-selection` 时,把 CLI 返回的“工作空间 + 集群”组合选项一次性列给用户,不得逐项询问,也不得让用户提供 enterprise_id。用户选择后必须使用 `input_commands.context-select` 的完整 argv 和配套 stdin;选择成功后继续原操作,同一 operation 不再重复查询上下文。
28
-
29
- 只有 CLI 返回并通过校验的 `rainskills.next-action.v1` argv 才能执行续接。普通失败一律禁止自动重试:不得再次执行原命令,不得执行 `--help`、`sleep`、`rg`、`grep`,不得搜索 Rainskills 源码;同一 `operation complete` 最多执行一次。
30
-
31
- <!-- rainskills-runtime-contract:start -->
32
17
  ```json
33
18
  {
34
- "schema": "rainskills.skill-runtime-contract.v1",
35
- "package_version": "rainskills@0.1.19",
36
- "launcher": ["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"],
37
- "local_launcher": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js"],
38
- "local_argv": {
39
- "environment-list": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "environment", "list", "--json"],
40
- "operation-begin-default": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "operation", "begin", "--operation-id", "<uuid>", "--intent-json", "<intent-json>"],
41
- "operation-begin-selected": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "operation", "begin", "--operation-id", "<uuid>", "--environment-id", "<environment-id>", "--intent-json", "<intent-json>"],
42
- "operation-complete": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "operation", "complete", "--operation-id", "<uuid>"],
43
- "runtime-message": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "runtime", "message", "--id", "<message-id>"]
44
- },
45
- "intents": {
46
- "env-sync": {
47
- "type": "env-sync",
48
- "required": ["type", "project_root", "environment"],
49
- "optional": ["team_id", "app_id", "service_id"],
50
- "enums": {
51
- "environment": ["preview", "production"]
52
- },
53
- "example": {
54
- "type": "env-sync",
55
- "project_root": "/workspace/app",
56
- "environment": "production",
57
- "app_id": "app"
58
- }
59
- }
60
- },
61
- "routes": {
62
- "existing": ["saas", "private-existing"]
63
- },
64
- "connect_argv": {
65
- "saas": ["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js", "runtime", "connect", "<target>", "--saas", "--intent-json", "<intent-json>"],
66
- "private-existing": ["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js", "runtime", "connect", "<target>", "--rainbond-url", "<rainbond-url>", "--intent-json", "<intent-json>"]
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
+ ]
67
63
  },
68
64
  "input_commands": {
69
- "context-resolve": {
70
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "context", "resolve", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-env-sync"],
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-env-sync"
75
+ ],
71
76
  "stdin": {
72
- "required": ["enterprise", "workspace"]
73
- }
74
- },
75
- "context-select": {
76
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "context", "select", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-env-sync"],
77
- "stdin": {
78
- "selection_id": "<selection-id>",
79
- "option_id": "<option-id>"
77
+ "required": [
78
+ "enterprise",
79
+ "workspace"
80
+ ]
80
81
  }
81
82
  },
82
83
  "read": {
83
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "read", "<tool>", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-env-sync"],
84
+ "argv": [
85
+ "node",
86
+ "<home>/.rainbond/bin/rainskills-tools.js",
87
+ "read",
88
+ "<tool>",
89
+ "--input",
90
+ "-",
91
+ "--skill-id",
92
+ "rainbond-env-sync"
93
+ ],
84
94
  "stdin_schema_source": "tool-catalog"
85
95
  },
86
96
  "call": {
87
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "call", "<tool>", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-env-sync"],
97
+ "argv": [
98
+ "node",
99
+ "<home>/.rainbond/bin/rainskills-tools.js",
100
+ "call",
101
+ "<tool>",
102
+ "--input",
103
+ "-",
104
+ "--skill-id",
105
+ "rainbond-env-sync"
106
+ ],
88
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-env-sync",
119
+ "--confirm",
120
+ "<confirmation-id>"
121
+ ],
122
+ "stdin_schema_source": "same-confirmed-input"
89
123
  }
90
124
  }
91
125
  }
92
126
  ```
93
- <!-- rainskills-runtime-contract:end -->
94
-
95
- target 只允许 `codex`、`claude`、`pi`、`all`。校验 intent 后只执行 existing scope 的完整 argv;只消费 schema 为 `rainskills.next-action.v1` 且校验后的 `argv` 数组。
96
-
97
- 连接完成后用固定 `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、重新授权或自动重试。
98
127
  <!-- rainskills-runtime-gate:end -->
99
128
 
100
129
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
@@ -6,106 +6,124 @@ description: "Use only when the user explicitly asks to create the Rainbond app
6
6
  # Rainbond Fullstack Bootstrap
7
7
 
8
8
  <!-- rainskills-runtime-gate:start -->
9
- ## 运行环境门禁(最高优先级)
9
+ ## 单运行环境 CLI 门禁(最高优先级)
10
10
 
11
- ### CLI 调用格式(强制)
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
- 所有可变 `call` 都必须使用完整 argv:`call <tool> --input - --operation-id <uuid> --skill-id rainbond-fullstack-bootstrap`。CLI 返回确认 ID 后,只能在同一 argv 末尾加入 `--confirm <confirmation-id>`;不得省略 `--skill-id`、猜测参数,或根据泛化错误反复重试。
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 MCP 调用中加入 `rainskills_operation_id`。环境、团队和应用只属于本次操作,禁止保存项目绑定;同一项目可以部署到多个环境。明确“团队”表示环境内团队;明确“运行环境/平台”表示环境;裸名称同时匹配环境和团队时必须询问。
18
-
19
- 第一步检查 Node.js 是否存在且主版本不低于 18。Node.js 缺失或低于 18 时,只说明“Rainskills 执行组件需要 Node.js 18 或更高版本”并停止:不选择运行环境,不调用 MCP,不猜测替代命令。只有用户或 agent 明确同意后才安装或升级 Node.js,再从同一原始 intent 继续。
20
-
21
- 固定 launcher 是 `["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"]`;运行包版本标记为 `rainskills@0.1.19`,且必须与本技能包 `package.json` 一致。把 launcher 与参数拼成 argv 数组直接执行,禁止 `rainskills@latest` 或执行 shell 字符串。
22
-
23
- 本地 launcher 必须从当前 Skill 所在目录的同级目录定位 `rainbond-platform-installer/scripts/local-runtime.js`,解析为绝对路径后使用 `["node", "<绝对路径>"]` 执行。`environment list`、`operation begin`、`operation complete` 和 `runtime message` 只能使用本地 launcher;本地 launcher 只读取已安装文件和本机受保护状态,不得访问 npm 或其它网络。只有用户选定连接或安装运行环境后,才使用上面的固定本地 launcher。
24
-
25
- 所有 Rainbond 查询和变更必须通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行,并绑定本次 operation ID。禁止 Agent 直接调用 Rainbond MCP,也不得启动本地 Rainskills MCP 服务;只允许执行 CLI 返回的结构化结果与确认续接 argv。
26
-
27
- 业务操作开始后,必须使用 runtime contract 的 `input_commands.context-resolve` 完整 argv 和配套 stdin。返回 `resolved` 时只使用该 operation 已保存的企业、工作空间和集群上下文;返回 `needs-selection` 时,把 CLI 返回的“工作空间 + 集群”组合选项一次性列给用户,不得逐项询问,也不得让用户提供 enterprise_id。用户选择后必须使用 `input_commands.context-select` 的完整 argv 和配套 stdin;选择成功后继续原操作,同一 operation 不再重复查询上下文。
28
-
29
- 只有 CLI 返回并通过校验的 `rainskills.next-action.v1` argv 才能执行续接。普通失败一律禁止自动重试:不得再次执行原命令,不得执行 `--help`、`sleep`、`rg`、`grep`,不得搜索 Rainskills 源码;同一 `operation complete` 最多执行一次。
30
-
31
- <!-- rainskills-runtime-contract:start -->
32
17
  ```json
33
18
  {
34
- "schema": "rainskills.skill-runtime-contract.v1",
35
- "package_version": "rainskills@0.1.19",
36
- "launcher": ["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"],
37
- "local_launcher": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js"],
38
- "local_argv": {
39
- "environment-list": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "environment", "list", "--json"],
40
- "operation-begin-default": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "operation", "begin", "--operation-id", "<uuid>", "--intent-json", "<intent-json>"],
41
- "operation-begin-selected": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "operation", "begin", "--operation-id", "<uuid>", "--environment-id", "<environment-id>", "--intent-json", "<intent-json>"],
42
- "operation-complete": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "operation", "complete", "--operation-id", "<uuid>"],
43
- "runtime-message": ["node", "<installed-skills-root>/rainbond-platform-installer/scripts/local-runtime.js", "runtime", "message", "--id", "<message-id>"]
44
- },
45
- "intents": {
46
- "bootstrap": {
47
- "type": "bootstrap",
48
- "required": ["type", "project_root"],
49
- "optional": ["team_id", "app_id", "service_id"],
50
- "enums": {},
51
- "example": {
52
- "type": "bootstrap",
53
- "project_root": "/workspace/app"
54
- }
55
- }
56
- },
57
- "route_conditions": {
58
- "new": {
59
- "app_id": "absent",
60
- "service_id": "absent"
61
- },
62
- "existing": {
63
- "any_present": ["app_id", "service_id"]
64
- }
65
- },
66
- "routes": {
67
- "new": ["saas", "private-existing", "install-private"],
68
- "existing": ["saas", "private-existing"]
69
- },
70
- "connect_argv": {
71
- "saas": ["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js", "runtime", "connect", "<target>", "--saas", "--intent-json", "<intent-json>"],
72
- "private-existing": ["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js", "runtime", "connect", "<target>", "--rainbond-url", "<rainbond-url>", "--intent-json", "<intent-json>"],
73
- "install-private": ["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js", "runtime", "connect", "<target>", "--install-private", "--location", "<private-location>", "--intent-json", "<intent-json>"]
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
+ ]
74
63
  },
75
64
  "input_commands": {
76
- "context-resolve": {
77
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "context", "resolve", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-fullstack-bootstrap"],
78
- "stdin": {
79
- "required": ["enterprise", "workspace"]
80
- }
81
- },
82
- "context-select": {
83
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "context", "select", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-fullstack-bootstrap"],
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-fullstack-bootstrap"
75
+ ],
84
76
  "stdin": {
85
- "selection_id": "<selection-id>",
86
- "option_id": "<option-id>"
77
+ "required": [
78
+ "enterprise",
79
+ "workspace"
80
+ ]
87
81
  }
88
82
  },
89
83
  "read": {
90
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "read", "<tool>", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-fullstack-bootstrap"],
84
+ "argv": [
85
+ "node",
86
+ "<home>/.rainbond/bin/rainskills-tools.js",
87
+ "read",
88
+ "<tool>",
89
+ "--input",
90
+ "-",
91
+ "--skill-id",
92
+ "rainbond-fullstack-bootstrap"
93
+ ],
91
94
  "stdin_schema_source": "tool-catalog"
92
95
  },
93
96
  "call": {
94
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "call", "<tool>", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-fullstack-bootstrap"],
97
+ "argv": [
98
+ "node",
99
+ "<home>/.rainbond/bin/rainskills-tools.js",
100
+ "call",
101
+ "<tool>",
102
+ "--input",
103
+ "-",
104
+ "--skill-id",
105
+ "rainbond-fullstack-bootstrap"
106
+ ],
95
107
  "stdin_schema_source": "tool-catalog"
96
108
  },
97
- "package-upload": {
98
- "argv": ["node", "<home>/.rainbond/bin/rainskills-tools.js", "package-upload", "--archive", "<archive-path>", "--input", "-", "--operation-id", "<uuid>", "--skill-id", "rainbond-fullstack-bootstrap"],
99
- "stdin_schema_source": "upload-request"
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-fullstack-bootstrap",
119
+ "--confirm",
120
+ "<confirmation-id>"
121
+ ],
122
+ "stdin_schema_source": "same-confirmed-input"
100
123
  }
101
124
  }
102
125
  }
103
126
  ```
104
- <!-- rainskills-runtime-contract:end -->
105
-
106
- target 只允许 `codex`、`claude`、`pi`、`all`。校验 intent 后按 `route_conditions` 选择 scope:`app_id` 和 `service_id` 都没有时是 new;任一存在时是 existing。只执行该 scope 允许的完整 argv;只消费 schema 为 `rainskills.next-action.v1` 且校验后的 `argv` 数组。
107
-
108
- 连接完成后用固定 `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、重新授权或自动重试。
109
127
  <!-- rainskills-runtime-gate:end -->
110
128
 
111
129
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
@@ -128,17 +146,11 @@ target 只允许 `codex`、`claude`、`pi`、`all`。校验 intent 后按 `route
128
146
  intent 不含 `app_id` 和 `service_id` 时,请提示“请选择应用要运行的环境:”,并只显示:
129
147
 
130
148
  1) 云端环境(免费体验)
131
- 2) 私有环境(去对接)
132
-
133
- 用户选择私有环境后,立即执行本地 launcher + `["runtime", "message", "--id", "private-deployment-location"]`,并原样输出固定消息:
134
-
135
- 请选择部署位置:
136
-
137
- 1、部署到本机
138
- 2、部署到独立服务器
139
- 3、部署到已有 Rainbond
149
+ 2) 本机环境
150
+ 3) 独立服务器
151
+ 4) 已有 Rainbond
140
152
 
141
- 选择 1 时执行 `install-private` route,并使用 `["--location", "local"]`;选择 2 时执行 `install-private` route,并使用 `["--location", "server"]`;选择 3 时执行本地 launcher + `["runtime", "message", "--id", "private-console-origin"]`,收到地址后执行 `private-existing`。不得显示额外的接入方式中间步骤,不得重复询问部署位置,也不得在环境准备完成前询问应用来源。
153
+ 选择 1 时执行 `saas` route;选择 2 时执行 `install-private` route,并使用 `["--location", "local"]`;选择 3 时执行 `install-private` route,并使用 `["--location", "server"]`;选择 4 时执行本地 launcher + `["runtime", "message", "--id", "private-console-origin"]`,收到地址后执行 `private-existing`。不得显示“私有环境”或部署位置中间层,不得重复询问部署位置,也不得在环境准备完成前询问应用来源。
142
154
 
143
155
  ### 已有目标
144
156
 
@@ -133,7 +133,7 @@ The list above is not exhaustive; the principle is "files that declare project s
133
133
 
134
134
  Regardless of how curious the model is about the environment:
135
135
 
136
- - user-level home directories as a whole (`~/.codex`, `~/.claude`, `~/.rainbond`, `~/.cache`, etc.). Only specific named files such as `~/.rainbond/credentials.env` are allowed when explicitly required by a configured workflow step.
136
+ - user-level home directories as a whole (`~/.codex`, `~/.claude`, `~/.rainbond`, `~/.cache`, etc.). Only the protected `~/.rainbond/rainskills/single-runtime-v1.json` may be read by the configured CLI runtime.
137
137
  - repository-root file enumeration: `rg --files`, `find . -type f`, `ls -R`, `tree`, or any equivalent that returns "every path in the repo." If the goal is to find a specific kind of file, search by content or name pattern, not by listing everything.
138
138
  - following arbitrary public web pages on transport failure. If a `curl` / package-download / upload-helper request returns a redirect or HTML error page, capture the status code and the first short prefix of the body for diagnosis; do not follow into a full third-party site render.
139
139
  - re-reading the same Rainbond Tool schema, the same skill file, or the same reference document a second time within the run. If the information is needed again, recall the prior read.