openxiangda-skill-kit 2.0.0-alpha.99 → 2.0.0

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 (37) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -7
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +9 -19
  6. package/dist/index.js.map +1 -1
  7. package/dist/workspace-guidance.d.ts +13 -0
  8. package/dist/workspace-guidance.d.ts.map +1 -0
  9. package/dist/workspace-guidance.js +67 -0
  10. package/dist/workspace-guidance.js.map +1 -0
  11. package/package.json +12 -3
  12. package/skills/manifest.json +2 -2
  13. package/skills/openxiangda-v2/SKILL.md +63 -46
  14. package/skills/openxiangda-v2/agents/openai.yaml +2 -2
  15. package/skills/openxiangda-v2/references/administration.md +27 -0
  16. package/skills/openxiangda-v2/references/application-foundation.md +162 -0
  17. package/skills/openxiangda-v2/references/appspec.md +132 -47
  18. package/skills/openxiangda-v2/references/backend.md +101 -237
  19. package/skills/openxiangda-v2/references/cli.md +27 -0
  20. package/skills/openxiangda-v2/references/concepts.md +61 -0
  21. package/skills/openxiangda-v2/references/data-authz.md +36 -244
  22. package/skills/openxiangda-v2/references/delivery.md +110 -42
  23. package/skills/openxiangda-v2/references/development.md +32 -0
  24. package/skills/openxiangda-v2/references/field-components.md +236 -0
  25. package/skills/openxiangda-v2/references/frontend.md +269 -101
  26. package/skills/openxiangda-v2/references/getting-started.md +66 -0
  27. package/skills/openxiangda-v2/references/interaction-patterns.md +56 -0
  28. package/skills/openxiangda-v2/references/mcp.md +649 -0
  29. package/skills/openxiangda-v2/references/product-design.md +142 -0
  30. package/skills/openxiangda-v2/references/public-access.md +167 -0
  31. package/skills/openxiangda-v2/references/testing.md +45 -48
  32. package/skills/openxiangda-v2/references/upgrading.md +39 -0
  33. package/skills/openxiangda-v2/references/workflow-events.md +152 -151
  34. package/skills/openxiangda-v2/references/architecture.md +0 -7
  35. package/skills/openxiangda-v2/references/commands.md +0 -21
  36. package/skills/openxiangda-v2/references/discovery.md +0 -15
  37. package/skills/openxiangda-v2/references/workspace.md +0 -25
