@rainyun/cli 0.0.0-stage → 1.0.1

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 (68) hide show
  1. package/README.md +176 -2
  2. package/bin/postinstall.mjs +13 -0
  3. package/bin/rainyun-cli.mjs +13 -0
  4. package/catalog/human-names.json +340 -0
  5. package/catalog/list.openapi.json +354 -0
  6. package/catalog/openapi.json +34527 -0
  7. package/catalog/product-commands.json +332 -0
  8. package/catalog/public.openapi.json +1891 -0
  9. package/docs/AGENT_GUIDE.md +64 -0
  10. package/docs/install.md +44 -0
  11. package/docs/product-lists.md +48 -0
  12. package/docs/rgp.md +77 -0
  13. package/docs/terminal-exec.md +111 -0
  14. package/examples/public-panel.json +1 -0
  15. package/examples/public-rcs-price.json +1 -0
  16. package/examples/rca-terminal-input.json +1 -0
  17. package/examples/rcs-get.json +1 -0
  18. package/examples/rcs-list.json +1 -0
  19. package/examples/rcs-reboot.json +1 -0
  20. package/examples/terminal-controls.ndjson +3 -0
  21. package/examples/terminal-input.json +1 -0
  22. package/node_modules/ws/LICENSE +20 -0
  23. package/node_modules/ws/README.md +539 -0
  24. package/node_modules/ws/browser.js +8 -0
  25. package/node_modules/ws/index.js +22 -0
  26. package/node_modules/ws/lib/buffer-util.js +142 -0
  27. package/node_modules/ws/lib/constants.js +19 -0
  28. package/node_modules/ws/lib/event-target.js +292 -0
  29. package/node_modules/ws/lib/extension.js +203 -0
  30. package/node_modules/ws/lib/limiter.js +55 -0
  31. package/node_modules/ws/lib/permessage-deflate.js +530 -0
  32. package/node_modules/ws/lib/receiver.js +751 -0
  33. package/node_modules/ws/lib/sender.js +610 -0
  34. package/node_modules/ws/lib/stream.js +161 -0
  35. package/node_modules/ws/lib/subprotocol.js +62 -0
  36. package/node_modules/ws/lib/validation.js +152 -0
  37. package/node_modules/ws/lib/websocket-server.js +565 -0
  38. package/node_modules/ws/lib/websocket.js +1471 -0
  39. package/node_modules/ws/package.json +74 -0
  40. package/node_modules/ws/wrapper.mjs +21 -0
  41. package/package.json +29 -4
  42. package/skills/rainyun-cli/SKILL.md +46 -0
  43. package/src/api/catalog.mjs +230 -0
  44. package/src/api/http.mjs +222 -0
  45. package/src/api/request.mjs +178 -0
  46. package/src/api/titles.mjs +9 -0
  47. package/src/auth/commands.mjs +192 -0
  48. package/src/auth/store.mjs +162 -0
  49. package/src/cli.mjs +154 -0
  50. package/src/commands/dispatch.mjs +128 -0
  51. package/src/commands/fields.mjs +77 -0
  52. package/src/commands/products.mjs +209 -0
  53. package/src/commands/rgs.mjs +44 -0
  54. package/src/json.mjs +81 -0
  55. package/src/output/business.mjs +188 -0
  56. package/src/output/discovery.mjs +197 -0
  57. package/src/output/examples.mjs +71 -0
  58. package/src/output/format.mjs +164 -0
  59. package/src/output/help.json +181 -0
  60. package/src/output/help.mjs +334 -0
  61. package/src/rgp/commands.mjs +251 -0
  62. package/src/rgp/input.mjs +144 -0
  63. package/src/rgp/operations.json +625 -0
  64. package/src/rgp/result.mjs +103 -0
  65. package/src/rgp/transfer.mjs +213 -0
  66. package/src/terminal/commands.mjs +155 -0
  67. package/src/terminal/session.mjs +233 -0
  68. package/src/terminal/target.mjs +155 -0
