rainskills 0.1.21 → 0.1.22

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 (27) hide show
  1. package/README.md +1 -1
  2. package/SKILL.md +1 -1
  3. package/marketplace/rainskills/.claude-plugin/plugin.json +1 -1
  4. package/marketplace/rainskills/.codex-plugin/plugin.json +1 -1
  5. package/marketplace/rainskills/skills/rainskills/SKILL.md +2 -2
  6. package/package.json +2 -2
  7. package/rainbond-app-assistant/SKILL.md +40 -1452
  8. package/rainbond-app-assistant/references/operational-reference.md +27 -0
  9. package/rainbond-app-assistant/references/routing.md +15 -0
  10. package/rainbond-app-assistant/references/runtime-gate.md +167 -0
  11. package/rainbond-app-assistant/references/workflow-rules.md +344 -0
  12. package/rainbond-app-assistant/scripts/validate_cross_skill_routing.py +637 -0
  13. package/rainbond-app-assistant/scripts/validate_progressive_loading.py +149 -0
  14. package/rainbond-app-version-assistant/SKILL.md +1 -1
  15. package/rainbond-delivery-verifier/SKILL.md +1 -1
  16. package/rainbond-env-sync/SKILL.md +1 -1
  17. package/rainbond-fullstack-bootstrap/SKILL.md +1 -1
  18. package/rainbond-fullstack-troubleshooter/SKILL.md +1 -1
  19. package/rainbond-opensource-app-deploy/SKILL.md +30 -301
  20. package/rainbond-opensource-app-deploy/agents/openai.yaml +1 -1
  21. package/rainbond-opensource-app-deploy/references/deployment-workflow.md +168 -0
  22. package/rainbond-opensource-app-deploy/references/runtime-gate.md +147 -0
  23. package/rainbond-platform-installer/SKILL.md +1 -1
  24. package/rainbond-platform-installer/scripts/installed-version.js +1 -1
  25. package/rainbond-platform-query/SKILL.md +1 -1
  26. package/rainbond-project-init/SKILL.md +1 -1
  27. package/rainbond-template-installer/SKILL.md +1 -1