@@ -0,0 +1,649 @@
1
+ # MCP 配置与工具参考
2
+
3
+ > 工具说明和输入参数从当前 MCP 注册表生成。
4
+
5
+ ## 连接项目
6
+
7
+ MCP 使用项目锁定的根包;在客户端配置下列 stdio 启动参数,把路径换成真实工作区的绝对路径:
8
+
9
+ ```json
10
+ {
11
+ "command": "pnpm",
12
+ "args": ["--dir", "/绝对路径/应用", "exec", "openxiangda", "--mcp-stdio", "--cwd", "/绝对路径/应用"]
13
+ }
14
+ ```
15
+
16
+ 客户端负责启动进程。登录、创建应用和长期运行的 dev 服务使用 [CLI](cli.md)。依赖升级后重启 MCP 进程。首先读取 workspace_context,再按任务读取 docs_read 和相关契约。MCP 不自动部署;在用户已授权范围内执行修改,无需重复确认。
17
+
18
+ ## 读取资源
19
+
20
+ - `openxiangda://workspace/context`
21
+ - `openxiangda://workspace/contracts`
22
+ - `openxiangda://workspace/appspec`
23
+ - `openxiangda://platform/capabilities`
24
+ - `openxiangda://deployments/latest`
25
+ - `openxiangda://environments`
26
+ - `openxiangda://docs/index`
27
+
28
+ 资料目录返回当前版本、摘要、主题 URI 和章节 ID;读取 `openxiangda://docs/{topic}` 得到中文 Markdown 正文。只需一个章节时使用 docs_read 的 section。资料只来自同版本根包的固定目录,不接受任意文件路径或网络 URL。
29
+
30
+ ## 结果与失败处理
31
+
32
+ 工具返回相同内容的 structuredContent 与文本结果,包含 ok、operation、data 和适用的 diagnostics/nextActions。业务失败设置 isError=true;按错误码、定位和平台 recovery 决定下一步。工具协议错误同样停止当前操作。check_app 会生成文件并运行检查、测试、构建;失败后未执行的阶段标记 skipped。deploy_app 已包含完整检查,生产晋级必须传入成功的测试 DeploymentRun ID,不重新构建。详见 [校验](testing.md)与[部署](delivery.md)。
33
+
34
+ ## authorization_status
35
+
36
+ 核验平台授权。只读核验明确指定站点的当前授权;不依赖工作区,不启动登录、刷新凭据或修改绑定。authorized 不代表应用管理权限。
37
+
38
+ - 只读:是
39
+ - 可替换文件或改变远端状态:否
40
+ - 幂等:否
41
+
42
+ 输入参数:
43
+
44
+ ```json
45
+ {
46
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
47
+ "type": "object",
48
+ "properties": {
49
+ "baseUrl": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "description": "明确指定目标平台地址"
53
+ }
54
+ },
55
+ "required": [
56
+ "baseUrl"
57
+ ],
58
+ "additionalProperties": false
59
+ }
60
+ ```
61
+
62
+ ## workspace_context
63
+
64
+ 查看工作区。首先读取当前项目、工具链版本和绑定,不运行构建或创建远端对象。
65
+
66
+ - 只读:是
67
+ - 可替换文件或改变远端状态:否
68
+ - 幂等:否
69
+
70
+ 输入参数:
71
+
72
+ ```json
73
+ {
74
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
75
+ "type": "object",
76
+ "properties": {}
77
+ }
78
+ ```
79
+
80
+ ## contract_describe
81
+
82
+ 查看应用契约。默认返回有界索引;用 selector 读取模型、流程、能力,或 navigation/permissions。菜单建议只复制一次,运行时不自动应用。
83
+
84
+ - 只读:是
85
+ - 可替换文件或改变远端状态:否
86
+ - 幂等:否
87
+
88
+ 输入参数:
89
+
90
+ ```json
91
+ {
92
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
93
+ "type": "object",
94
+ "properties": {
95
+ "selector": {
96
+ "description": "index、navigation、permissions、all 或索引给出的选择器",
97
+ "type": "string",
98
+ "maxLength": 200
99
+ },
100
+ "offset": {
101
+ "type": "integer",
102
+ "minimum": 0,
103
+ "maximum": 9007199254740991
104
+ },
105
+ "limit": {
106
+ "type": "integer",
107
+ "minimum": 1,
108
+ "maximum": 100
109
+ }
110
+ },
111
+ "additionalProperties": false
112
+ }
113
+ ```
114
+
115
+ ## appspec_context
116
+
117
+ 读取需求与设计。读取设计索引、稳定 ID 正文与引用闭包、开工和测试发布缺口;设计基线确认后制定实施计划,生产晋级核对原测试版本实际验收。
118
+
119
+ - 只读:是
120
+ - 可替换文件或改变远端状态:否
121
+ - 幂等:否
122
+
123
+ 输入参数:
124
+
125
+ ```json
126
+ {
127
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
128
+ "type": "object",
129
+ "properties": {
130
+ "selector": {
131
+ "description": "能力、变更、ADR 或 DES-* 设计的稳定 ID",
132
+ "type": "string",
133
+ "minLength": 1
134
+ },
135
+ "historyOffset": {
136
+ "default": 0,
137
+ "description": "历史索引偏移,每页 50 条",
138
+ "type": "integer",
139
+ "minimum": 0,
140
+ "maximum": 9007199254740991
141
+ }
142
+ }
143
+ }
144
+ ```
145
+
146
+ ## appspec_verify
147
+
148
+ 核对业务验收报告。读取成功测试运行与 Git 中的真实验收报告,核对版本绑定、场景结果和性能证据;不自动编造或执行验收。
149
+
150
+ - 只读:是
151
+ - 可替换文件或改变远端状态:否
152
+ - 幂等:否
153
+
154
+ 输入参数:
155
+
156
+ ```json
157
+ {
158
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
159
+ "type": "object",
160
+ "properties": {
161
+ "deploymentId": {
162
+ "type": "string",
163
+ "minLength": 1
164
+ },
165
+ "evidencePath": {
166
+ "description": "appspec/verification/*.json;省略时按运行 ID 读取",
167
+ "type": "string"
168
+ }
169
+ },
170
+ "required": [
171
+ "deploymentId"
172
+ ]
173
+ }
174
+ ```
175
+
176
+ ## docs_read
177
+
178
+ 读取中文使用资料。不传 topic 返回当前版本的主题和章节目录;传 topic/section 读取对应正文。
179
+
180
+ - 只读:是
181
+ - 可替换文件或改变远端状态:否
182
+ - 幂等:否
183
+
184
+ 输入参数:
185
+
186
+ ```json
187
+ {
188
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
189
+ "type": "object",
190
+ "properties": {
191
+ "topic": {
192
+ "description": "主题目录中的 ID",
193
+ "type": "string",
194
+ "minLength": 1,
195
+ "maxLength": 80
196
+ },
197
+ "section": {
198
+ "description": "主题章节目录中的 ID",
199
+ "type": "string",
200
+ "minLength": 1,
201
+ "maxLength": 200
202
+ }
203
+ },
204
+ "additionalProperties": false
205
+ }
206
+ ```
207
+
208
+ ## administration_context
209
+
210
+ 查看应用管理入口。读取当前用户可用的管理能力和入口;不修改角色或成员。
211
+
212
+ - 只读:是
213
+ - 可替换文件或改变远端状态:否
214
+ - 幂等:否
215
+
216
+ 输入参数:
217
+
218
+ ```json
219
+ {
220
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
221
+ "type": "object",
222
+ "properties": {
223
+ "environment": {
224
+ "default": "test",
225
+ "description": "目标环境;默认 test,production 必须明确选择",
226
+ "type": "string",
227
+ "enum": [
228
+ "test",
229
+ "production"
230
+ ]
231
+ }
232
+ }
233
+ }
234
+ ```
235
+
236
+ ## workflow_node_configurations
237
+
238
+ 查看流程有效参数。修改已部署流程前,读取管理员维护的节点配置。已有任务和后续节点进入使用各自适用版本。
239
+
240
+ - 只读:是
241
+ - 可替换文件或改变远端状态:否
242
+ - 幂等:否
243
+
244
+ 输入参数:
245
+
246
+ ```json
247
+ {
248
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
249
+ "type": "object",
250
+ "properties": {
251
+ "environment": {
252
+ "default": "test",
253
+ "description": "目标环境;默认 test,production 必须明确选择",
254
+ "type": "string",
255
+ "enum": [
256
+ "test",
257
+ "production"
258
+ ]
259
+ },
260
+ "workflowCode": {
261
+ "type": "string",
262
+ "minLength": 1,
263
+ "description": "流程声明中的 code"
264
+ }
265
+ },
266
+ "required": [
267
+ "workflowCode"
268
+ ]
269
+ }
270
+ ```
271
+
272
+ ## check_app
273
+
274
+ 检查完整应用。先在本地完成完整配置校验,默认核对平台同源规则与只读环境条件,再生成、静态检查、测试和构建。local 仅用于本地或 CI 验证,不证明目标环境可部署;正式 deploy 始终预检平台。会写本地文件,前置失败即停止。
275
+
276
+ - 只读:否
277
+ - 可替换文件或改变远端状态:是
278
+ - 幂等:否
279
+
280
+ 输入参数:
281
+
282
+ ```json
283
+ {
284
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
285
+ "type": "object",
286
+ "properties": {
287
+ "environment": {
288
+ "default": "test",
289
+ "description": "目标环境;默认 test,production 必须明确选择",
290
+ "type": "string",
291
+ "enum": [
292
+ "test",
293
+ "production"
294
+ ]
295
+ },
296
+ "local": {
297
+ "default": false,
298
+ "description": "仅本地完整检查;结果 validationScope=local,不核对现场条件",
299
+ "type": "boolean"
300
+ }
301
+ }
302
+ }
303
+ ```
304
+
305
+ ## deployment_plan
306
+
307
+ 预览应用发布。只读预览测试部署的运行配额,或指定测试版本的生产晋级;返回容量与缺口,不构建、上传或提交运行。
308
+
309
+ - 只读:是
310
+ - 可替换文件或改变远端状态:否
311
+ - 幂等:否
312
+
313
+ 输入参数:
314
+
315
+ ```json
316
+ {
317
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
318
+ "type": "object",
319
+ "properties": {
320
+ "environment": {
321
+ "default": "test",
322
+ "description": "目标环境;默认 test,production 必须明确选择",
323
+ "type": "string",
324
+ "enum": [
325
+ "test",
326
+ "production"
327
+ ]
328
+ },
329
+ "from": {
330
+ "description": "production 必填:成功测试 DeploymentRun ID;test 不接受",
331
+ "type": "string",
332
+ "minLength": 1
333
+ },
334
+ "deploymentStrategy": {
335
+ "description": "仅 TEST;显式 maintenance-replace 允许停机替换并由平台处理失败恢复,默认 rolling",
336
+ "type": "string",
337
+ "enum": [
338
+ "rolling",
339
+ "maintenance-replace"
340
+ ]
341
+ },
342
+ "environmentId": {
343
+ "description": "测试环境 ID,通常由平台绑定确定",
344
+ "type": "string"
345
+ },
346
+ "idempotencyKey": {
347
+ "description": "测试部署幂等键,省略时由包摘要派生",
348
+ "type": "string"
349
+ },
350
+ "wait": {
351
+ "default": true,
352
+ "description": "默认跟踪平台运行至完成,最多 15 分钟;false 只提交,随后必须查询状态",
353
+ "type": "boolean"
354
+ }
355
+ },
356
+ "additionalProperties": false
357
+ }
358
+ ```
359
+
360
+ ## environment_status
361
+
362
+ 查看环境状态。读取已配置环境、运行状态与当前不可变版本。
363
+
364
+ - 只读:是
365
+ - 可替换文件或改变远端状态:否
366
+ - 幂等:否
367
+
368
+ 输入参数:
369
+
370
+ ```json
371
+ {
372
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
373
+ "type": "object",
374
+ "properties": {}
375
+ }
376
+ ```
377
+
378
+ ## start_environment
379
+
380
+ 启动应用环境。在用户已授权范围内,从当前不可变版本恢复运行。
381
+
382
+ - 只读:否
383
+ - 可替换文件或改变远端状态:是
384
+ - 幂等:是
385
+
386
+ 输入参数:
387
+
388
+ ```json
389
+ {
390
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
391
+ "type": "object",
392
+ "properties": {
393
+ "environment": {
394
+ "default": "test",
395
+ "description": "目标环境;默认 test,production 必须明确选择",
396
+ "type": "string",
397
+ "enum": [
398
+ "test",
399
+ "production"
400
+ ]
401
+ },
402
+ "idempotencyKey": {
403
+ "description": "相同操作重试时保持不变",
404
+ "type": "string",
405
+ "minLength": 1
406
+ }
407
+ },
408
+ "additionalProperties": false
409
+ }
410
+ ```
411
+
412
+ ## stop_environment
413
+
414
+ 暂停应用环境。在用户已授权范围内停止运行,保留数据和配置。
415
+
416
+ - 只读:否
417
+ - 可替换文件或改变远端状态:是
418
+ - 幂等:是
419
+
420
+ 输入参数:
421
+
422
+ ```json
423
+ {
424
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
425
+ "type": "object",
426
+ "properties": {
427
+ "environment": {
428
+ "default": "test",
429
+ "description": "目标环境;默认 test,production 必须明确选择",
430
+ "type": "string",
431
+ "enum": [
432
+ "test",
433
+ "production"
434
+ ]
435
+ },
436
+ "idempotencyKey": {
437
+ "description": "相同操作重试时保持不变",
438
+ "type": "string",
439
+ "minLength": 1
440
+ }
441
+ },
442
+ "additionalProperties": false
443
+ }
444
+ ```
445
+
446
+ ## deploy_app
447
+
448
+ 部署或晋级应用。test 包含检查、按需后端镜像构建、密封和提交;production 必须用 from 复用成功测试版本。已有明确授权无需再次确认。默认持续报告进度并等待平台部署完成,真实业务验收另行执行。观察中断后继续查询原运行。
449
+
450
+ - 只读:否
451
+ - 可替换文件或改变远端状态:是
452
+ - 幂等:是
453
+
454
+ 输入参数:
455
+
456
+ ```json
457
+ {
458
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
459
+ "type": "object",
460
+ "properties": {
461
+ "environment": {
462
+ "default": "test",
463
+ "description": "目标环境;默认 test,production 必须明确选择",
464
+ "type": "string",
465
+ "enum": [
466
+ "test",
467
+ "production"
468
+ ]
469
+ },
470
+ "from": {
471
+ "description": "production 必填:成功测试 DeploymentRun ID;test 不接受",
472
+ "type": "string",
473
+ "minLength": 1
474
+ },
475
+ "deploymentStrategy": {
476
+ "description": "仅 TEST;显式 maintenance-replace 允许停机替换并由平台处理失败恢复,默认 rolling",
477
+ "type": "string",
478
+ "enum": [
479
+ "rolling",
480
+ "maintenance-replace"
481
+ ]
482
+ },
483
+ "environmentId": {
484
+ "description": "测试环境 ID,通常由平台绑定确定",
485
+ "type": "string"
486
+ },
487
+ "idempotencyKey": {
488
+ "description": "测试部署幂等键,省略时由包摘要派生",
489
+ "type": "string"
490
+ },
491
+ "wait": {
492
+ "default": true,
493
+ "description": "默认跟踪平台运行至完成,最多 15 分钟;false 只提交,随后必须查询状态",
494
+ "type": "boolean"
495
+ }
496
+ },
497
+ "additionalProperties": false
498
+ }
499
+ ```
500
+
501
+ ## deployment_status
502
+
503
+ 查询部署状态。查询指定或最近部署,平台状态和恢复决定是权威;watch 跟踪原运行,不重新构建或部署。
504
+
505
+ - 只读:是
506
+ - 可替换文件或改变远端状态:否
507
+ - 幂等:否
508
+
509
+ 输入参数:
510
+
511
+ ```json
512
+ {
513
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
514
+ "type": "object",
515
+ "properties": {
516
+ "deploymentId": {
517
+ "description": "省略时查询最近部署",
518
+ "type": "string",
519
+ "minLength": 1
520
+ },
521
+ "watch": {
522
+ "default": false,
523
+ "description": "持续跟踪原运行至结束,最多 15 分钟",
524
+ "type": "boolean"
525
+ }
526
+ }
527
+ }
528
+ ```
529
+
530
+ ## deployment_logs
531
+
532
+ 读取部署日志。读取检查点、首个和最近失败、候选状态与恢复下一步。
533
+
534
+ - 只读:是
535
+ - 可替换文件或改变远端状态:否
536
+ - 幂等:否
537
+
538
+ 输入参数:
539
+
540
+ ```json
541
+ {
542
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
543
+ "type": "object",
544
+ "properties": {
545
+ "deploymentId": {
546
+ "type": "string",
547
+ "minLength": 1,
548
+ "description": "平台返回的 DeploymentRun ID"
549
+ }
550
+ },
551
+ "required": [
552
+ "deploymentId"
553
+ ],
554
+ "additionalProperties": false
555
+ }
556
+ ```
557
+
558
+ ## cancel_deployment
559
+
560
+ 取消未激活部署。仅在用户授权且平台 recovery.cancelAllowed 为真时取消;激活后的运行不能取消。
561
+
562
+ - 只读:否
563
+ - 可替换文件或改变远端状态:是
564
+ - 幂等:是
565
+
566
+ 输入参数:
567
+
568
+ ```json
569
+ {
570
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
571
+ "type": "object",
572
+ "properties": {
573
+ "deploymentId": {
574
+ "type": "string",
575
+ "minLength": 1,
576
+ "description": "平台返回的 DeploymentRun ID"
577
+ }
578
+ },
579
+ "required": [
580
+ "deploymentId"
581
+ ],
582
+ "additionalProperties": false
583
+ }
584
+ ```
585
+
586
+ ## retry_deployment
587
+
588
+ 重试可恢复部署。在用户授权范围内按平台 recovery.nextCommand 重试原运行;不创建新的候选绕过失败。
589
+
590
+ - 只读:否
591
+ - 可替换文件或改变远端状态:是
592
+ - 幂等:是
593
+
594
+ 输入参数:
595
+
596
+ ```json
597
+ {
598
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
599
+ "type": "object",
600
+ "properties": {
601
+ "deploymentId": {
602
+ "type": "string",
603
+ "minLength": 1,
604
+ "description": "平台返回的 DeploymentRun ID"
605
+ }
606
+ },
607
+ "required": [
608
+ "deploymentId"
609
+ ],
610
+ "additionalProperties": false
611
+ }
612
+ ```
613
+
614
+ ## rollback_app
615
+
616
+ 回滚应用版本。在用户授权范围内回滚到指定历史 AppVersion;版本回滚不承诺撤销业务数据写入。
617
+
618
+ - 只读:否
619
+ - 可替换文件或改变远端状态:是
620
+ - 幂等:是
621
+
622
+ 输入参数:
623
+
624
+ ```json
625
+ {
626
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
627
+ "type": "object",
628
+ "properties": {
629
+ "environment": {
630
+ "default": "test",
631
+ "description": "目标环境;默认 test,production 必须明确选择",
632
+ "type": "string",
633
+ "enum": [
634
+ "test",
635
+ "production"
636
+ ]
637
+ },
638
+ "appVersionId": {
639
+ "type": "string",
640
+ "minLength": 1,
641
+ "description": "已知历史 AppVersion ID"
642
+ }
643
+ },
644
+ "required": [
645
+ "appVersionId"
646
+ ],
647
+ "additionalProperties": false
648
+ }
649
+ ```