@qingflow-tech/qingflow-cli 1.1.42 → 1.1.43-beta.2

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 (63) hide show
  1. package/README.md +5 -4
  2. package/package.json +2 -1
  3. package/pyproject.toml +3 -2
  4. package/skills/qingflow-app-form/SKILL.md +53 -0
  5. package/skills/qingflow-app-form/agents/openai.yaml +4 -0
  6. package/skills/qingflow-cli/SKILL.md +6 -6
  7. package/skills/qingflow-cli/manifest.yaml +1 -1
  8. package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_APP_DELIVERY_WORKFLOW.md +4 -4
  9. package/skills/qingflow-cli/reference/QINGFLOW_CLI_EXPLORATION_REPORT.md +1 -1
  10. package/skills/qingflow-cli/reference/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
  11. package/skills/qingflow-cli/reference/QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md +4 -4
  12. package/skills/qingflow-cli/reference/builder/10-build-single-app.md +5 -5
  13. package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +14 -14
  14. package/skills/qingflow-cli/reference/builder/30-schema-fields.md +98 -101
  15. package/skills/qingflow-cli/reference/builder/40-layout.md +39 -31
  16. package/skills/qingflow-cli/reference/builder/README.md +9 -9
  17. package/skills/qingflow-cli/reference/builder/code-integrations/README.md +4 -2
  18. package/skills/qingflow-cli/reference/builder/code-integrations/code-block.md +2 -0
  19. package/skills/qingflow-cli/reference/builder/code-integrations/q-linker.md +2 -0
  20. package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +45 -38
  21. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_EXPLORATION_REPORT.md +1 -1
  22. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
  23. package/skills/qingflow-cli/reference/examples/README.md +3 -3
  24. package/skills/qingflow-mcp-setup/SKILL.md +1 -1
  25. package/src/qingflow_mcp/app_form_compat.py +120 -0
  26. package/src/qingflow_mcp/app_form_validator.py +199 -0
  27. package/src/qingflow_mcp/builder_facade/app_form.py +3365 -0
  28. package/src/qingflow_mcp/builder_facade/app_form_schema.py +269 -0
  29. package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +37 -0
  30. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +2909 -0
  31. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +337 -0
  32. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +181 -0
  33. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +373 -0
  34. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +242 -0
  35. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +557 -0
  36. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +95 -0
  37. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +95 -0
  38. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +290 -0
  39. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +135 -0
  40. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +135 -0
  41. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +135 -0
  42. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +429 -0
  43. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +159 -0
  44. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +181 -0
  45. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +144 -0
  46. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +357 -0
  47. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +382 -0
  48. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +159 -0
  49. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +159 -0
  50. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +1831 -0
  51. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +135 -0
  52. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +736 -0
  53. package/src/qingflow_mcp/builder_facade/service.py +5 -2
  54. package/src/qingflow_mcp/cli/commands/builder.py +91 -28
  55. package/src/qingflow_mcp/cli/json_io.py +21 -2
  56. package/src/qingflow_mcp/cli/main.py +3 -39
  57. package/src/qingflow_mcp/cloud_oauth_proxy.py +96 -3
  58. package/src/qingflow_mcp/public_surface.py +5 -2
  59. package/src/qingflow_mcp/response_trim.py +48 -0
  60. package/src/qingflow_mcp/server_app_builder.py +38 -86
  61. package/src/qingflow_mcp/server_cloud.py +66 -1
  62. package/src/qingflow_mcp/tools/ai_builder_tools.py +93 -100
  63. package/src/qingflow_mcp/tools/app_tools.py +46 -65
