@rishiqing/cli 0.1.3 → 0.1.5
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 +9 -56
- package/dist/cli.js +79 -38
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/rishiqing.openapi.json +2 -18
- package/skills/rishiqing/SKILL.md +13 -3
- package/skills/rsq-workflow-createFlowApplication/SKILL.md +7 -5
- package/skills/rsq-workflow-createFlowApplication/references/api-sequence.md +8 -8
package/package.json
CHANGED
package/rishiqing.openapi.json
CHANGED
|
@@ -2099,17 +2099,10 @@
|
|
|
2099
2099
|
"schema": {
|
|
2100
2100
|
"type": "object",
|
|
2101
2101
|
"required": [
|
|
2102
|
-
"formId",
|
|
2103
2102
|
"flowApplicationId",
|
|
2104
|
-
"formName"
|
|
2105
|
-
"fields"
|
|
2103
|
+
"formName"
|
|
2106
2104
|
],
|
|
2107
2105
|
"properties": {
|
|
2108
|
-
"formId": {
|
|
2109
|
-
"type": "string",
|
|
2110
|
-
"description": "表单id",
|
|
2111
|
-
"example": "form-001"
|
|
2112
|
-
},
|
|
2113
2106
|
"flowApplicationId": {
|
|
2114
2107
|
"type": "string",
|
|
2115
2108
|
"description": "流程应用id",
|
|
@@ -2126,16 +2119,9 @@
|
|
|
2126
2119
|
"items": {
|
|
2127
2120
|
"type": "object",
|
|
2128
2121
|
"required": [
|
|
2129
|
-
"fieldId",
|
|
2130
|
-
"fieldType",
|
|
2131
2122
|
"fieldName"
|
|
2132
2123
|
],
|
|
2133
2124
|
"properties": {
|
|
2134
|
-
"fieldId": {
|
|
2135
|
-
"type": "string",
|
|
2136
|
-
"description": "表单字段id",
|
|
2137
|
-
"example": "field-001"
|
|
2138
|
-
},
|
|
2139
2125
|
"fieldType": {
|
|
2140
2126
|
"type": "string",
|
|
2141
2127
|
"description": "表单字段类型",
|
|
@@ -2152,12 +2138,10 @@
|
|
|
2152
2138
|
}
|
|
2153
2139
|
},
|
|
2154
2140
|
"example": {
|
|
2155
|
-
"formId": "",
|
|
2156
2141
|
"flowApplicationId": "flowApp_019d246a38247515b5fd367f78188422",
|
|
2157
2142
|
"formName": "入职登记表",
|
|
2158
2143
|
"fields": [
|
|
2159
2144
|
{
|
|
2160
|
-
"fieldId": "",
|
|
2161
2145
|
"fieldType": "1",
|
|
2162
2146
|
"fieldName": "姓名"
|
|
2163
2147
|
}
|
|
@@ -8001,4 +7985,4 @@
|
|
|
8001
7985
|
},
|
|
8002
7986
|
"servers": [],
|
|
8003
7987
|
"security": []
|
|
8004
|
-
}
|
|
7988
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rishiqing
|
|
3
|
-
description: 当用户在 agent 对话中提到日事清、rsq、rishiqing,或提到项目、模块、卡片、任务、流程、多维表格、数据、流程应用、流程实例、步骤、表单、字段、审核项、审批、成员、负责人、执行人、参与人等日事清领域词汇时使用。此 skill 用于把这些自然语言快速识别为“要用 rsq-cli 操作日事清”,并优先通过 rsq-cli 的 describe、search
|
|
3
|
+
description: 当用户在 agent 对话中提到日事清、rsq、rishiqing,或提到项目、模块、卡片、任务、流程、多维表格、数据、流程应用、流程实例、步骤、表单、字段、审核项、审批、成员、负责人、执行人、参与人等日事清领域词汇时使用。此 skill 用于把这些自然语言快速识别为“要用 rsq-cli 操作日事清”,并优先通过 rsq-cli 的 describe、search 与 agent 包装命令完成查询、创建、更新和编排。
|
|
4
4
|
metadata:
|
|
5
5
|
requires:
|
|
6
6
|
bins: ["rsq-cli"]
|
|
@@ -51,7 +51,8 @@ rsq-cli describe <module> <command> --json
|
|
|
51
51
|
|
|
52
52
|
- 不确定命令名时,先 `search`
|
|
53
53
|
- 确认到候选命令后,再 `describe` 看参数和 `requestBodySchema`
|
|
54
|
-
-
|
|
54
|
+
- 真正执行时优先走 `rsq-cli agent <module> <command> ...`
|
|
55
|
+
- 需要姓名转用户 id 时,先 `rsq-cli agent contacts resolveUser --user-name <姓名> --json`
|
|
55
56
|
|
|
56
57
|
### 3. 写操作先预览
|
|
57
58
|
|
|
@@ -61,13 +62,22 @@ rsq-cli describe <module> <command> --json
|
|
|
61
62
|
--dry-run --json
|
|
62
63
|
```
|
|
63
64
|
|
|
65
|
+
如果命令带 request body,优先使用 `--body-file <path>`,不要默认拼内联 `--body '<json>'`。
|
|
66
|
+
|
|
67
|
+
原因:
|
|
68
|
+
|
|
69
|
+
- 更稳定,避免不同 shell / Agent 运行环境下的引号和转义问题
|
|
70
|
+
- 更适合较长 JSON 或多层对象
|
|
71
|
+
|
|
64
72
|
确认参数结构正确后再正式执行。
|
|
65
73
|
|
|
66
74
|
## 固定约束
|
|
67
75
|
|
|
68
76
|
- 所有 `...Id` / `...Ids` 一律按字符串 id 传递
|
|
69
77
|
- 不要传数字 id,也不要传纯数字字符串
|
|
70
|
-
- 组装
|
|
78
|
+
- 组装 request body 前先读 `requestBodySchema`
|
|
79
|
+
- 有 request body 时优先写入临时 JSON 文件并通过 `--body-file` 传入
|
|
80
|
+
- Agent 执行命令时优先使用 `rsq-cli agent <module> <command> ...`
|
|
71
81
|
- 用户给的是中文业务词时,先做语义映射,不要要求用户先说出精确命令名
|
|
72
82
|
- 若用户同时提到“流程 + 项目”,优先确认是否是在某个项目下创建 workflow 模块
|
|
73
83
|
|
|
@@ -33,7 +33,7 @@ metadata:
|
|
|
33
33
|
示例:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
rsq-cli project createPlan --project-id <projectId> --body
|
|
36
|
+
rsq-cli agent project createPlan --project-id <projectId> --body-file <request.json> --json
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
记录返回的:
|
|
@@ -46,7 +46,7 @@ rsq-cli project createPlan --project-id <projectId> --body '{"name":"<流程名
|
|
|
46
46
|
### 1. 先查模板
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
rsq-cli workflow listFlowApplicationTemplates --json
|
|
49
|
+
rsq-cli agent workflow listFlowApplicationTemplates --json
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
读取返回的:
|
|
@@ -80,7 +80,7 @@ rsq-cli workflow listFlowApplicationTemplates --json
|
|
|
80
80
|
如果用户没有指定项目,调用独立流程应用创建接口:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
rsq-cli workflow createFlowApplication --body
|
|
83
|
+
rsq-cli agent workflow createFlowApplication --body-file <request.json> --json
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
记录返回的:
|
|
@@ -90,7 +90,7 @@ rsq-cli workflow createFlowApplication --body '{"flowApplicationTemplateId":"<te
|
|
|
90
90
|
如果用户指定了项目,则不要先调用 `createFlowApplication`,而是调用项目模块创建接口:
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
rsq-cli project createPlan --project-id <projectId> --body
|
|
93
|
+
rsq-cli agent project createPlan --project-id <projectId> --body-file <request.json> --json
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
然后记录:
|
|
@@ -159,7 +159,7 @@ rsq-cli project createPlan --project-id <projectId> --body '{"name":"<name>","ty
|
|
|
159
159
|
如果用户给了具体人员姓名,先解析成 `userId`:
|
|
160
160
|
|
|
161
161
|
```bash
|
|
162
|
-
rsq-cli contacts resolveUser --user-name 张三 --json
|
|
162
|
+
rsq-cli agent contacts resolveUser --user-name 张三 --json
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
再把 `userId` 填入 `auditInfoUsers`。
|
|
@@ -176,7 +176,9 @@ rsq-cli contacts resolveUser --user-name 张三 --json
|
|
|
176
176
|
- 项目分支后续一律使用 `data.plan.flowApplicationId`,不要再额外创建一个独立流程应用
|
|
177
177
|
- 优先使用现成模板,只有匹配不到时才走“标准模式”
|
|
178
178
|
- “标准模式”下必须继续补步骤、表单、审核项
|
|
179
|
+
- Agent 执行时优先走 `rsq-cli agent ...`
|
|
179
180
|
- 写操作优先用 `--dry-run --json` 预览
|
|
181
|
+
- 只要命令带 request body,优先用 `--body-file`,不要默认用内联 `--body`
|
|
180
182
|
- 不要伪造 `userId`
|
|
181
183
|
- 如果模板匹配存在多个候选且无法判断唯一最佳项,先向用户确认
|
|
182
184
|
- 如果用户只给了一个短名称,也要尽量结合常见业务场景做合理推断
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
如果用户指定了项目,先创建模块:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
rsq-cli project createPlan --project-id <projectId> --body
|
|
8
|
+
rsq-cli agent project createPlan --project-id <projectId> --body-file <request.json> --json
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
记录:
|
|
@@ -20,7 +20,7 @@ rsq-cli project createPlan --project-id <projectId> --body '{"name":"<流程名
|
|
|
20
20
|
## 1. 模板匹配
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
rsq-cli workflow listFlowApplicationTemplates --json
|
|
23
|
+
rsq-cli agent workflow listFlowApplicationTemplates --json
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
目标:
|
|
@@ -31,7 +31,7 @@ rsq-cli workflow listFlowApplicationTemplates --json
|
|
|
31
31
|
## 2. 创建流程应用
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
rsq-cli workflow createFlowApplication --body
|
|
34
|
+
rsq-cli agent workflow createFlowApplication --body-file <request.json> --json
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
记录:
|
|
@@ -43,7 +43,7 @@ rsq-cli workflow createFlowApplication --body '{"flowApplicationTemplateId":"<te
|
|
|
43
43
|
## 3. 如果使用标准模式,先获取现有步骤锚点
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
rsq-cli workflow listStepInfosByFlowApplicationId --flowapplication-id <flowApplicationId> --json
|
|
46
|
+
rsq-cli agent workflow listStepInfosByFlowApplicationId --flowapplication-id <flowApplicationId> --json
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
用途:
|
|
@@ -54,7 +54,7 @@ rsq-cli workflow listStepInfosByFlowApplicationId --flowapplication-id <flowAppl
|
|
|
54
54
|
## 4. 创建步骤
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
rsq-cli workflow createStepInfo --body
|
|
57
|
+
rsq-cli agent workflow createStepInfo --body-file <request.json> --json
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
记录:
|
|
@@ -69,20 +69,20 @@ rsq-cli workflow createStepInfo --body '{"flowApplicationId":"<flowApplicationId
|
|
|
69
69
|
- `formName`
|
|
70
70
|
- `fields`
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
不要传 `formId` 或 `fieldId`。`createForm` 的请求体里只保留业务字段。
|
|
73
73
|
|
|
74
74
|
## 6. 把表单绑定到步骤
|
|
75
75
|
|
|
76
76
|
创建表单后,调用:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
rsq-cli workflow updateStepInfo --step-info-id <stepInfoId> --body
|
|
79
|
+
rsq-cli agent workflow updateStepInfo --step-info-id <stepInfoId> --body-file <request.json> --json
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
## 7. 创建审核项
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
rsq-cli workflow createAuditInfo --body
|
|
85
|
+
rsq-cli agent workflow createAuditInfo --body-file <request.json> --json
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
如果没有明确人员:
|