@@ -0,0 +1,149 @@
1
+ #!/usr/bin/env python3
2
+
3
+ """Validate progressive disclosure for the Rainbond App Assistant skill."""
4
+
5
+ from __future__ import annotations
6
+
7
+ import argparse
8
+ import sys
9
+ from pathlib import Path
10
+
11
+
12
+ DEFAULT_SKILL_DIR = Path(__file__).resolve().parents[1]
13
+ APP_INITIAL_STAGE = (
14
+ "| 初始部署或首次 Rainbond 操作 | 本根入口、"
15
+ "[own runtime gate](references/runtime-gate.md)、"
16
+ "[routing](references/routing.md) | 其余全部 |"
17
+ )
18
+ APP_OPERATION_STAGE = (
19
+ "| operation/context 已建立,需要编排或执行 | "
20
+ "[workflow rules](references/workflow-rules.md);仅在核对路线或复盘时读取 "
21
+ "[operational reference](references/operational-reference.md) | 输出与对象细节 |"
22
+ )
23
+
24
+
25
+ def require(condition: bool, message: str, failures: list[str]) -> None:
26
+ if not condition:
27
+ failures.append(message)
28
+
29
+
30
+ def validate_progressive_loading(skill_dir: Path) -> list[str]:
31
+ failures: list[str] = []
32
+ root_path = skill_dir / "SKILL.md"
33
+ runtime_gate = skill_dir / "references" / "runtime-gate.md"
34
+ root = root_path.read_text(encoding="utf-8")
35
+ root_bytes = len(root.encode("utf-8"))
36
+ root_lines = len(root.splitlines())
37
+
38
+ require(root_bytes <= 7_000, f"root is too large: {root_bytes} bytes", failures)
39
+ require(root_lines <= 150, f"root is too long: {root_lines} lines", failures)
40
+ require(
41
+ "所有 reference 必须按需加载;不得一次性加载全部 references,也不得提前读取无关 reference。"
42
+ in root,
43
+ "root must explicitly require on-demand reference loading",
44
+ failures,
45
+ )
46
+ require(
47
+ "任何 Rainbond 查询、环境连接、平台安装或变更前,必须先读取 references/runtime-gate.md。"
48
+ in root,
49
+ "root must require its runtime gate before Rainbond access",
50
+ failures,
51
+ )
52
+ require(
53
+ "当前项目或用户明确给出的源码 Git URL:由本 Skill 接管。" in root,
54
+ "root must own current projects and explicit source Git URLs",
55
+ failures,
56
+ )
57
+
58
+ references = {
59
+ "references/runtime-gate.md": "runtime gate",
60
+ "references/routing.md": "routing",
61
+ "references/workflow-rules.md": "workflow rules",
62
+ "references/operational-reference.md": "operational reference",
63
+ "references/output-contract.md": "output contract",
64
+ "references/product-object-model.md": "product object model",
65
+ }
66
+ for relative_path, label in references.items():
67
+ require(relative_path in root, f"root must discover {label}", failures)
68
+ require((skill_dir / relative_path).is_file(), f"missing {relative_path}", failures)
69
+
70
+ require(APP_INITIAL_STAGE in root, "App initial stage mapping is invalid", failures)
71
+ require(APP_OPERATION_STAGE in root, "App operation/context stage mapping is invalid", failures)
72
+ if APP_INITIAL_STAGE in root and APP_OPERATION_STAGE in root:
73
+ require(
74
+ root.index(APP_INITIAL_STAGE) < root.index(APP_OPERATION_STAGE),
75
+ "App stage mapping must load the runtime gate before workflow rules",
76
+ failures,
77
+ )
78
+
79
+ for required in (
80
+ "首次",
81
+ "401",
82
+ "403",
83
+ "写调用不得自动重放",
84
+ "确认",
85
+ "停止",
86
+ ):
87
+ require(required in root, f"root is missing required invariant: {required}", failures)
88
+
89
+ for forbidden in (
90
+ "rainskills.skill-runtime-contract.v1",
91
+ "rainskills.single-runtime-contract.v1",
92
+ "<!-- rainskills-runtime-gate:start -->",
93
+ '"runtime_status":',
94
+ '"input_commands":',
95
+ "## High-Level Workflow",
96
+ "fixed launcher",
97
+ "固定 launcher",
98
+ "Device Flow",
99
+ "TTY",
100
+ "tty: true",
101
+ "npm root -g",
102
+ "~/.rainbond",
103
+ "只读取当前项目内的 manifest",
104
+ "本地 secrets",
105
+ ):
106
+ require(forbidden not in root, f"root embeds staged content: {forbidden}", failures)
107
+
108
+ require(runtime_gate.is_file(), "missing references/runtime-gate.md", failures)
109
+ if runtime_gate.is_file():
110
+ gate = runtime_gate.read_text(encoding="utf-8")
111
+ for required in (
112
+ "rainskills.skill-runtime-contract.v1",
113
+ "<!-- rainskills-runtime-gate:start -->",
114
+ "<!-- rainskills-runtime-gate:end -->",
115
+ "<!-- rainskills-runtime-routing:start -->",
116
+ "<!-- rainskills-runtime-routing:end -->",
117
+ "rainskills.single-runtime-contract.v1",
118
+ "rainskills-tools.js",
119
+ "固定 launcher",
120
+ "Device Flow",
121
+ "tty: true",
122
+ "npm root -g",
123
+ "401",
124
+ "403",
125
+ "new-application-environment",
126
+ ):
127
+ require(required in gate, f"runtime gate is missing: {required}", failures)
128
+
129
+ return failures
130
+
131
+
132
+ def main() -> int:
133
+ parser = argparse.ArgumentParser(description=__doc__)
134
+ parser.add_argument("--skill-dir", type=Path, default=DEFAULT_SKILL_DIR)
135
+ args = parser.parse_args()
136
+ failures = validate_progressive_loading(args.skill_dir.resolve())
137
+
138
+ if failures:
139
+ print("FAIL: progressive loading invalid")
140
+ for failure in failures:
141
+ print(f" - {failure}")
142
+ return 1
143
+
144
+ print("PASS: progressive loading valid")
145
+ return 0
146
+
147
+
148
+ if __name__ == "__main__":
149
+ sys.exit(main())
@@ -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.21",
20
+ "package_version": "rainskills@0.1.22",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -49,7 +49,7 @@ description: "Use only when the user explicitly asks for final delivery or acces
49
49
  ```json
50
50
  {
51
51
  "schema": "rainskills.single-runtime-contract.v1",
52
- "package_version": "rainskills@0.1.21",
52
+ "package_version": "rainskills@0.1.22",
53
53
  "runtime_status": [
54
54
  "node",
55
55
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -17,7 +17,7 @@ description: "Use when a user explicitly asks to sync non-sensitive preview or p
17
17
  ```json
