@qingflow-tech/qingflow-cli 1.1.43 → 1.1.44-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 (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 +108 -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 +4205 -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,718 @@
1
+ {
2
+ "$defs": {
3
+ "AppFormSpec": {
4
+ "additionalProperties": false,
5
+ "description": "表单基础配置与字段布局目标态;除 body 外,缺失属性表示保留当前值。应用内所有 q_linker 和 code_block 字段的 outputs[].targetField 必须全局唯一,同一实际字段只能被一个输出映射写入。多个生产方需要回写时,请选择不同目标字段或合并为一个生产方。",
6
+ "properties": {
7
+ "appDescription": {
8
+ "description": "应用描述;null 或空字符串表示清空。",
9
+ "type": [
10
+ "string",
11
+ "null"
12
+ ]
13
+ },
14
+ "appName": {
15
+ "description": "应用名称;缺失时保留当前名称。",
16
+ "minLength": 1,
17
+ "type": "string"
18
+ },
19
+ "attachments": {
20
+ "description": "应用附件完整目标态;空数组表示删除全部应用附件。",
21
+ "items": {
22
+ "$ref": "#/$defs/Attachment"
23
+ },
24
+ "type": "array"
25
+ },
26
+ "body": {
27
+ "$ref": "#/$defs/Body",
28
+ "description": "业务字段与布局的完整目标态;缺失字段或段落表示删除。应用内所有 Q-Linker 和代码块的 outputs[].targetField 不得重复选择同一实际字段。"
29
+ },
30
+ "dataCoverField": {
31
+ "description": "数据封面字段选择器;指定每条数据的封面附件来源。仅允许选择顶层 attachment 字段;null 表示清除数据封面。",
32
+ "oneOf": [
33
+ {
34
+ "type": "null"
35
+ },
36
+ {
37
+ "$ref": "#/$defs/FieldSelector"
38
+ }
39
+ ]
40
+ },
41
+ "dataTitleField": {
42
+ "description": "数据标题字段选择器;指定每条数据的主显示标题来源。创建非空 body 时必填,更新时省略表示保留当前选择;显式提供时必须唯一定位一个顶层字段,仅 body 为空时允许 null。",
43
+ "oneOf": [
44
+ {
45
+ "type": "null"
46
+ },
47
+ {
48
+ "$ref": "#/$defs/FieldSelector"
49
+ }
50
+ ]
51
+ },
52
+ "serialNumber": {
53
+ "$ref": "#/$defs/SerialNumber",
54
+ "description": "应用编号规则;支持默认编号或自定义组件编号。"
55
+ }
56
+ },
57
+ "required": [
58
+ "body"
59
+ ],
60
+ "type": "object"
61
+ },
62
+ "Attachment": {
63
+ "additionalProperties": false,
64
+ "description": "应用级附件;已有附件由 attachId 复用,新增附件省略 attachId。",
65
+ "properties": {
66
+ "attachId": {
67
+ "description": "后端生成的附件 ID;get 返回,新增时省略。",
68
+ "minimum": 1,
69
+ "type": "integer"
70
+ },
71
+ "fileName": {
72
+ "description": "附件展示名称。",
73
+ "minLength": 1,
74
+ "type": "string"
75
+ },
76
+ "fileUrl": {
77
+ "description": "已上传文件的可访问 URL。",
78
+ "minLength": 1,
79
+ "type": "string"
80
+ }
81
+ },
82
+ "required": [
83
+ "fileName",
84
+ "fileUrl"
85
+ ],
86
+ "type": "object"
87
+ },
88
+ "Body": {
89
+ "description": "有序表单内容块;空数组表示删除全部业务字段和段落。",
90
+ "items": {
91
+ "$ref": "#/$defs/BodyBlock"
92
+ },
93
+ "type": "array"
94
+ },
95
+ "BodyBlock": {
96
+ "description": "根级普通行或独占外层位置的段落。",
97
+ "oneOf": [
98
+ {
99
+ "$ref": "#/$defs/RowBlock"
100
+ },
101
+ {
102
+ "$ref": "#/$defs/SectionBlock"
103
+ }
104
+ ]
105
+ },
106
+ "FieldRow": {
107
+ "additionalProperties": false,
108
+ "description": "段落内部字段行。",
109
+ "properties": {
110
+ "fields": {
111
+ "description": "本行的 1 到 4 个顶层字段。",
112
+ "items": {
113
+ "$ref": "#/$defs/TopField"
114
+ },
115
+ "maxItems": 4,
116
+ "minItems": 1,
117
+ "type": "array"
118
+ }
119
+ },
120
+ "required": [
121
+ "fields"
122
+ ],
123
+ "type": "object"
124
+ },
125
+ "FieldSelector": {
126
+ "additionalProperties": false,
127
+ "anyOf": [
128
+ {
129
+ "required": [
130
+ "queId"
131
+ ]
132
+ },
133
+ {
134
+ "required": [
135
+ "name"
136
+ ]
137
+ }
138
+ ],
139
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
140
+ "properties": {
141
+ "name": {
142
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
143
+ "minLength": 1,
144
+ "type": "string"
145
+ },
146
+ "queId": {
147
+ "description": "已有字段的后端 ID;优先用于精确解析。",
148
+ "minimum": 1,
149
+ "type": "integer"
150
+ }
151
+ },
152
+ "type": "object"
153
+ },
154
+ "FieldSummary": {
155
+ "additionalProperties": false,
156
+ "allOf": [
157
+ {
158
+ "if": {
159
+ "properties": {
160
+ "defaultType": {
161
+ "const": 2
162
+ }
163
+ },
164
+ "required": [
165
+ "defaultType"
166
+ ]
167
+ },
168
+ "then": {
169
+ "properties": {
170
+ "defaultValue": {
171
+ "type": "null"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ {
177
+ "if": {
178
+ "properties": {
179
+ "defaultType": {
180
+ "const": 3
181
+ }
182
+ },
183
+ "required": [
184
+ "defaultType"
185
+ ]
186
+ },
187
+ "then": {
188
+ "properties": {
189
+ "defaultValue": {
190
+ "minLength": 1,
191
+ "type": [
192
+ "string",
193
+ "null"
194
+ ]
195
+ }
196
+ }
197
+ }
198
+ }
199
+ ],
200
+ "anyOf": [
201
+ {
202
+ "required": [
203
+ "queId"
204
+ ]
205
+ },
206
+ {
207
+ "required": [
208
+ "name"
209
+ ]
210
+ }
211
+ ],
212
+ "properties": {
213
+ "beingRequired": {
214
+ "description": "该字段是否必填;缺失时更新保留当前值。",
215
+ "type": "boolean"
216
+ },
217
+ "config": {
218
+ "description": "调用对应 questionType 的详细 Schema 后生成;q_linker 和 code_block 的 outputs[].targetField 还必须遵守应用级全局唯一规则。",
219
+ "type": "object"
220
+ },
221
+ "defaultType": {
222
+ "default": 1,
223
+ "description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
224
+ "enum": [
225
+ 1,
226
+ 2,
227
+ 3
228
+ ],
229
+ "type": "integer"
230
+ },
231
+ "defaultValue": {
232
+ "$ref": "#/$defs/ScalarDefaultValue",
233
+ "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
234
+ },
235
+ "name": {
236
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略。",
237
+ "minLength": 1,
238
+ "type": "string"
239
+ },
240
+ "queId": {
241
+ "description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
242
+ "minimum": 1,
243
+ "type": "integer"
244
+ },
245
+ "questionDescription": {
246
+ "description": "字段说明;null 或空字符串表示清空。",
247
+ "type": [
248
+ "string",
249
+ "null"
250
+ ]
251
+ },
252
+ "questionType": {
253
+ "description": "字段类型;必须来自 x-qingflow-supported-field-types。",
254
+ "type": "string"
255
+ },
256
+ "subfields": {
257
+ "description": "仅 subtable 使用;详情见 subtable Schema。",
258
+ "type": "array"
259
+ },
260
+ "width": {
261
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
262
+ "enum": [
263
+ 25,
264
+ 50,
265
+ 75,
266
+ 100
267
+ ],
268
+ "type": "integer"
269
+ }
270
+ },
271
+ "required": [
272
+ "questionType"
273
+ ],
274
+ "type": "object"
275
+ },
276
+ "RowBlock": {
277
+ "additionalProperties": false,
278
+ "description": "根级普通字段行;字段顺序即展示顺序。",
279
+ "properties": {
280
+ "fields": {
281
+ "description": "本行的 1 到 4 个顶层字段。",
282
+ "items": {
283
+ "$ref": "#/$defs/TopField"
284
+ },
285
+ "maxItems": 4,
286
+ "minItems": 1,
287
+ "type": "array"
288
+ },
289
+ "kind": {
290
+ "const": "row",
291
+ "description": "普通行判别值。"
292
+ }
293
+ },
294
+ "required": [
295
+ "kind",
296
+ "fields"
297
+ ],
298
+ "type": "object"
299
+ },
300
+ "RowSummary": {
301
+ "additionalProperties": false,
302
+ "properties": {
303
+ "fields": {
304
+ "items": {
305
+ "$ref": "#/$defs/FieldSummary"
306
+ },
307
+ "maxItems": 4,
308
+ "minItems": 1,
309
+ "type": "array"
310
+ },
311
+ "kind": {
312
+ "const": "row"
313
+ }
314
+ },
315
+ "required": [
316
+ "kind",
317
+ "fields"
318
+ ],
319
+ "type": "object"
320
+ },
321
+ "ScalarDefaultValue": {
322
+ "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。",
323
+ "type": [
324
+ "null",
325
+ "string"
326
+ ]
327
+ },
328
+ "SectionBlock": {
329
+ "additionalProperties": false,
330
+ "description": "段落布局容器;不是业务字段,必须独占一个根级块。",
331
+ "properties": {
332
+ "kind": {
333
+ "const": "section",
334
+ "description": "段落判别值。"
335
+ },
336
+ "rows": {
337
+ "description": "段落内的非空有序字段行。",
338
+ "items": {
339
+ "$ref": "#/$defs/FieldRow"
340
+ },
341
+ "minItems": 1,
342
+ "type": "array"
343
+ },
344
+ "sectionId": {
345
+ "description": "已有段落的真实身份;get 把后端数值 queId 输出为无前导零的正十进制字符串,apply 仅在构造后端 payload 时转回数值 queId,新增段落省略。",
346
+ "pattern": "^[1-9][0-9]*$",
347
+ "type": "string"
348
+ },
349
+ "title": {
350
+ "description": "段落标题。",
351
+ "minLength": 1,
352
+ "type": "string"
353
+ }
354
+ },
355
+ "required": [
356
+ "kind",
357
+ "title",
358
+ "rows"
359
+ ],
360
+ "type": "object"
361
+ },
362
+ "SectionSummary": {
363
+ "additionalProperties": false,
364
+ "properties": {
365
+ "kind": {
366
+ "const": "section"
367
+ },
368
+ "rows": {
369
+ "items": {
370
+ "additionalProperties": false,
371
+ "properties": {
372
+ "fields": {
373
+ "items": {
374
+ "$ref": "#/$defs/FieldSummary"
375
+ },
376
+ "maxItems": 4,
377
+ "minItems": 1,
378
+ "type": "array"
379
+ }
380
+ },
381
+ "required": [
382
+ "fields"
383
+ ],
384
+ "type": "object"
385
+ },
386
+ "minItems": 1,
387
+ "type": "array"
388
+ },
389
+ "sectionId": {
390
+ "pattern": "^[1-9][0-9]*$",
391
+ "type": "string"
392
+ },
393
+ "title": {
394
+ "minLength": 1,
395
+ "type": "string"
396
+ }
397
+ },
398
+ "required": [
399
+ "kind",
400
+ "title",
401
+ "rows"
402
+ ],
403
+ "type": "object"
404
+ },
405
+ "SerialComponent": {
406
+ "description": "自定义编号的组成部分;id 仅用于复用已有组件。",
407
+ "oneOf": [
408
+ {
409
+ "additionalProperties": false,
410
+ "properties": {
411
+ "id": {
412
+ "description": "后端生成的组件 ID;get 返回,新增时省略。",
413
+ "minimum": 1,
414
+ "type": "integer"
415
+ },
416
+ "length": {
417
+ "description": "自动计数部分的位数。",
418
+ "maximum": 9,
419
+ "minimum": 3,
420
+ "type": "integer"
421
+ },
422
+ "repeatPeriod": {
423
+ "description": "自动计数器的重置周期。",
424
+ "enum": [
425
+ "none",
426
+ "day",
427
+ "week",
428
+ "month",
429
+ "year"
430
+ ]
431
+ },
432
+ "type": {
433
+ "const": "auto_count"
434
+ }
435
+ },
436
+ "required": [
437
+ "type",
438
+ "length",
439
+ "repeatPeriod"
440
+ ],
441
+ "type": "object"
442
+ },
443
+ {
444
+ "additionalProperties": false,
445
+ "properties": {
446
+ "dateFormat": {
447
+ "description": "提交时间在编号中的格式。",
448
+ "enum": [
449
+ "year",
450
+ "year_month",
451
+ "year_month_day"
452
+ ]
453
+ },
454
+ "id": {
455
+ "minimum": 1,
456
+ "type": "integer"
457
+ },
458
+ "type": {
459
+ "const": "submit_datetime"
460
+ }
461
+ },
462
+ "required": [
463
+ "type",
464
+ "dateFormat"
465
+ ],
466
+ "type": "object"
467
+ },
468
+ {
469
+ "additionalProperties": false,
470
+ "properties": {
471
+ "id": {
472
+ "minimum": 1,
473
+ "type": "integer"
474
+ },
475
+ "type": {
476
+ "const": "fixed_text"
477
+ },
478
+ "value": {
479
+ "description": "固定拼接文本。",
480
+ "minLength": 1,
481
+ "type": "string"
482
+ }
483
+ },
484
+ "required": [
485
+ "type",
486
+ "value"
487
+ ],
488
+ "type": "object"
489
+ },
490
+ {
491
+ "additionalProperties": false,
492
+ "properties": {
493
+ "dateFormat": {
494
+ "description": "来源为日期字段时的格式。",
495
+ "enum": [
496
+ "year",
497
+ "year_month",
498
+ "year_month_day"
499
+ ]
500
+ },
501
+ "field": {
502
+ "$ref": "#/$defs/FieldSelector",
503
+ "description": "自定义编号中参与拼接的取值来源字段。"
504
+ },
505
+ "id": {
506
+ "minimum": 1,
507
+ "type": "integer"
508
+ },
509
+ "type": {
510
+ "const": "field"
511
+ }
512
+ },
513
+ "required": [
514
+ "type",
515
+ "field"
516
+ ],
517
+ "type": "object"
518
+ }
519
+ ]
520
+ },
521
+ "SerialNumber": {
522
+ "description": "应用数据编号配置;自定义模式必须且只能包含一个自动计数组件。",
523
+ "oneOf": [
524
+ {
525
+ "additionalProperties": false,
526
+ "properties": {
527
+ "mode": {
528
+ "const": "default",
529
+ "description": "使用系统默认编号规则。"
530
+ }
531
+ },
532
+ "required": [
533
+ "mode"
534
+ ],
535
+ "type": "object"
536
+ },
537
+ {
538
+ "additionalProperties": false,
539
+ "properties": {
540
+ "components": {
541
+ "contains": {
542
+ "properties": {
543
+ "type": {
544
+ "const": "auto_count"
545
+ }
546
+ },
547
+ "required": [
548
+ "type"
549
+ ],
550
+ "type": "object"
551
+ },
552
+ "description": "自定义编号组件的完整有序目标态。",
553
+ "items": {
554
+ "$ref": "#/$defs/SerialComponent"
555
+ },
556
+ "maxContains": 1,
557
+ "minContains": 1,
558
+ "minItems": 1,
559
+ "type": "array"
560
+ },
561
+ "mode": {
562
+ "const": "custom",
563
+ "description": "使用按数组顺序拼接的自定义编号组件。"
564
+ }
565
+ },
566
+ "required": [
567
+ "mode",
568
+ "components"
569
+ ],
570
+ "type": "object"
571
+ }
572
+ ]
573
+ },
574
+ "TopField": {
575
+ "$ref": "#/$defs/FieldSummary"
576
+ }
577
+ },
578
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/summary.json",
579
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
580
+ "additionalProperties": false,
581
+ "oneOf": [
582
+ {
583
+ "required": [
584
+ "appKey"
585
+ ]
586
+ },
587
+ {
588
+ "not": {
589
+ "required": [
590
+ "appKey"
591
+ ]
592
+ },
593
+ "properties": {
594
+ "spec": {
595
+ "required": [
596
+ "appName"
597
+ ]
598
+ }
599
+ },
600
+ "required": [
601
+ "packageId"
602
+ ]
603
+ }
604
+ ],
605
+ "properties": {
606
+ "apiVersion": {
607
+ "const": "builder.qingflow.com/v1alpha1"
608
+ },
609
+ "appKey": {
610
+ "description": "更新已有应用时使用;存在非空值即进入更新模式。",
611
+ "minLength": 1,
612
+ "type": "string"
613
+ },
614
+ "packageId": {
615
+ "description": "创建时必填;更新时可选,提供后确保该包引用应用且不移除其他包引用。",
616
+ "minimum": 1,
617
+ "type": "integer"
618
+ },
619
+ "spec": {
620
+ "additionalProperties": false,
621
+ "description": "应用表单目标态;应用内所有 q_linker 和 code_block 字段的 outputs[].targetField 必须全局唯一,同一实际字段只能被一个输出映射写入。多个生产方需要回写时,请选择不同目标字段或合并为一个生产方。",
622
+ "properties": {
623
+ "appDescription": {
624
+ "description": "应用描述;null 或空字符串表示清空。",
625
+ "type": [
626
+ "string",
627
+ "null"
628
+ ]
629
+ },
630
+ "appName": {
631
+ "minLength": 1,
632
+ "type": "string"
633
+ },
634
+ "attachments": {
635
+ "description": "应用附件完整目标态。",
636
+ "items": {
637
+ "type": "object"
638
+ },
639
+ "type": "array"
640
+ },
641
+ "body": {
642
+ "description": "业务字段与布局完整目标态;缺失业务字段表示删除。应用内所有 Q-Linker 和代码块的 outputs[].targetField 不得重复选择同一实际字段。",
643
+ "items": {
644
+ "oneOf": [
645
+ {
646
+ "$ref": "#/$defs/RowSummary"
647
+ },
648
+ {
649
+ "$ref": "#/$defs/SectionSummary"
650
+ }
651
+ ]
652
+ },
653
+ "type": "array"
654
+ },
655
+ "dataCoverField": {
656
+ "description": "数据封面字段选择器;指定每条数据的封面附件来源。仅允许选择顶层 attachment 字段;null 表示清除数据封面。",
657
+ "oneOf": [
658
+ {
659
+ "type": "null"
660
+ },
661
+ {
662
+ "$ref": "#/$defs/FieldSelector"
663
+ }
664
+ ]
665
+ },
666
+ "dataTitleField": {
667
+ "description": "数据标题字段选择器;指定每条数据的主显示标题来源。创建非空 body 时必填,更新时省略表示保留当前选择;显式提供时必须唯一定位一个顶层字段,仅 body 为空时允许 null。",
668
+ "oneOf": [
669
+ {
670
+ "type": "null"
671
+ },
672
+ {
673
+ "$ref": "#/$defs/FieldSelector"
674
+ }
675
+ ]
676
+ },
677
+ "serialNumber": {
678
+ "description": "default 或 custom 编号配置。",
679
+ "type": "object"
680
+ }
681
+ },
682
+ "required": [
683
+ "body"
684
+ ],
685
+ "type": "object"
686
+ }
687
+ },
688
+ "required": [
689
+ "apiVersion",
690
+ "spec"
691
+ ],
692
+ "title": "Qingflow AppFormApply v1alpha1 Summary",
693
+ "type": "object",
694
+ "x-qingflow-field-detail-query": "app_form_schema(schema_version, field_type)",
695
+ "x-qingflow-supported-field-types": [
696
+ "text",
697
+ "long_text",
698
+ "number",
699
+ "amount",
700
+ "link",
701
+ "date",
702
+ "datetime",
703
+ "member",
704
+ "department",
705
+ "single_choice",
706
+ "single_select",
707
+ "multi_select",
708
+ "phone",
709
+ "email",
710
+ "address",
711
+ "attachment",
712
+ "q_linker",
713
+ "code_block",
714
+ "data_relation",
715
+ "relation",
716
+ "subtable"
717
+ ]
718
+ }