rainskills 0.1.22 → 0.1.23

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 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.22`,不会执行浮动的 `@latest` 业务代码。新版本原子刷新已经安装的 Rainskills Skills;当前业务继续使用启动时已经加载的版本,最迟从下一条新任务开始使用新版。npm 超时、版本检查失败、安装位置不安全或文件迁移失败时会保留旧版本,且不会阻塞或改变当前操作。
226
+ 发现更高的正式版后,后台任务只委托到经过校验的精确版本,例如 `rainskills@0.1.23`,不会执行浮动的 `@latest` 业务代码。新版本原子刷新已经安装的 Rainskills Skills;当前业务继续使用启动时已经加载的版本,最迟从下一条新任务开始使用新版。npm 超时、版本检查失败、安装位置不安全或文件迁移失败时会保留旧版本,且不会阻塞或改变当前操作。
227
227
 
228
228
  升级只更新 Rainskills 自身,不触发 Rainbond 安装、运行环境选择、登录授权或重新对接,也不会新增 Agent MCP 配置。更新内容仅包括 Skills 和本地 CLI。原始业务操作会继续执行;只有该业务操作本身需要运行环境时,才按既有门禁检查当前连接。可用连接直接复用,401 只重新授权一次,403 立即停止,从未连接过运行环境时才进入环境选择。
229
229
 
package/SKILL.md CHANGED
@@ -42,9 +42,9 @@ Rainskills 安装完成,下一条消息即可直接使用。
42
42
 
43
43
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
44
44
 
45
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
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.22`):
47
+ Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.23`):
48
48
 
49
49
  - 状态:执行 `runtime status --json`。
50
50
  - 首次连接:执行 `runtime connect <target> --saas` 或 `runtime connect <target> --rainbond-url <Console origin>`。
package/bin/rainskills.js CHANGED
@@ -19,6 +19,9 @@ const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3
19
19
  const RUNTIME_CHILD_ENVIRONMENT_KEYS = Object.freeze([
20
20
  "HOME", "PATH", "SHELL", "TMPDIR", "TEMP", "TMP", "USER", "LOGNAME", "LANG", "LC_ALL",
21
21
  "TERM", "COLORTERM", "XDG_CONFIG_HOME", "XDG_STATE_HOME", "XDG_CACHE_HOME",
22
+ "DISPLAY", "WAYLAND_DISPLAY", "XDG_RUNTIME_DIR", "DBUS_SESSION_BUS_ADDRESS",
23
+ "WSL_INTEROP", "WSL_DISTRO_NAME",
24
+ "SSH_CONNECTION", "SSH_CLIENT", "SSH_TTY", "container",
22
25
  "HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY", "http_proxy", "https_proxy", "no_proxy",
23
26
  "SSL_CERT_FILE", "SSL_CERT_DIR", "CURL_CA_BUNDLE", "NODE_EXTRA_CA_CERTS",
24
27
  "RAINBOND_LOGIN_TIMEOUT", "RAINSKILLS_NO_BROWSER",
@@ -454,6 +457,9 @@ async function runBuiltin(args, {
454
457
  await manager.markConnected(connection);
455
458
  }
456
459
  } catch (error) {
460
+ if (typeof manager.abortConnecting === "function") {
461
+ manager.abortConnecting(connection);
462
+ }
457
463
  write(`${JSON.stringify(runtimeConnectRetryAction(options, inspection.origin))}\n`);
458
464
  throw error;
459
465
  }
package/install.sh CHANGED
@@ -2396,10 +2396,6 @@ obtain_rainbond_token() {
2396
2396
  return 0
2397
2397
  fi
2398
2398
 
2399
- if [[ "$NON_INTERACTIVE" -eq 1 || ! -t 0 ]]; then
2400
- die "非交互模式下浏览器登录不可用,请改用 --token <jwt> 或设置 RAINBOND_JWT。"
2401
- fi
2402
-
2403
2399
  local device_flow_status
2404
2400
  if device_flow_login_to_rainbond "$base_url"; then
2405
2401
  return 0
@@ -2408,6 +2404,9 @@ obtain_rainbond_token() {
2408
2404
  fi
2409
2405
  if [[ "$device_flow_status" -eq 2 ]]; then
2410
2406
  printf '当前 Rainbond Console 暂不支持设备授权,改用兼容授权流程。\n' >&2
2407
+ if ! can_open_browser && [[ ! -t 0 ]]; then
2408
+ die "当前 Rainbond Console 仅支持旧版浏览器回调;此模式需要本机浏览器或交互终端。请升级 Rainbond Console 后重试。"
2409
+ fi
2411
2410
  browser_login_to_rainbond "$base_url"
2412
2411
  return 0
2413
2412
  fi
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rainskills",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Install the complete Rainskills AI deployment skill suite as one product.",
5
5
  "author": {
6
6
  "name": "Goodrain",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rainskills",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Install the complete Rainskills AI deployment skill suite as one product.",
5
5
  "author": {
6
6
  "name": "Goodrain",
@@ -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.22 <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.
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.23 <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
 
@@ -42,9 +42,9 @@ Rainskills 安装完成,下一条消息即可直接使用。
42
42
 
43
43
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
44
44
 
45
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
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.22`):
47
+ Rainskills 只保存一个全局运行环境,不维护环境列表、名称、默认值或环境 ID。使用固定 launcher `node <home>/.rainbond/lib/rainskills/bin/rainskills.js`(运行包版本 `rainskills@0.1.23`):
48
48
 
49
49
  - 状态:执行 `runtime status --json`。