18
18
  {
19
19
  "schema": "rainskills.single-runtime-contract.v1",
20
- "package_version": "rainskills@0.1.21",
20
+ "package_version": "rainskills@0.1.22",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -17,7 +17,7 @@ description: "Use only when the user explicitly asks to create the Rainbond app
17
17
  ```json
18
18
  {
19
19
  "schema": "rainskills.single-runtime-contract.v1",
20
- "package_version": "rainskills@0.1.21",
20
+ "package_version": "rainskills@0.1.22",
21
21
  "runtime_status": [
22
22
  "node",
23
23
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -49,7 +49,7 @@ description: "Use only when the user explicitly asks for a bounded build, runtim
49
49
  ```json
50
50
  {
51
51
  "schema": "rainskills.single-runtime-contract.v1",
52
- "package_version": "rainskills@0.1.21",
52
+ "package_version": "rainskills@0.1.22",
53
53
  "runtime_status": [
54
54
  "node",
55
55
  "<home>/.rainbond/lib/rainskills/bin/rainskills.js",
@@ -1,325 +1,54 @@
1
1
  ---
2
2
  name: rainbond-opensource-app-deploy
3
- description: "Use when a user wants to deploy an open-source application that is absent from the Rainbond app market from an actual docker-compose file, Helm chart, or container image set, including requests such as 按 docker-compose 部署 XXX or deploy this compose stack on Rainbond. Do not use when the user only names an application such as Harbor without a descriptor; route that request to rainbond-app-assistant. Not for the user's own source or private-image project; use rainbond-app-assistant. Not for an app already available in the market; use rainbond-template-installer."
3
+ description: "Use only when the user actually supplies a third-party Docker Compose file/content, Helm chart/values, or container image-set descriptor. Never use for a bare Git URL, source project/directory/package, named application without a descriptor, private-image project, or confirmed market template; route source and named-only requests to rainbond-app-assistant and market templates to rainbond-template-installer."
4
4
  ---
5
5
 
6
6
  # Rainbond Open-source App Deploy
7
7
 
8
- <!-- rainskills-runtime-gate:start -->
9
- ## 单运行环境 CLI 门禁(最高优先级)
8
+ 只处理用户实际提供的第三方 Compose、Helm 或容器镜像集合描述符。核心顺序是:先验证描述符,再加载 Runtime Gate;不得为了确认资格而接触 Rainbond 或外部源码。
10
9
 
11
- 本机只允许连接一个 Rainbond 运行环境。当前 Skill 在本会话第一次调用 Rainbond 前,执行固定 launcher 的 `runtime status --json`。返回 `connected` 且 `usable=true` 后,所有查询和变更直接通过本地 `~/.rainbond/bin/rainskills-tools.js` 执行。不得配置或直接调用客户端 MCP,不得执行环境枚举或业务 operation 生命周期命令,也不得生成或传递运行环境 ID、业务 operation ID 或 intent JSON。
10
+ ## Phase 0:静态资格判断
12
11
 
13
- 没有运行环境时,让用户选择 Rainbond Cloud 或一个已有/新建的私有 Rainbond,并执行对应的 `runtime connect`。连接和重新授权必须进入浏览器 Device Flow,不复用 Shell 中缓存的 JWT;新凭据通过 live probe 后才覆盖唯一运行环境。CLI 返回 401 时,只读调用可在 `runtime reconnect` 成功后重试一次;写调用不得自动重放,必须先查询平台真实状态。403 直接停止,不重新授权。
12
+ 只使用用户当前消息中明确提供的输入判断:
14
13
 
15
- `context resolve` 是无状态调用:单一工作空间直接返回上下文,多个候选返回组合选项;用户选择后由当前任务直接携带 team/region 参数,不执行 `context select`,不写本地 operation。所有可变 `call` 仍需先取得 confirmation ID,再以完全相同的输入追加 `--confirm` 执行一次。
14
+ - 实际 Docker Compose 文件/内容、Helm chart/values、容器镜像集合描述符 留在本 Skill。
15
+ - 裸 Git URL、源码目录、源码项目、源码包、私有镜像项目,或只给应用名称而没有描述符 → 转到 rainbond-app-assistant。
16
+ - 已确认的 Rainbond 本地/云端市场模板 → 转到 rainbond-template-installer。
16
17
 
17
- ```json
18
- {
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
- ]
63
- },
64
- "input_commands": {
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
- ],
76
- "stdin": {
77
- "required": [
78
- "enterprise",
79
- "workspace"
80
- ]
81
- }
82
- },
83
- "read": {
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
- ],
94
- "stdin_schema_source": "tool-catalog"
95
- },
96
- "call": {
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
- ],
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"
123
- }
124
- }
125
- }
126
- ```
127
- <!-- rainskills-runtime-gate:end -->
18
+ 裸 Git URL 不是部署描述符。不得通过 clone、浏览 Git、搜索仓库或读取源码来寻找 Compose/Helm,从而把 App Assistant 的请求改判给本 Skill。描述符是否存在不清楚时,只询问用户是否能提供实际描述符。
128
19
 
129
- 受限沙箱(包括 Codex)执行本地状态命令时,必须申请用户级受保护目录访问权限;在 Codex 中使用 `require_escalated`。不得修改 `~/.rainbond` 权限、复制受保护状态到工作区,或因沙箱权限错误建议重装。
20
+ 未确认描述符时不得读取 references/runtime-gate.md;也不得加载任何 reference、查询/连接环境、安装平台、调用 Rainbond、克隆或浏览 Git、读取外部文档或做任何变更。
130
21
 
131
- 涉及浏览器或设备授权的 `runtime connect`,以及恢复/安装场景中的 `rainskills <target> --self-hosted`,必须在附加交互终端(TTY)中运行;在 Codex 中设置 `tty: true` 并保持进程附着直到授权完成。禁止通过非交互命令要求用户粘贴 JWT;非交互模式只可复用已存在的受保护凭据。
22
+ ## 渐进加载
132
23
 
133
- 执行优化:同一会话内只检查一次 Node.js(首次使用本地 CLI 前);仅在 Node.js 或 Rainskills 安装、升级,或 PATH 变更后失效。固定 launcher 和 argv 已在本 Skill 中,禁止读取、搜索或探测 `rainskills.js`,也禁止执行 `npm root -g`。每个新的业务操作仍需要刷新一次环境列表;带已有 `operation_id` 或 `onboarding-id` 的续接复用已绑定的环境 ID,不重复枚举环境。
24
+ 不得一次性加载全部 references,只加载当前阶段所需文件:
134
25
 
135
- <!-- rainskills-runtime-routing:start -->
136
- ## 缺少运行环境时
26
+ | 阶段 | 读取 |
27
+ |---|---|
28
+ | Phase 0:描述符未确认 | 不加载 reference;只做上述静态资格判断 |
29
+ | 描述符已确认,首次需要连接或调用 Rainbond | 只读取自己的 [runtime gate](references/runtime-gate.md) |
30
+ | operation/context 已建立,需要建模、部署、排障或交付 | 读取 [deployment workflow](references/deployment-workflow.md) |
31
+ | 新鲜证据命中已知部署故障模式 | 再读取 [failure-mode playbook](references/failure-mode-playbook.md) |
137
32
 
138
- 先说:“可以,我会帮你部署未收录到应用市场的开源应用。不过目前还没有可用的应用运行环境。你刚安装的 Rainskills AI 部署助手,它负责分析项目并执行部署;应用实际会运行在 Rainbond 上。Rainbond 是一套应用运行和管理平台,负责容器运行、域名访问、日志和存储等工作,你不需要了解 Kubernetes。”
33
+ 正确流程只加载本 Skill Runtime Gate,不得读取 rainbond-app-assistant 或其他相邻 Skill 的 Gate。这里的 operation/context 是当前任务内业务操作与 team/region/app 上下文,不得生成 CLI 业务 operation ID、运行环境 ID 或 intent JSON。
139
34
 
140
- #### 选择运行环境
35
+ ## Runtime 与安全边界
141
36
 
142
- 请提示“请选择应用要运行的环境:”,并只显示:
37
+ 静态确认描述符后,任何 Rainbond 查询、环境连接、平台安装或变更前必须先读取 references/runtime-gate.md;当前 profile 的 transport、鉴权、context、确认与运行时安全契约全部由该 Gate 提供。
143
38
 
144
- 1) 云端环境(免费体验)
145
- 2) 本机环境
146
- 3) 独立服务器
147
- 4) 已有 Rainbond
39
+ - 不得绕过 Gate 选择的 transport、context 或授权边界,也不得读取相邻 Skill 的 Gate。
40
+ - 可变调用必须先取得确认 ID,再用完全相同输入确认执行;写调用不得自动重放。
41
+ - 401 只允许只读调用按 Gate 允许的恢复流程重试一次;403 立即停止且不做未授权重试。
42
+ - 不回显 JWT、密钥或凭据,不猜测 component state、内部地址或外部 URL。
148
43
 