@@ -0,0 +1,373 @@
1
+ {
2
+ "$defs": {
3
+ "AnswerValue": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "dataValue": {
7
+ "type": [
8
+ "string",
9
+ "null"
10
+ ]
11
+ },
12
+ "email": {
13
+ "type": [
14
+ "string",
15
+ "null"
16
+ ]
17
+ },
18
+ "id": {
19
+ "type": [
20
+ "integer",
21
+ "null"
22
+ ]
23
+ },
24
+ "optionId": {
25
+ "type": [
26
+ "string",
27
+ "null"
28
+ ]
29
+ },
30
+ "ordinal": {
31
+ "type": [
32
+ "integer",
33
+ "null"
34
+ ]
35
+ },
36
+ "otherInfo": {
37
+ "type": [
38
+ "string",
39
+ "null"
40
+ ]
41
+ },
42
+ "pluginValue": {
43
+ "type": [
44
+ "string",
45
+ "null"
46
+ ]
47
+ },
48
+ "queId": {
49
+ "type": [
50
+ "integer",
51
+ "null"
52
+ ]
53
+ },
54
+ "value": {
55
+ "type": [
56
+ "string",
57
+ "null"
58
+ ]
59
+ },
60
+ "valueStr": {
61
+ "type": [
62
+ "string",
63
+ "null"
64
+ ]
65
+ }
66
+ },
67
+ "type": "object"
68
+ },
69
+ "AttachmentConfig": {
70
+ "additionalProperties": false,
71
+ "description": "附件字段上传限制。",
72
+ "properties": {
73
+ "canScan": {
74
+ "type": [
75
+ "boolean",
76
+ "null"
77
+ ]
78
+ },
79
+ "defaultValues": {
80
+ "oneOf": [
81
+ {
82
+ "type": "null"
83
+ },
84
+ {
85
+ "$ref": "#/$defs/DefaultValues"
86
+ }
87
+ ]
88
+ },
89
+ "fileBeingCaptureOnly": {
90
+ "minimum": 0,
91
+ "type": [
92
+ "integer",
93
+ "null"
94
+ ]
95
+ },
96
+ "fileSize": {
97
+ "minimum": 1,
98
+ "type": [
99
+ "integer",
100
+ "null"
101
+ ]
102
+ },
103
+ "fileType": {
104
+ "items": {
105
+ "minLength": 1,
106
+ "type": "string"
107
+ },
108
+ "type": "array"
109
+ },
110
+ "imageCompress": {
111
+ "type": [
112
+ "boolean",
113
+ "null"
114
+ ]
115
+ },
116
+ "maxFileLimit": {
117
+ "minimum": 1,
118
+ "type": [
119
+ "integer",
120
+ "null"
121
+ ]
122
+ },
123
+ "maxFileLimitStatus": {
124
+ "type": [
125
+ "boolean",
126
+ "null"
127
+ ]
128
+ },
129
+ "pluginStatus": {
130
+ "type": [
131
+ "boolean",
132
+ "null"
133
+ ]
134
+ },
135
+ "scanType": {
136
+ "minimum": 0,
137
+ "type": [
138
+ "integer",
139
+ "null"
140
+ ]
141
+ }
142
+ },
143
+ "type": "object"
144
+ },
145
+ "DefaultValues": {
146
+ "additionalProperties": false,
147
+ "properties": {
148
+ "associatedQueType": {
149
+ "type": [
150
+ "integer",
151
+ "null"
152
+ ]
153
+ },
154
+ "beingCanDecrypted": {
155
+ "type": [
156
+ "boolean",
157
+ "null"
158
+ ]
159
+ },
160
+ "beingDesensitized": {
161
+ "type": [
162
+ "boolean",
163
+ "null"
164
+ ]
165
+ },
166
+ "canDecimal": {
167
+ "type": [
168
+ "boolean",
169
+ "null"
170
+ ]
171
+ },
172
+ "currencyStatus": {
173
+ "type": [
174
+ "boolean",
175
+ "null"
176
+ ]
177
+ },
178
+ "currencyType": {
179
+ "type": [
180
+ "integer",
181
+ "null"
182
+ ]
183
+ },
184
+ "dateType": {
185
+ "type": [
186
+ "integer",
187
+ "null"
188
+ ]
189
+ },
190
+ "decimalDigit": {
191
+ "type": [
192
+ "integer",
193
+ "null"
194
+ ]
195
+ },
196
+ "numberFormat": {
197
+ "type": [
198
+ "integer",
199
+ "null"
200
+ ]
201
+ },
202
+ "queId": {
203
+ "type": [
204
+ "integer",
205
+ "null"
206
+ ]
207
+ },
208
+ "queTitle": {
209
+ "type": [
210
+ "string",
211
+ "null"
212
+ ]
213
+ },
214
+ "queType": {
215
+ "type": [
216
+ "integer",
217
+ "null"
218
+ ]
219
+ },
220
+ "referValues": {
221
+ "items": {
222
+ "$ref": "#/$defs/ReferenceDefaultValue"
223
+ },
224
+ "type": "array"
225
+ },
226
+ "rowId": {
227
+ "type": [
228
+ "integer",
229
+ "null"
230
+ ]
231
+ },
232
+ "sourceValue": {
233
+ "type": [
234
+ "string",
235
+ "null"
236
+ ]
237
+ },
238
+ "tableValues": {
239
+ "items": {
240
+ "items": {
241
+ "$ref": "#/$defs/DefaultValues"
242
+ },
243
+ "type": "array"
244
+ },
245
+ "type": "array"
246
+ },
247
+ "values": {
248
+ "items": {
249
+ "$ref": "#/$defs/AnswerValue"
250
+ },
251
+ "type": "array"
252
+ }
253
+ },
254
+ "required": [
255
+ "values"
256
+ ],
257
+ "type": "object"
258
+ },
259
+ "FieldCommon": {
260
+ "description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
261
+ "properties": {
262
+ "dataTitle": {
263
+ "description": "是否作为数据标题;整个 body 最多且必须按规则存在一个。",
264
+ "type": "boolean"
265
+ },
266
+ "defaultType": {
267
+ "default": 1,
268
+ "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
269
+ "enum": [
270
+ 1,
271
+ 2,
272
+ 3
273
+ ],
274
+ "type": "integer"
275
+ },
276
+ "defaultValue": {
277
+ "$ref": "#/$defs/ScalarDefaultValue",
278
+ "description": "普通字段的标量默认值;表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
279
+ },
280
+ "description": {
281
+ "description": "字段说明;null 或空字符串表示清空。",
282
+ "type": [
283
+ "string",
284
+ "null"
285
+ ]
286
+ },
287
+ "name": {
288
+ "description": "字段展示名称;同一父级内唯一,不单独作为字段身份。",
289
+ "minLength": 1,
290
+ "type": "string"
291
+ },
292
+ "queId": {
293
+ "description": "已有字段的后端 ID;get 返回,新增字段省略。",
294
+ "minimum": 1,
295
+ "type": "integer"
296
+ },
297
+ "required": {
298
+ "description": "是否必填;缺失时保留已有字段当前值。",
299
+ "type": "boolean"
300
+ },
301
+ "width": {
302
+ "description": "字段在所在行的宽度百分比;同一行要么全部提供且合计 100,要么全部省略。",
303
+ "maximum": 100,
304
+ "minimum": 1,
305
+ "type": "integer"
306
+ }
307
+ },
308
+ "required": [
309
+ "name"
310
+ ],
311
+ "type": "object"
312
+ },
313
+ "ReferenceDefaultValue": {
314
+ "additionalProperties": false,
315
+ "properties": {
316
+ "applyId": {
317
+ "type": [
318
+ "integer",
319
+ "null"
320
+ ]
321
+ },
322
+ "dataTitle": {
323
+ "type": [
324
+ "string",
325
+ "null"
326
+ ]
327
+ },
328
+ "values": {
329
+ "items": {
330
+ "$ref": "#/$defs/DefaultValues"
331
+ },
332
+ "type": "array"
333
+ }
334
+ },
335
+ "type": "object"
336
+ },
337
+ "ScalarDefaultValue": {
338
+ "description": "不包含对象或数组的普通字段默认值。",
339
+ "type": [
340
+ "null",
341
+ "boolean",
342
+ "number",
343
+ "string"
344
+ ]
345
+ }
346
+ },
347
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/fields/attachment.json",
348
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
349
+ "allOf": [
350
+ {
351
+ "$ref": "#/$defs/FieldCommon"
352
+ },
353
+ {
354
+ "properties": {
355
+ "config": {
356
+ "$ref": "#/$defs/AttachmentConfig"
357
+ },
358
+ "dataCover": {
359
+ "type": "boolean"
360
+ },
361
+ "type": {
362
+ "const": "attachment"
363
+ }
364
+ },
365
+ "required": [
366
+ "type"
367
+ ]
368
+ }
369
+ ],
370
+ "title": "Qingflow AppForm v1alpha1 attachment field",
371
+ "type": "object",
372
+ "unevaluatedProperties": false
373
+ }
@@ -0,0 +1,242 @@
1
+ {
2
+ "$defs": {
3
+ "CodeBlockBinding": {
4
+ "additionalProperties": false,
5
+ "description": "代码块的输入、代码和输出映射。",
6
+ "properties": {
7
+ "autoTrigger": {
8
+ "description": "是否在输入变化时自动执行代码块。",
9
+ "type": [
10
+ "boolean",
11
+ "null"
12
+ ]
13
+ },
14
+ "code": {
15
+ "description": "代码块源码;MCP/CLI 仅保存,不执行。",
16
+ "minLength": 1,
17
+ "type": "string"
18
+ },
19
+ "customButtonText": {
20
+ "description": "自定义触发按钮文案。",
21
+ "type": [
22
+ "string",
23
+ "null"
24
+ ]
25
+ },
26
+ "customButtonTextEnabled": {
27
+ "description": "是否启用自定义触发按钮文案。",
28
+ "type": [
29
+ "boolean",
30
+ "null"
31
+ ]
32
+ },
33
+ "hideOnForm": {
34
+ "description": "是否在表单填写界面隐藏该代码块字段。",
35
+ "type": [
36
+ "boolean",
37
+ "null"
38
+ ]
39
+ },
40
+ "inputs": {
41
+ "description": "当前表单字段到代码变量的映射。",
42
+ "items": {
43
+ "$ref": "#/$defs/CodeBlockInputBinding"
44
+ },
45
+ "type": "array"
46
+ },
47
+ "outputs": {
48
+ "description": "代码输出路径到目标字段的映射。",
49
+ "items": {
50
+ "$ref": "#/$defs/CodeBlockOutputBinding"
51
+ },
52
+ "type": "array"
53
+ }
54
+ },
55
+ "required": [
56
+ "code"
57
+ ],
58
+ "type": "object"
59
+ },
60
+ "CodeBlockConfig": {
61
+ "additionalProperties": false,
62
+ "description": "代码块的高层声明;无法无损还原为该结构时阻断处理。",
63
+ "properties": {
64
+ "codeBlockBinding": {
65
+ "$ref": "#/$defs/CodeBlockBinding"
66
+ }
67
+ },
68
+ "required": [
69
+ "codeBlockBinding"
70
+ ],
71
+ "type": "object"
72
+ },
73
+ "CodeBlockInputBinding": {
74
+ "additionalProperties": false,
75
+ "description": "一个表单字段到代码变量的映射。",
76
+ "properties": {
77
+ "field": {
78
+ "$ref": "#/$defs/FieldSelector",
79
+ "description": "输入来源字段。"
80
+ },
81
+ "var": {
82
+ "description": "代码中的变量名;null 表示沿用后端默认变量名。",
83
+ "type": [
84
+ "string",
85
+ "null"
86
+ ]
87
+ }
88
+ },
89
+ "required": [
90
+ "field"
91
+ ],
92
+ "type": "object"
93
+ },
94
+ "CodeBlockOutputBinding": {
95
+ "additionalProperties": false,
96
+ "description": "一个代码输出值到表单字段的映射。",
97
+ "properties": {
98
+ "alias": {
99
+ "description": "输出别名;用于后续数据关联引用。",
100
+ "minLength": 1,
101
+ "type": "string"
102
+ },
103
+ "aliasId": {
104
+ "description": "后端生成的输出别名 ID;新增输出时可省略,get 返回后必须保留。",
105
+ "minimum": 1,
106
+ "type": "integer"
107
+ },
108
+ "path": {
109
+ "description": "从 qf_output 中取值的 JSONPath。",
110
+ "minLength": 1,
111
+ "type": "string"
112
+ },
113
+ "targetField": {
114
+ "$ref": "#/$defs/FieldSelector",
115
+ "description": "接收结果的当前表单字段。"
116
+ }
117
+ },
118
+ "required": [
119
+ "alias",
120
+ "path",
121
+ "targetField"
122
+ ],
123
+ "type": "object"
124
+ },
125
+ "FieldCommon": {
126
+ "description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
127
+ "properties": {
128
+ "dataTitle": {
129
+ "description": "是否作为数据标题;整个 body 最多且必须按规则存在一个。",
130
+ "type": "boolean"
131
+ },
132
+ "defaultType": {
133
+ "default": 1,
134
+ "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
135
+ "enum": [
136
+ 1,
137
+ 2,
138
+ 3
139
+ ],
140
+ "type": "integer"
141
+ },
142
+ "defaultValue": {
143
+ "$ref": "#/$defs/ScalarDefaultValue",
144
+ "description": "普通字段的标量默认值;表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
145
+ },
146
+ "description": {
147
+ "description": "字段说明;null 或空字符串表示清空。",
148
+ "type": [
149
+ "string",
150
+ "null"
151
+ ]
152
+ },
153
+ "name": {
154
+ "description": "字段展示名称;同一父级内唯一,不单独作为字段身份。",
155
+ "minLength": 1,
156
+ "type": "string"
157
+ },
158
+ "queId": {
159
+ "description": "已有字段的后端 ID;get 返回,新增字段省略。",
160
+ "minimum": 1,
161
+ "type": "integer"
162
+ },
163
+ "required": {
164
+ "description": "是否必填;缺失时保留已有字段当前值。",
165
+ "type": "boolean"
166
+ },
167
+ "width": {
168
+ "description": "字段在所在行的宽度百分比;同一行要么全部提供且合计 100,要么全部省略。",
169
+ "maximum": 100,
170
+ "minimum": 1,
171
+ "type": "integer"
172
+ }
173
+ },
174
+ "required": [
175
+ "name"
176
+ ],
177
+ "type": "object"
178
+ },
179
+ "FieldSelector": {
180
+ "additionalProperties": false,
181
+ "anyOf": [
182
+ {
183
+ "required": [
184
+ "queId"
185
+ ]
186
+ },
187
+ {
188
+ "required": [
189
+ "name"
190
+ ]
191
+ }
192
+ ],
193
+ "description": "跨字段引用选择器;至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
194
+ "properties": {
195
+ "name": {
196
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
197
+ "minLength": 1,
198
+ "type": "string"
199
+ },
200
+ "queId": {
201
+ "description": "已有字段的后端 ID;优先用于精确解析。",
202
+ "minimum": 1,
203
+ "type": "integer"
204
+ }
205
+ },
206
+ "type": "object"
207
+ },
208
+ "ScalarDefaultValue": {
209
+ "description": "不包含对象或数组的普通字段默认值。",
210
+ "type": [
211
+ "null",
212
+ "boolean",
213
+ "number",
214
+ "string"
215
+ ]
216
+ }
217
+ },
218
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/fields/code_block.json",
219
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
220
+ "allOf": [
221
+ {
222
+ "$ref": "#/$defs/FieldCommon"
223
+ },
224
+ {
225
+ "properties": {
226
+ "config": {
227
+ "$ref": "#/$defs/CodeBlockConfig"
228
+ },
229
+ "type": {
230
+ "const": "code_block"
231
+ }
232
+ },
233
+ "required": [
234
+ "type",
235
+ "config"
236
+ ]
237
+ }
238
+ ],
239
+ "title": "Qingflow AppForm v1alpha1 code_block field",
240
+ "type": "object",
241
+ "unevaluatedProperties": false
242
+ }