@qingflow-tech/qingflow-cli 1.1.43 → 1.1.44

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 (77) hide show
  1. package/README.md +13 -6
  2. package/entry_point.py +1 -1
  3. package/npm/bin/qingflow.mjs +1 -2
  4. package/npm/lib/runtime.mjs +3 -7
  5. package/package.json +2 -2
  6. package/pyproject.toml +3 -4
  7. package/skills/qingflow-app-form/SKILL.md +66 -0
  8. package/skills/qingflow-app-form/agents/openai.yaml +4 -0
  9. package/skills/qingflow-cli/SKILL.md +8 -6
  10. package/skills/qingflow-cli/manifest.yaml +1 -1
  11. package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_APP_DELIVERY_WORKFLOW.md +4 -4
  12. package/skills/qingflow-cli/reference/QINGFLOW_CLI_EXPLORATION_REPORT.md +1 -1
  13. package/skills/qingflow-cli/reference/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
  14. package/skills/qingflow-cli/reference/QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md +4 -4
  15. package/skills/qingflow-cli/reference/builder/10-build-single-app.md +5 -5
  16. package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +14 -14
  17. package/skills/qingflow-cli/reference/builder/30-schema-fields.md +102 -103
  18. package/skills/qingflow-cli/reference/builder/40-layout.md +39 -31
  19. package/skills/qingflow-cli/reference/builder/README.md +9 -9
  20. package/skills/qingflow-cli/reference/builder/code-integrations/README.md +4 -2
  21. package/skills/qingflow-cli/reference/builder/code-integrations/code-block.md +2 -0
  22. package/skills/qingflow-cli/reference/builder/code-integrations/q-linker.md +2 -0
  23. package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +45 -38
  24. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_EXPLORATION_REPORT.md +1 -1
  25. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
  26. package/skills/qingflow-cli/reference/examples/README.md +3 -3
  27. package/skills/qingflow-common/SKILL.md +47 -0
  28. package/skills/qingflow-common/agents/openai.yaml +4 -0
  29. package/src/qingflow_mcp/__main__.py +2 -3
  30. package/src/qingflow_mcp/app_form_compat.py +104 -0
  31. package/src/qingflow_mcp/app_form_validator.py +462 -0
  32. package/src/qingflow_mcp/builder_facade/app_form.py +3992 -0
  33. package/src/qingflow_mcp/builder_facade/app_form_schema.py +425 -0
  34. package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +42 -0
  35. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +2969 -0
  36. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +392 -0
  37. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +236 -0
  38. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +425 -0
  39. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +318 -0
  40. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +580 -0
  41. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +150 -0
  42. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +150 -0
  43. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +345 -0
  44. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +190 -0
  45. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +190 -0
  46. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +190 -0
  47. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +484 -0
  48. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +214 -0
  49. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +236 -0
  50. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +199 -0
  51. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +412 -0
  52. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +454 -0
  53. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +214 -0
  54. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +214 -0
  55. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +1921 -0
  56. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +190 -0
  57. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/formula.json +1594 -0
  58. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +718 -0
  59. package/src/qingflow_mcp/builder_facade/service.py +8 -4
  60. package/src/qingflow_mcp/cli/commands/builder.py +93 -28
  61. package/src/qingflow_mcp/cli/json_io.py +21 -2
  62. package/src/qingflow_mcp/cli/main.py +3 -39
  63. package/src/qingflow_mcp/public_surface.py +5 -2
  64. package/src/qingflow_mcp/response_trim.py +50 -0
  65. package/src/qingflow_mcp/server.py +24 -3
  66. package/src/qingflow_mcp/server_app_builder.py +44 -87
  67. package/src/qingflow_mcp/tools/ai_builder_tools.py +103 -100
  68. package/src/qingflow_mcp/tools/app_tools.py +46 -65
  69. package/src/qingflow_mcp/tools/record_tools.py +3 -3
  70. package/src/qingflow_mcp/version.py +2 -4
  71. package/docs/local-agent-install.md +0 -370
  72. package/skills/qingflow-mcp-setup/SKILL.md +0 -115
  73. package/skills/qingflow-mcp-setup/agents/openai.yaml +0 -4
  74. package/skills/qingflow-mcp-setup/references/claude-desktop.md +0 -34
  75. package/skills/qingflow-mcp-setup/references/environments.md +0 -62
  76. package/skills/qingflow-mcp-setup/references/generic-stdio.md +0 -32
  77. package/skills/qingflow-mcp-setup/scripts/check_local_server.sh +0 -38