149
- 选择 1 时执行 `saas` route;选择 2 时执行 `install-private` 并使用 `["--location", "local"]`;选择 3 时执行 `install-private` 并使用 `["--location", "server"]`;选择 4 时执行本地 launcher + `["runtime", "message", "--id", "private-console-origin"]` 后执行 `private-existing`。不得显示“私有环境”或部署位置中间层,不得在运行环境准备完成前继续读取或修改部署描述文件。
150
- <!-- rainskills-runtime-routing:end -->
44
+ ## 执行边界
151
45
 
152
- ## 部署类 skill 怎么选
46
+ 确认资格并建立 operation/context 后,按 [deployment workflow](references/deployment-workflow.md) 从官方描述符推导完整拓扑、配置组件与依赖、等待终态、检查健康、有限修复并通过真实入口交付门禁。只有证据匹配已知故障时才读取 [failure-mode playbook](references/failure-mode-playbook.md)。
153
47
 
154
- - 应用市场里有的应用 `rainbond-template-installer`(一键安装商店模板)
155
- - 市场里没有的开源软件(有 docker-compose、Helm 或镜像)→ `rainbond-opensource-app-deploy`
156
- - 部署你自己写的项目(源码或私有镜像)→ `rainbond-app-assistant`
48
+ 不得把镜像已导入或容器全绿当成交付完成;真实访问地址必须来自 Rainbond,且需要完成应用 UI/core smoke。UI 自动化不可用时停在 needs manual UI validation。
157
49
 