50
50
  - 首次连接:执行 `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.22",
3
+ "version": "0.1.23",
4
4
  "description": "Interactive Rainbond skill installer for Codex, Claude Code, and Pi Agent",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/goodrain/rainskills#readme",
@@ -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.22",
17
+ "package_version": "rainskills@0.1.23",
18
18
  "runtime_status": [
19
19
  "node",
20
20
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -125,7 +125,7 @@ Canonical progressive-loading contract: `rainskills.skill-runtime-contract.v1`.
125
125
 
126
126
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
127
127
 
128
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
128
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
129
129
 
130
130
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
131
131
 
@@ -118,7 +118,7 @@ def validate_progressive_loading(skill_dir: Path) -> list[str]:
118
118
  "rainskills-tools.js",
119
119
  "固定 launcher",
120
120
  "Device Flow",
121
- "tty: true",
121
+ "不依赖 stdin TTY",
122
122
  "npm root -g",
123
123
  "401",
124
124
  "403",
@@ -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.22",
20
+ "package_version": "rainskills@0.1.23",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -128,7 +128,7 @@ description: "Use when a user explicitly asks for an existing Rainbond app versi
128
128
 
129
129
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
130
130
 
131
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
131
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
132
132
 
133
133
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
134
134
 
@@ -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.22",
52
+ "package_version": "rainskills@0.1.23",
53
53
  "runtime_status": [
54
54
  "node",
55
55
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -160,7 +160,7 @@ description: "Use only when the user explicitly asks for final delivery or acces
160
160
 
161
161
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
162
162
 
163
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
163
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
164
164
 
165
165
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
166
166
 
@@ -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.22",
20
+ "package_version": "rainskills@0.1.23",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -128,7 +128,7 @@ description: "Use when a user explicitly asks to sync non-sensitive preview or p
128
128
 
129
129
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
130
130
 
131
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
131
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
132
132
 
133
133
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
134
134
 
@@ -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.22",
20
+ "package_version": "rainskills@0.1.23",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -128,7 +128,7 @@ description: "Use only when the user explicitly asks to create the Rainbond app
128
128
 
129
129
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
130
130
 
131
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
131
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
132
132
 
133
133
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
134
134
 
@@ -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.22",
52
+ "package_version": "rainskills@0.1.23",
53
53
  "runtime_status": [
54
54
  "node",
55
55
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -160,7 +160,7 @@ description: "Use only when the user explicitly asks for a bounded build, runtim
160
160
 
161
161
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
162
162
 
163
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
163
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
164
164
 
165
165
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
166
166
 
@@ -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.22",
17
+ "package_version": "rainskills@0.1.23",
18
18
  "runtime_status": [
19
19
  "node",
20
20
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -125,7 +125,7 @@ Canonical progressive-loading contract: `rainskills.skill-runtime-contract.v1`.
125
125
 
126
126
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
127
127
 
128
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
128
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
129
129
 
130
130
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
131
131
 
@@ -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.22` 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.
35
+ 2. Use the installed local launcher `["node", "<home>/.rainbond/lib/rainskills/bin/rainskills.js"]`; its protected runtime package marker is `rainskills@0.1.23` 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,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  module.exports = Object.freeze({
4
- version: "0.1.22",
4
+ version: "0.1.23",
5
5
  });
@@ -291,6 +291,25 @@ function createRuntimeStateManager({
291
291
  });
292
292
  }
293
293
 
294
+ function abortConnecting(input) {
295
+ return withRuntimeStateLock(() => {
296
+ const current = read();
297
+ if (current.state !== "connecting") return false;
298
+ const fields = connectionFields(input);
299
+ if (
300
+ current.operation_id !== fields.operation_id
301
+ || current.target_client !== fields.target_client
302
+ || current.environment_kind !== fields.environment_kind
303
+ || current.console_origin !== fields.console_origin
304
+ ) {
305
+ return false;
306
+ }
307
+ stateStore.assertProtectedRegularFile(statePath);
308
+ fs.unlinkSync(statePath);
309
+ return true;
310
+ });
311
+ }
312
+
294
313
  async function markConnected(input) {
295
314
  const prior = read();
296
315
  const fields = connectionFields(input);
@@ -395,6 +414,7 @@ function createRuntimeStateManager({
395
414
  }
396
415
 
397
416
  return {
417
+ abortConnecting,
398
418
  markConnected,
399
419
  path: statePath,
400
420
  read,
@@ -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.22",
20
+ "package_version": "rainskills@0.1.23",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -128,7 +128,7 @@ description: Use for a user-requested, read-only Rainbond platform query about t
128
128
 
129
129
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
130
130
 
131
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
131
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
132
132
 
133
133
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍按其契约刷新环境列表;平台只读查询未指定环境时由 CLI 使用全局默认环境,不枚举环境。带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
134
134
 
@@ -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.22",
20
+ "package_version": "rainskills@0.1.23",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -128,7 +128,7 @@ description: "Use only when the user explicitly asks to initialize or link a loc
128
128
 
129
129
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
130
130
 
131
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
131
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
132
132
 
133
133
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
134
134
 
@@ -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.22",
20
+ "package_version": "rainskills@0.1.23",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -128,7 +128,7 @@ description: "Use when the user explicitly asks to install a local or cloud Rain
128
128
 
129
129
  受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
130
130
 
131
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
131
+ `runtime connect` Device Flow 不依赖 stdin TTY;Agent 必须执行固定 argv 并保持进程附着直到授权完成。能打开本机浏览器时由连接器自动跳转,SSH、容器等无浏览器场景原样展示授权地址并继续轮询。只有 Rainbond 不支持 Device Flow 且进入旧版 loopback 手动粘贴时才需要交互终端;不得要求用户在聊天中粘贴 JWT
132
132
 
133
133
  执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
134
134