@@ -0,0 +1,484 @@
1
+ {
2
+ "$defs": {
3
+ "DepartmentSelector": {
4
+ "additionalProperties": false,
5
+ "description": "部门身份;deptId 必填,deptName 仅用于展示。",
6
+ "properties": {
7
+ "deptId": {
8
+ "minimum": 1,
9
+ "type": "integer"
10
+ },
11
+ "deptName": {
12
+ "minLength": 1,
13
+ "type": "string"
14
+ }
15
+ },
16
+ "required": [
17
+ "deptId"
18
+ ],
19
+ "type": "object"
20
+ },
21
+ "DynamicMemberSelector": {
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "queId": {
25
+ "type": "integer"
26
+ },
27
+ "queTitle": {
28
+ "type": "string"
29
+ },
30
+ "type": {
31
+ "minimum": 1,
32
+ "type": "integer"
33
+ }
34
+ },
35
+ "required": [
36
+ "type"
37
+ ],
38
+ "type": "object"
39
+ },
40
+ "ExternalDepartmentSelector": {
41
+ "additionalProperties": false,
42
+ "properties": {
43
+ "deptId": {
44
+ "minimum": 1,
45
+ "type": "integer"
46
+ },
47
+ "deptName": {
48
+ "type": "string"
49
+ }
50
+ },
51
+ "required": [
52
+ "deptId"
53
+ ],
54
+ "type": "object"
55
+ },
56
+ "ExternalMemberSelector": {
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "email": {
60
+ "type": "string"
61
+ },
62
+ "nickName": {
63
+ "type": "string"
64
+ },
65
+ "uid": {
66
+ "minimum": 1,
67
+ "type": "integer"
68
+ }
69
+ },
70
+ "required": [
71
+ "uid"
72
+ ],
73
+ "type": "object"
74
+ },
75
+ "FieldCommon": {
76
+ "allOf": [
77
+ {
78
+ "if": {
79
+ "properties": {
80
+ "defaultType": {
81
+ "const": 2
82
+ }
83
+ },
84
+ "required": [
85
+ "defaultType"
86
+ ]
87
+ },
88
+ "then": {
89
+ "properties": {
90
+ "defaultValue": {
91
+ "type": "null"
92
+ }
93
+ }
94
+ }
95
+ },
96
+ {
97
+ "if": {
98
+ "properties": {
99
+ "defaultType": {
100
+ "const": 3
101
+ }
102
+ },
103
+ "required": [
104
+ "defaultType"
105
+ ]
106
+ },
107
+ "then": {
108
+ "properties": {
109
+ "defaultValue": {
110
+ "minLength": 1,
111
+ "type": [
112
+ "string",
113
+ "null"
114
+ ]
115
+ }
116
+ }
117
+ }
118
+ }
119
+ ],
120
+ "anyOf": [
121
+ {
122
+ "required": [
123
+ "queId"
124
+ ]
125
+ },
126
+ {
127
+ "required": [
128
+ "name"
129
+ ]
130
+ }
131
+ ],
132
+ "description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
133
+ "properties": {
134
+ "beingRequired": {
135
+ "description": "该字段是否必填;缺失时保留已有字段当前值。",
136
+ "type": "boolean"
137
+ },
138
+ "defaultType": {
139
+ "default": 1,
140
+ "description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
141
+ "enum": [
142
+ 1,
143
+ 2,
144
+ 3
145
+ ],
146
+ "type": "integer"
147
+ },
148
+ "defaultValue": {
149
+ "$ref": "#/$defs/ScalarDefaultValue",
150
+ "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
151
+ },
152
+ "name": {
153
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
154
+ "minLength": 1,
155
+ "type": "string"
156
+ },
157
+ "queId": {
158
+ "description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
159
+ "minimum": 1,
160
+ "type": "integer"
161
+ },
162
+ "questionDescription": {
163
+ "description": "字段说明;null 或空字符串表示清空。",
164
+ "type": [
165
+ "string",
166
+ "null"
167
+ ]
168
+ },
169
+ "questionType": {
170
+ "description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
171
+ "type": "string"
172
+ },
173
+ "width": {
174
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
175
+ "enum": [
176
+ 25,
177
+ 50,
178
+ 75,
179
+ 100
180
+ ],
181
+ "type": "integer"
182
+ }
183
+ },
184
+ "type": "object"
185
+ },
186
+ "FieldSelector": {
187
+ "additionalProperties": false,
188
+ "anyOf": [
189
+ {
190
+ "required": [
191
+ "queId"
192
+ ]
193
+ },
194
+ {
195
+ "required": [
196
+ "name"
197
+ ]
198
+ }
199
+ ],
200
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
201
+ "properties": {
202
+ "name": {
203
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
204
+ "minLength": 1,
205
+ "type": "string"
206
+ },
207
+ "queId": {
208
+ "description": "已有字段的后端 ID;优先用于精确解析。",
209
+ "minimum": 1,
210
+ "type": "integer"
211
+ }
212
+ },
213
+ "type": "object"
214
+ },
215
+ "MemberConfig": {
216
+ "additionalProperties": false,
217
+ "description": "成员字段的选择范围和默认成员。",
218
+ "properties": {
219
+ "canScan": {
220
+ "type": [
221
+ "boolean",
222
+ "null"
223
+ ]
224
+ },
225
+ "defaultMembers": {
226
+ "$ref": "#/$defs/MemberScope"
227
+ },
228
+ "memberScope": {
229
+ "$ref": "#/$defs/MemberScope"
230
+ },
231
+ "memberScopeRelation": {
232
+ "$ref": "#/$defs/SelectScopeRelation"
233
+ },
234
+ "noRepeat": {
235
+ "type": [
236
+ "boolean",
237
+ "null"
238
+ ]
239
+ },
240
+ "scanType": {
241
+ "minimum": 0,
242
+ "type": [
243
+ "integer",
244
+ "null"
245
+ ]
246
+ }
247
+ },
248
+ "type": "object"
249
+ },
250
+ "MemberScope": {
251
+ "description": "成员字段可选范围;all 为工作区全部成员,custom 为显式成员/部门/角色或动态成员,relation 为按字段关联。",
252
+ "oneOf": [
253
+ {
254
+ "additionalProperties": false,
255
+ "properties": {
256
+ "includeSubDeparts": {
257
+ "type": "boolean"
258
+ },
259
+ "mode": {
260
+ "const": "all"
261
+ }
262
+ },
263
+ "required": [
264
+ "mode"
265
+ ],
266
+ "type": "object"
267
+ },
268
+ {
269
+ "additionalProperties": false,
270
+ "properties": {
271
+ "departments": {
272
+ "items": {
273
+ "$ref": "#/$defs/DepartmentSelector"
274
+ },
275
+ "type": "array"
276
+ },
277
+ "dynamic": {
278
+ "items": {
279
+ "$ref": "#/$defs/DynamicMemberSelector"
280
+ },
281
+ "type": "array"
282
+ },
283
+ "externalDepartments": {
284
+ "items": {
285
+ "$ref": "#/$defs/ExternalDepartmentSelector"
286
+ },
287
+ "type": "array"
288
+ },
289
+ "externalMembers": {
290
+ "items": {
291
+ "$ref": "#/$defs/ExternalMemberSelector"
292
+ },
293
+ "type": "array"
294
+ },
295
+ "includeSubDeparts": {
296
+ "type": "boolean"
297
+ },
298
+ "members": {
299
+ "items": {
300
+ "$ref": "#/$defs/MemberSelector"
301
+ },
302
+ "type": "array"
303
+ },
304
+ "mode": {
305
+ "const": "custom"
306
+ },
307
+ "roles": {
308
+ "items": {
309
+ "$ref": "#/$defs/RoleSelector"
310
+ },
311
+ "type": "array"
312
+ }
313
+ },
314
+ "required": [
315
+ "mode"
316
+ ],
317
+ "type": "object"
318
+ },
319
+ {
320
+ "additionalProperties": false,
321
+ "properties": {
322
+ "departments": {
323
+ "items": {
324
+ "$ref": "#/$defs/DepartmentSelector"
325
+ },
326
+ "type": "array"
327
+ },
328
+ "dynamic": {
329
+ "items": {
330
+ "$ref": "#/$defs/DynamicMemberSelector"
331
+ },
332
+ "type": "array"
333
+ },
334
+ "externalDepartments": {
335
+ "items": {
336
+ "$ref": "#/$defs/ExternalDepartmentSelector"
337
+ },
338
+ "type": "array"
339
+ },
340
+ "externalMembers": {
341
+ "items": {
342
+ "$ref": "#/$defs/ExternalMemberSelector"
343
+ },
344
+ "type": "array"
345
+ },
346
+ "includeSubDeparts": {
347
+ "type": "boolean"
348
+ },
349
+ "members": {
350
+ "items": {
351
+ "$ref": "#/$defs/MemberSelector"
352
+ },
353
+ "type": "array"
354
+ },
355
+ "mode": {
356
+ "const": "relation"
357
+ },
358
+ "roles": {
359
+ "items": {
360
+ "$ref": "#/$defs/RoleSelector"
361
+ },
362
+ "type": "array"
363
+ }
364
+ },
365
+ "required": [
366
+ "mode"
367
+ ],
368
+ "type": "object"
369
+ }
370
+ ]
371
+ },
372
+ "MemberSelector": {
373
+ "additionalProperties": false,
374
+ "properties": {
375
+ "nickName": {
376
+ "minLength": 1,
377
+ "type": "string"
378
+ },
379
+ "uid": {
380
+ "minimum": 1,
381
+ "type": "integer"
382
+ }
383
+ },
384
+ "required": [
385
+ "uid"
386
+ ],
387
+ "type": "object"
388
+ },
389
+ "RoleSelector": {
390
+ "additionalProperties": false,
391
+ "properties": {
392
+ "roleId": {
393
+ "minimum": 1,
394
+ "type": "integer"
395
+ },
396
+ "roleName": {
397
+ "minLength": 1,
398
+ "type": "string"
399
+ }
400
+ },
401
+ "required": [
402
+ "roleId"
403
+ ],
404
+ "type": "object"
405
+ },
406
+ "ScalarDefaultValue": {
407
+ "description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。defaultType 为 3 时,通过 AppForm Schema 查询能力传入当前 schema_version 并设置 schema_kind=formula 获取公式语法、字段引用、运算符和全部函数说明;CLI 使用 builder app-form schema --schema-kind formula。需要配置结构化默认值时,传入当前 schema_version,并将字段的 questionType 作为 field_type 获取字段详细 Schema。",
408
+ "type": [
409
+ "null",
410
+ "string"
411
+ ]
412
+ },
413
+ "SelectScopeRelation": {
414
+ "additionalProperties": false,
415
+ "properties": {
416
+ "displayedField": {
417
+ "$ref": "#/$defs/FieldSelector"
418
+ },
419
+ "displayedFieldType": {
420
+ "type": [
421
+ "integer",
422
+ "null"
423
+ ]
424
+ },
425
+ "matchRuleFormula": {
426
+ "type": [
427
+ "string",
428
+ "null"
429
+ ]
430
+ },
431
+ "matchRuleType": {
432
+ "type": [
433
+ "integer",
434
+ "null"
435
+ ]
436
+ },
437
+ "matchRules": {
438
+ "type": [
439
+ "array",
440
+ "null"
441
+ ]
442
+ },
443
+ "targetAppKey": {
444
+ "minLength": 1,
445
+ "type": "string"
446
+ },
447
+ "targetAppTitle": {
448
+ "type": [
449
+ "string",
450
+ "null"
451
+ ]
452
+ }
453
+ },
454
+ "required": [
455
+ "displayedField",
456
+ "targetAppKey"
457
+ ],
458
+ "type": "object"
459
+ }
460
+ },
461
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/fields/member.json",
462
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
463
+ "allOf": [
464
+ {
465
+ "$ref": "#/$defs/FieldCommon"
466
+ },
467
+ {
468
+ "properties": {
469
+ "config": {
470
+ "$ref": "#/$defs/MemberConfig"
471
+ },
472
+ "questionType": {
473
+ "const": "member"
474
+ }
475
+ },
476
+ "required": [
477
+ "questionType"
478
+ ]
479
+ }
480
+ ],
481
+ "title": "Qingflow AppForm v1alpha1 member field",
482
+ "type": "object",
483
+ "unevaluatedProperties": false
484
+ }
@@ -0,0 +1,214 @@
1
+ {
2
+ "$defs": {
3
+ "ChoiceConfig": {
4
+ "additionalProperties": false,
5
+ "description": "选择类字段配置。",
6
+ "properties": {
7
+ "beingShowColor": {
8
+ "description": "是否展示选项颜色。",
9
+ "type": [
10
+ "boolean",
11
+ "null"
12
+ ]
13
+ },
14
+ "defaultOptions": {
15
+ "description": "选项默认选中状态;值必须来自 options,省略表示保留现有状态。",
16
+ "items": {
17
+ "minLength": 1,
18
+ "type": "string"
19
+ },
20
+ "type": "array",
21
+ "uniqueItems": true
22
+ },
23
+ "maxOpts": {
24
+ "description": "最多选择项数;null 表示不限制。",
25
+ "minimum": 0,
26
+ "type": [
27
+ "integer",
28
+ "null"
29
+ ]
30
+ },
31
+ "minOpts": {
32
+ "description": "最少选择项数;null 表示不限制。",
33
+ "minimum": 0,
34
+ "type": [
35
+ "integer",
36
+ "null"
37
+ ]
38
+ },
39
+ "optDirection": {
40
+ "description": "选项排列方向 ID。",
41
+ "minimum": 0,
42
+ "type": [
43
+ "integer",
44
+ "null"
45
+ ]
46
+ },
47
+ "optSelectMode": {
48
+ "description": "多项选择模式 ID。",
49
+ "minimum": 0,
50
+ "type": [
51
+ "integer",
52
+ "null"
53
+ ]
54
+ },
55
+ "options": {
56
+ "description": "非空有序选项文案;缺失选项表示从该字段配置中删除。",
57
+ "items": {
58
+ "minLength": 1,
59
+ "type": "string"
60
+ },
61
+ "minItems": 1,
62
+ "type": "array",
63
+ "uniqueItems": true
64
+ }
65
+ },
66
+ "required": [
67
+ "options"
68
+ ],
69
+ "type": "object"
70
+ },
71
+ "FieldCommon": {
72
+ "allOf": [
73
+ {
74
+ "if": {
75
+ "properties": {
76
+ "defaultType": {
77
+ "const": 2
78
+ }
79
+ },
80
+ "required": [
81
+ "defaultType"
82
+ ]
83
+ },
84
+ "then": {
85
+ "properties": {
86
+ "defaultValue": {
87
+ "type": "null"
88
+ }
89
+ }
90
+ }
91
+ },
92
+ {
93
+ "if": {
94
+ "properties": {
95
+ "defaultType": {
96
+ "const": 3
97
+ }
98
+ },
99
+ "required": [
100
+ "defaultType"
101
+ ]
102
+ },
103
+ "then": {
104
+ "properties": {
105
+ "defaultValue": {
106
+ "minLength": 1,
107
+ "type": [
108
+ "string",
109
+ "null"
110
+ ]
111
+ }
112
+ }
113
+ }
114
+ }
115
+ ],
116
+ "anyOf": [
117
+ {
118
+ "required": [
119
+ "queId"
120
+ ]
121
+ },
122
+ {
123
+ "required": [
124
+ "name"
125
+ ]
126
+ }
127
+ ],
128
+ "description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
129
+ "properties": {
130
+ "beingRequired": {
131
+ "description": "该字段是否必填;缺失时保留已有字段当前值。",
132
+ "type": "boolean"
133
+ },
134
+ "defaultType": {
135
+ "default": 1,
136
+ "description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
137
+ "enum": [
138
+ 1,
139
+ 2,
140
+ 3
141
+ ],
142
+ "type": "integer"
143
+ },
144
+ "defaultValue": {
145
+ "$ref": "#/$defs/ScalarDefaultValue",
146
+ "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
147
+ },
148
+ "name": {
149
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
150
+ "minLength": 1,
151
+ "type": "string"
152
+ },
153
+ "queId": {
154
+ "description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
155
+ "minimum": 1,
156
+ "type": "integer"
157
+ },
158
+ "questionDescription": {
159
+ "description": "字段说明;null 或空字符串表示清空。",
160
+ "type": [
161
+ "string",
162
+ "null"
163
+ ]
164
+ },
165
+ "questionType": {
166
+ "description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
167
+ "type": "string"
168
+ },
169
+ "width": {
170
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
171
+ "enum": [
172
+ 25,
173
+ 50,
174
+ 75,
175
+ 100
176
+ ],
177
+ "type": "integer"
178
+ }
179
+ },
180
+ "type": "object"
181
+ },
182
+ "ScalarDefaultValue": {
183
+ "description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。defaultType 为 3 时,通过 AppForm Schema 查询能力传入当前 schema_version 并设置 schema_kind=formula 获取公式语法、字段引用、运算符和全部函数说明;CLI 使用 builder app-form schema --schema-kind formula。需要配置结构化默认值时,传入当前 schema_version,并将字段的 questionType 作为 field_type 获取字段详细 Schema。",
184
+ "type": [
185
+ "null",
186
+ "string"
187
+ ]
188
+ }
189
+ },
190
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/fields/multi_select.json",
191
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
192
+ "allOf": [
193
+ {
194
+ "$ref": "#/$defs/FieldCommon"
195
+ },
196
+ {
197
+ "properties": {
198
+ "config": {
199
+ "$ref": "#/$defs/ChoiceConfig"
200
+ },
201
+ "questionType": {
202
+ "const": "multi_select"
203
+ }
204
+ },
205
+ "required": [
206
+ "questionType",
207
+ "config"
208
+ ]
209
+ }
210
+ ],
211
+ "title": "Qingflow AppForm v1alpha1 multi_select field",
212
+ "type": "object",
213
+ "unevaluatedProperties": false
214
+ }