158
- Do not continue with this skill when either neighboring route applies. This skill owns the missing-from-market, upstream-descriptor-driven deployment path only.
50
+ ## 确认与停止
159
51
 
160
- ## Overview
52
+ 低风险且证据充分的 Rainbond 侧动作可在既有授权范围内继续;破坏性、数据变更、范围较广或低置信度动作必须先确认。以下情况停止:缺少/无法确认描述符、确认市场模板、语义无法映射、缺少必需能力或 secret、镜像不可达、集群容量失败、源码/构建缺陷、预算耗尽、需要人工 UI 验证,或任何相邻 Skill 才拥有的请求。
161
53
 
162
- Turn an upstream application's official deployment material into a working Rainbond application. Derive the topology from evidence, create and connect every component, preserve state, then iterate until runtime health, the real external entry, and the application's UI or core flow all pass.
163
-
164
- **Core principle:** importing images is not completion. Completion means the topology is evidence-backed and the deployed application works through its real user-facing entry.
165
-
166
- Use the protected local Rainskills CLI as the only transport for Rainbond runtime truth. Never call Rainbond MCP directly, start a local Rainskills MCP service, or invent component state, internal addresses, credentials, or external URLs.
167
-
168
- ## Progress checklist
169
-
170
- Track this checklist throughout the run:
171
-
172
- ```text
173
- Open-source deployment:
174
- - [ ] 0. Official topology derived
175
- - [ ] 1. Components, dependencies, ports, env, and storage modeled
176
- - [ ] 2. Required upstream documentation obtained
177
- - [ ] 3. Deployment reached terminal build states
178
- - [ ] 4. All component health checked
179
- - [ ] 5. Every blocker converged or stopped within budget
180
- - [ ] 6. Real entry and UI/core smoke verified
181
- ```
182
-
183
- ## 0. Derive the official topology
184
-
185
- Before any Rainbond write, obtain the upstream project's official `docker-compose.yml`, Compose fragments, Helm chart values/templates, image documentation, and installation guide. Prefer a pinned release or image tag over an unbounded moving tag.
186
-
187
- Build one deployment inventory from those sources:
188
-
189
- - every required service and its image, tag, command, and role
190
- - container ports and which single service is the intended user entry
191
- - required environment variables, secrets that must come from the user, and defaults
192
- - every provider/consumer relationship from `depends_on` and from host references embedded in env, URLs, DSNs, callbacks, and proxy configuration
193
- - named volumes, bind mounts, data directories, and volumes shared by multiple services
194
- - health checks, initialization jobs, profiles, anchors, `env_file` inputs, and config files
195
- - reverse-proxy routes and same-origin browser requirements
196
-
197
- Do not reconstruct a complex suite from model memory when the official descriptor is unavailable. Ask for the descriptor or permission to use a clearly named official alternative before writing runtime state.
198
-
199
- If the application is actually available in the Rainbond market, stop and route to `rainbond-template-installer`.
200
-
201
- For Helm input, pin the chart version and merge the user's values before deriving the inventory. Render with the upstream-supported `helm template` path when available. Map the rendered intent as follows:
202
-
203
- - Deployment or StatefulSet workloads → long-running Rainbond components backed by their declared images
204
- - Service ports → Rainbond inner/outer ports; Ingress routes → the single external entry and proxy routing
205
- - persistent volume claims → evidence-backed persistent storage requirements
206
- - ConfigMaps and non-secret files → `config-file` mounts; Secrets → user-supplied secret inputs that are never printed
207
- - startup/readiness/liveness probes → `rainbond_manage_component_probe`
208
- - init containers, Jobs, hooks, privileged host integration, operators, and custom resources → explicit compatibility decisions, not silent omission
209
-
210
- If a chart relies on Kubernetes behavior that cannot be represented safely by current Rainbond component capabilities, stop with a semantic-compatibility blocker. Do not claim that reading a chart is equivalent to installing it unchanged.
211
-
212
- ## 1. Import components and model the deployment
213
-
214
- Create or reuse the target Rainbond application, then model the inventory in dependency order.
215
-
216
- 1. Create every image-backed component with `rainbond_create_component_from_image` and keep initial deployment disabled until its ports, env, dependencies, storage, and config files are ready.
217
- 2. Configure inner ports first. Enable an outer port only on the intended external entry. Add the port with `rainbond_manage_component_ports`, then call `rainbond_manage_component_ports(operation=update_alias)` for that port to set `port_alias` and `k8s_service_name`; do not assume the add call persisted both values.
218
- 3. Create every accepted provider/consumer edge with `rainbond_manage_component_dependency`, including both declared `depends_on` edges and edges implied by URLs, DSNs, callbacks, or proxy upstreams.
219
- 4. Configure provider-side connection variables with `rainbond_manage_component_connection_envs`, then let explicit dependencies inject them. Keep consumer-local env only for names or combined URLs the application itself requires. Ask for missing secrets without displaying or persisting them in reports.
220
- 5. Attach persistent storage to every stateful data directory before deployment. For image-created stateless components, use `rainbond_manage_component_storage` with an explicit `volume_name`, `volume_type=share-file`, and the official `volume_path`. When multiple components must see the same files, mount the same shared writable volume on each required component. Never invent a storage class, host path, or retention guarantee. If the upstream requires local, block, or single-writer stateful semantics that the available component cannot preserve, stop and report the mismatch instead of silently weakening it.
221
- 6. Mount required proxy or application config as `config-file` storage before deploying the component that consumes it.
222
- 7. Preserve health probes through `rainbond_manage_component_probe`. Run one-shot initialization only through an evidence-backed supported path; do not create a long-running component that is expected to exit successfully and then misclassify its restart loop as health.
223
-
224
- If any required MCP capability above is unavailable, stop with a capability blocker and name the missing operation. Do not silently emulate it with an unsafe delivery-mode or storage-semantic change.
225
-
226
- ### Component addressing
227
-
228
- Prefer **port alias injection**:
229
-
230
- - set the provider port alias to the env prefix expected by the consumer
231
- - create the explicit dependency edge
232
- - consume the platform-injected `<PREFIX>_HOST` and `<PREFIX>_PORT`
233
- - do not copy a Compose service name or hard-code a container-local hostname into Rainbond env
234
-
235
- When a hostname must be embedded inside a URL, DSN, callback, or connection string, set a semantic internal domain with `k8s_service_name` and render that verified domain into the value. Use DNS-safe hyphenated names. If deploying another copy in the same namespace, choose unique internal domains and rewrite every matching reference consistently.
236
-
237
- Before any env write on a component with dependency-injected or port-alias env, run `rainbond_analyze_env_conflicts`. Do not create a local env that collides with an injected `_HOST` or `_PORT` value.
238
-
239
- ### Deployment best practices
240
-
241
- 1. **Explicit dependency edges.** Runtime DNS reachability is not a substitute for a Rainbond dependency. Verify the final accepted edge set is complete.
242
- 2. **Single reverse-proxy entry.** When browser UI and APIs require same-origin path routing, retain the official proxy, mount its routing config, wire every proxy-to-upstream edge, and expose only the proxy externally. Never deploy a stock proxy without its routing config.
243
- 3. **Persistent storage for state.** Databases, uploaded files, generated keys, and other durable state must survive restart. Verify storage is mounted at the official data path and is writable by the running process.
244
-
245
- ## 2. Acquire documentation on two tracks
246
-
247
- Classify each blocker before searching:
248
-
249
- - **Configuration-class:** missing required env, wrong provider address, dependency not wired, storage path absent, config file overriding env. Use logs, Rainbond evidence, the deployment inventory, and [references/failure-mode-playbook.md](references/failure-mode-playbook.md) first.
250
- - **Protocol/framework-class:** the process is healthy but login, encryption, callbacks, cookies, setup, or a framework-specific operation behaves incorrectly. Search the official upstream source, README, issue tracker, or operations guide before changing runtime state.
251
-
252
- When clean logs conflict with broken user behavior, treat that as protocol/framework-class. Do not guess a destructive storage or database repair from a browser symptom.
253
-
254
- ## 3. Deploy and wait for terminal build states
255
-
256
- Deploy only after the step 1 readiness gates pass. Use `rainbond_operate_app` for the deployment and `rainbond_wait_for_build_completion` for each returned build event.
257
-
258
- - Keep waiting with the same anchored event while the tool reports `running`.
259
- - Treat the terminal result and its classified reason as evidence.
260
- - Do not replace the bounded wait with repeated unanchored status polling.
261
- - A slow image pull is not a failure by elapsed time alone; distinguish active pulling from a terminal image-pull error.
262
-
263
- ## 4. Check application health
264
-
265
- Use `rainbond_get_app_health_overview` as the default whole-application signal. Inspect each abnormal component's blocker, then obtain the minimum supporting pod, event, log, env, dependency, port, and storage evidence needed to explain it.
266
-
267
- Continue to step 6 only when every required component is green. If any required component is building, waiting, abnormal, or capacity-blocked, continue to step 5.
268
-
269
- ## 5. Diagnose, repair, and converge
270
-
271
- Read [references/failure-mode-playbook.md](references/failure-mode-playbook.md) when the evidence matches one of its deployment patterns.
272
-
273
- Use `rainbond-fullstack-troubleshooter` as the repair engine for existing-component build or runtime blockers. Follow its `RuntimeState` classification, evidence order, config-override gate, connection contract, event anchoring, destructive-action boundary, and attempt budget.
274
-
275
- For each blocker:
276
-
277
- 1. Collect fresh anchored evidence.
278
- 2. Classify the blocker and choose the smallest evidence-backed repair.
279
- 3. Before env changes, run the env-conflict check and inspect mounted config files that may override env.
280
- 4. Announce and apply one known low-risk Rainbond-side repair. Ask before destructive, data-mutating, broad, or low-confidence actions.
281
- 5. Redeploy only the affected scope, wait for its terminal event, then return to step 4.
282
-
283
- Budget rules:
284
-
285
- - Allow at most one repair attempt for the same blocker signature, then re-verify.
286
- - If the same signature remains, stop and report the evidence and required human decision.
287
- - Stop after three distinct repair attempts in one run, or after two consecutive health passes with no material improvement.
288
- - Stop immediately for a confirmed unreachable upstream image, cluster capacity failure, or source-code/build defect that Rainbond configuration cannot repair.
289
- - Repeated identical read-only checks without new anchored evidence do not count as progress.
290
-
291
- ## 6. Pass the delivery gate
292
-
293
- Completion requires all of the following:
294
-
295
- 1. `rainbond_get_app_health_overview` shows every required component green.
296
- 2. Read the real external entry from Rainbond `access_infos`; never fabricate or infer a URL.
297
- 3. If official documentation requires a public base URL, callback URL, trusted proxy, or secure-cookie setting, use that real entry to complete the two-phase public-URL configuration, redeploy once, and read `access_infos` again.
298
- 4. Verify that real entry is reachable through the intended proxy or application component.
299
- 5. Perform an application-specific **UI smoke** or core-flow smoke through the real entry, not only a root-path status check. Examples include loading the setup/login UI, signing in with user-provided test credentials, creating a minimal object, or completing the application's primary read/write flow.
300
- 6. Recheck stateful storage and the explicit dependency set after the smoke test.
301
- 7. When durable application state is part of the acceptance target, perform one controlled restart and verify the smoke-created object or equivalent state is still readable.
302
-
303
- If UI automation is unavailable, stop at `needs manual UI validation`; provide the real entry and exact manual steps, but do not call the deployment complete.
304
-
305
- Report concisely:
306
-
307
- - topology created and external entry component
308
- - component health and any intentionally omitted optional services
309
- - explicit dependencies and persistent/shared storage verified
310
- - real access URL from `access_infos`
311
- - UI/core smoke performed and result
312
- - unresolved blocker, if any, plus the exhausted attempt budget
313
-
314
- ## Common mistakes
315
-
316
- - Treating image import or all-green containers as final delivery.
317
- - Copying Compose service names directly into consumer env.
318
- - Wiring only `depends_on` while missing env-reference or proxy edges.
319
- - Exposing web and API separately when the official UI assumes one origin.
320
- - Deploying a reverse proxy before mounting its routing config.
321
- - Deploying a database or generated-key directory without persistent storage.
322
- - Editing env while a mounted config file supplies the effective value.
323
- - Declaring a slow image pull failed before its event reaches a terminal state.
324
- - Testing a browser protocol with an incompatible plain HTTP request and misdiagnosing the result.
325
- - Reporting a guessed URL instead of Rainbond `access_infos`.
54
+ 最终只报告真实拓扑、组件健康、依赖/存储验证、来自 access_infos 的访问 URL、实际 smoke 结果,以及唯一未解决 blocker。
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Rainbond Open-source App Deploy"
3
- short_description: "Deploy open-source compose, Helm, or image apps"
3
+ short_description: "Only supplied Compose, Helm, or image-set descriptors"
4
4
  default_prompt: "Use $rainbond-opensource-app-deploy to deploy an open-source compose stack on Rainbond and verify its UI."