@@ -0,0 +1,354 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "雨云产品分页列表补充",
5
+ "version": "0.6.1-2026-11-19",
6
+ "description": "复用现有分页路由及原有列表响应;需要部署API Key路由登记。没有API Key专用字段裁剪。"
7
+ },
8
+ "paths": {
9
+ "/product/rgs/": {
10
+ "get": {
11
+ "operationId": "get_product_rgs_list",
12
+ "summary": "查询我的游戏云列表",
13
+ "tags": [
14
+ "rgs"
15
+ ],
16
+ "description": "真实服务端分页;data.Records为当前页,data.TotalRecords为总数。保留原有列表处理和返回字段,没有API Key专用摘要。需要部署四个既有列表的API Key路由登记;不会回退到ID汇总或绕过权限。",
17
+ "x-api-key-enabled": true,
18
+ "x-api-key-scopes": [
19
+ "rgs:read"
20
+ ],
21
+ "x-api-key-scope-mode": "all",
22
+ "x-source-route": "routers/init.go:983",
23
+ "security": [
24
+ {
25
+ "BearerAuth": []
26
+ }
27
+ ],
28
+ "parameters": [
29
+ {
30
+ "$ref": "#/components/parameters/ProductListOptions"
31
+ }
32
+ ],
33
+ "responses": {
34
+ "200": {
35
+ "description": "成功;沿用既有列表响应,客户端原样保留服务端字段。",
36
+ "content": {
37
+ "application/json": {
38
+ "schema": {
39
+ "$ref": "#/components/schemas/ProductListInstanceResponse"
40
+ }
41
+ }
42
+ }
43
+ },
44
+ "400": {
45
+ "$ref": "#/components/responses/BadRequest"
46
+ },
47
+ "403": {
48
+ "$ref": "#/components/responses/Forbidden"
49
+ },
50
+ "500": {
51
+ "$ref": "#/components/responses/ServerError"
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "/product/rbm/": {
57
+ "get": {
58
+ "operationId": "get_product_rbm_list",
59
+ "summary": "查询我的裸金属列表",
60
+ "tags": [
61
+ "rbm"
62
+ ],
63
+ "description": "真实服务端分页;data.Records为当前页,data.TotalRecords为总数。保留原有列表处理和返回字段,没有API Key专用摘要。需要部署四个既有列表的API Key路由登记;不会回退到ID汇总或绕过权限。",
64
+ "x-api-key-enabled": true,
65
+ "x-api-key-scopes": [
66
+ "rbm:read"
67
+ ],
68
+ "x-api-key-scope-mode": "all",
69
+ "x-source-route": "routers/init.go:1355",
70
+ "security": [
71
+ {
72
+ "BearerAuth": []
73
+ }
74
+ ],
75
+ "parameters": [
76
+ {
77
+ "$ref": "#/components/parameters/ProductListOptions"
78
+ }
79
+ ],
80
+ "responses": {
81
+ "200": {
82
+ "description": "成功;沿用既有列表响应,客户端原样保留服务端字段。",
83
+ "content": {
84
+ "application/json": {
85
+ "schema": {
86
+ "$ref": "#/components/schemas/ProductListInstanceResponse"
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "400": {
92
+ "$ref": "#/components/responses/BadRequest"
93
+ },
94
+ "403": {
95
+ "$ref": "#/components/responses/Forbidden"
96
+ },
97
+ "500": {
98
+ "$ref": "#/components/responses/ServerError"
99
+ }
100
+ }
101
+ }
102
+ },
103
+ "/product/rca/project/": {
104
+ "get": {
105
+ "operationId": "get_product_rca_project_list",
106
+ "summary": "查询我的云应用项目列表",
107
+ "tags": [
108
+ "rca/project"
109
+ ],
110
+ "description": "真实服务端分页;data.Records为当前页,data.TotalRecords为总数。保留原有列表处理和返回字段,没有API Key专用摘要。需要部署四个既有列表的API Key路由登记;不会回退到ID汇总或绕过权限。",
111
+ "x-api-key-enabled": true,
112
+ "x-api-key-scopes": [
113
+ "rca:project:read"
114
+ ],
115
+ "x-api-key-scope-mode": "all",
116
+ "x-source-route": "routers/init.go:1465",
117
+ "security": [
118
+ {
119
+ "BearerAuth": []
120
+ }
121
+ ],
122
+ "parameters": [
123
+ {
124
+ "$ref": "#/components/parameters/ProductListOptions"
125
+ },
126
+ {
127
+ "name": "no_metrics",
128
+ "in": "query",
129
+ "description": "传true跳过原有列表用量采集。",
130
+ "schema": {
131
+ "type": "boolean"
132
+ }
133
+ }
134
+ ],
135
+ "responses": {
136
+ "200": {
137
+ "description": "成功;沿用既有列表响应,客户端原样保留服务端字段。",
138
+ "content": {
139
+ "application/json": {
140
+ "schema": {
141
+ "$ref": "#/components/schemas/ProductListProjectResponse"
142
+ }
143
+ }
144
+ }
145
+ },
146
+ "400": {
147
+ "$ref": "#/components/responses/BadRequest"
148
+ },
149
+ "403": {
150
+ "$ref": "#/components/responses/Forbidden"
151
+ },
152
+ "500": {
153
+ "$ref": "#/components/responses/ServerError"
154
+ }
155
+ }
156
+ }
157
+ },
158
+ "/product/rca/app/": {
159
+ "get": {
160
+ "operationId": "get_product_rca_app_list",
161
+ "summary": "查询项目内的云应用列表",
162
+ "tags": [
163
+ "rca/app"
164
+ ],
165
+ "description": "真实服务端分页;data.Records为当前页,data.TotalRecords为总数。保留原有列表处理和返回字段,没有API Key专用摘要。需要部署四个既有列表的API Key路由登记;不会回退到ID汇总或绕过权限。",
166
+ "x-api-key-enabled": true,
167
+ "x-api-key-scopes": [
168
+ "rca:app:read"
169
+ ],
170
+ "x-api-key-scope-mode": "all",
171
+ "x-source-route": "routers/init.go:1509",
172
+ "security": [
173
+ {
174
+ "BearerAuth": []
175
+ }
176
+ ],
177
+ "parameters": [
178
+ {
179
+ "$ref": "#/components/parameters/ProductListOptions"
180
+ },
181
+ {
182
+ "name": "project_id",
183
+ "in": "query",
184
+ "required": true,
185
+ "description": "所属项目 ID,正整数;返回当前账号在该项目中的应用。",
186
+ "schema": {
187
+ "type": "integer",
188
+ "minimum": 1
189
+ }
190
+ },
191
+ {
192
+ "name": "no_metrics",
193
+ "in": "query",
194
+ "description": "传true跳过原有列表用量采集。",
195
+ "schema": {
196
+ "type": "boolean"
197
+ }
198
+ }
199
+ ],
200
+ "responses": {
201
+ "200": {
202
+ "description": "成功;沿用既有列表响应,客户端原样保留服务端字段。",
203
+ "content": {
204
+ "application/json": {
205
+ "schema": {
206
+ "$ref": "#/components/schemas/ProductListAppResponse"
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "400": {
212
+ "$ref": "#/components/responses/BadRequest"
213
+ },
214
+ "403": {
215
+ "$ref": "#/components/responses/Forbidden"
216
+ },
217
+ "500": {
218
+ "$ref": "#/components/responses/ServerError"
219
+ }
220
+ }
221
+ }
222
+ }
223
+ },
224
+ "components": {
225
+ "parameters": {
226
+ "ProductListOptions": {
227
+ "name": "options",
228
+ "in": "query",
229
+ "required": true,
230
+ "description": "单个 JSON 字符串。page 从 1 开始,perPage 为每页数量;CLI 快捷命令限制 1..100,默认 20。不要用负页码取消分页。高级过滤和排序字段按具体产品原服务允许值。",
231
+ "schema": {
232
+ "type": "string"
233
+ },
234
+ "example": "{\"page\":1,\"perPage\":20}",
235
+ "x-json-content-schema": {
236
+ "$ref": "#/components/schemas/PaginationOptions"
237
+ }
238
+ }
239
+ },
240
+ "schemas": {
241
+ "ProductListInstanceResponse": {
242
+ "type": "object",
243
+ "required": [
244
+ "code",
245
+ "data"
246
+ ],
247
+ "properties": {
248
+ "code": {
249
+ "type": "integer",
250
+ "example": 200
251
+ },
252
+ "message": {
253
+ "type": "string"
254
+ },
255
+ "data": {
256
+ "type": "object",
257
+ "required": [
258
+ "TotalRecords",
259
+ "Records"
260
+ ],
261
+ "properties": {
262
+ "TotalRecords": {
263
+ "type": "integer",
264
+ "description": "筛选结果总条数;不是当前页数量。"
265
+ },
266
+ "Records": {
267
+ "type": "array",
268
+ "items": {
269
+ "type": "object",
270
+ "additionalProperties": true,
271
+ "description": "既有业务列表记录;本补充文档仅定义分页外层,不枚举完整业务模型,不能据此过滤返回字段。"
272
+ }
273
+ }
274
+ }
275
+ }
276
+ }
277
+ },
278
+ "ProductListProjectResponse": {
279
+ "type": "object",
280
+ "required": [
281
+ "code",
282
+ "data"
283
+ ],
284
+ "properties": {
285
+ "code": {
286
+ "type": "integer",
287
+ "example": 200
288
+ },
289
+ "message": {
290
+ "type": "string"
291
+ },
292
+ "data": {
293
+ "type": "object",
294
+ "required": [
295
+ "TotalRecords",
296
+ "Records"
297
+ ],
298
+ "properties": {
299
+ "TotalRecords": {
300
+ "type": "integer",
301
+ "description": "筛选结果总条数;不是当前页数量。"
302
+ },
303
+ "Records": {
304
+ "type": "array",
305
+ "items": {
306
+ "type": "object",
307
+ "additionalProperties": true,
308
+ "description": "既有业务列表记录;本补充文档仅定义分页外层,不枚举完整业务模型,不能据此过滤返回字段。"
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+ },
315
+ "ProductListAppResponse": {
316
+ "type": "object",
317
+ "required": [
318
+ "code",
319
+ "data"
320
+ ],
321
+ "properties": {
322
+ "code": {
323
+ "type": "integer",
324
+ "example": 200
325
+ },
326
+ "message": {
327
+ "type": "string"
328
+ },
329
+ "data": {
330
+ "type": "object",
331
+ "required": [
332
+ "TotalRecords",
333
+ "Records"
334
+ ],
335
+ "properties": {
336
+ "TotalRecords": {
337
+ "type": "integer",
338
+ "description": "筛选结果总条数;不是当前页数量。"
339
+ },
340
+ "Records": {
341
+ "type": "array",
342
+ "items": {
343
+ "type": "object",
344
+ "additionalProperties": true,
345
+ "description": "既有业务列表记录;本补充文档仅定义分页外层,不枚举完整业务模型,不能据此过滤返回字段。"
346
+ }
347
+ }
348
+ }
349
+ }
350
+ }
351
+ }
352
+ }
353
+ }
354
+ }