@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,357 @@
1
+ {
2
+ "$defs": {
3
+ "FieldCommon": {
4
+ "description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
5
+ "properties": {
6
+ "dataTitle": {
7
+ "description": "是否作为数据标题;整个 body 最多且必须按规则存在一个。",
8
+ "type": "boolean"
9
+ },
10
+ "defaultType": {
11
+ "default": 1,
12
+ "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
13
+ "enum": [
14
+ 1,
15
+ 2,
16
+ 3
17
+ ],
18
+ "type": "integer"
19
+ },
20
+ "defaultValue": {
21
+ "$ref": "#/$defs/ScalarDefaultValue",
22
+ "description": "普通字段的标量默认值;表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
23
+ },
24
+ "description": {
25
+ "description": "字段说明;null 或空字符串表示清空。",
26
+ "type": [
27
+ "string",
28
+ "null"
29
+ ]
30
+ },
31
+ "name": {
32
+ "description": "字段展示名称;同一父级内唯一,不单独作为字段身份。",
33
+ "minLength": 1,
34
+ "type": "string"
35
+ },
36
+ "queId": {
37
+ "description": "已有字段的后端 ID;get 返回,新增字段省略。",
38
+ "minimum": 1,
39
+ "type": "integer"
40
+ },
41
+ "required": {
42
+ "description": "是否必填;缺失时保留已有字段当前值。",
43
+ "type": "boolean"
44
+ },
45
+ "width": {
46
+ "description": "字段在所在行的宽度百分比;同一行要么全部提供且合计 100,要么全部省略。",
47
+ "maximum": 100,
48
+ "minimum": 1,
49
+ "type": "integer"
50
+ }
51
+ },
52
+ "required": [
53
+ "name"
54
+ ],
55
+ "type": "object"
56
+ },
57
+ "FieldSelector": {
58
+ "additionalProperties": false,
59
+ "anyOf": [
60
+ {
61
+ "required": [
62
+ "queId"
63
+ ]
64
+ },
65
+ {
66
+ "required": [
67
+ "name"
68
+ ]
69
+ }
70
+ ],
71
+ "description": "跨字段引用选择器;至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
72
+ "properties": {
73
+ "name": {
74
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
75
+ "minLength": 1,
76
+ "type": "string"
77
+ },
78
+ "queId": {
79
+ "description": "已有字段的后端 ID;优先用于精确解析。",
80
+ "minimum": 1,
81
+ "type": "integer"
82
+ }
83
+ },
84
+ "type": "object"
85
+ },
86
+ "QLinkerBinding": {
87
+ "additionalProperties": false,
88
+ "description": "Q-Linker 的输入映射、请求配置和输出映射。",
89
+ "properties": {
90
+ "inputs": {
91
+ "description": "将当前表单字段映射到请求参数的规则。",
92
+ "items": {
93
+ "$ref": "#/$defs/QLinkerInputBinding"
94
+ },
95
+ "type": "array"
96
+ },
97
+ "outputs": {
98
+ "description": "将响应路径映射到目标字段的规则;至少一个。",
99
+ "items": {
100
+ "$ref": "#/$defs/QLinkerOutputBinding"
101
+ },
102
+ "minItems": 1,
103
+ "type": "array"
104
+ },
105
+ "request": {
106
+ "$ref": "#/$defs/QLinkerRequest",
107
+ "description": "远程请求配置。"
108
+ }
109
+ },
110
+ "required": [
111
+ "request",
112
+ "outputs"
113
+ ],
114
+ "type": "object"
115
+ },
116
+ "QLinkerConfig": {
117
+ "additionalProperties": false,
118
+ "description": "Q-Linker 的高层声明;无法无损还原为该结构时阻断处理。",
119
+ "properties": {
120
+ "qLinkerBinding": {
121
+ "$ref": "#/$defs/QLinkerBinding"
122
+ }
123
+ },
124
+ "required": [
125
+ "qLinkerBinding"
126
+ ],
127
+ "type": "object"
128
+ },
129
+ "QLinkerInputBinding": {
130
+ "additionalProperties": false,
131
+ "description": "一个表单字段到请求参数的映射。",
132
+ "properties": {
133
+ "field": {
134
+ "$ref": "#/$defs/FieldSelector",
135
+ "description": "输入来源字段。"
136
+ },
137
+ "key": {
138
+ "description": "请求中的参数名。",
139
+ "minLength": 1,
140
+ "type": "string"
141
+ },
142
+ "source": {
143
+ "description": "参数写入请求的位置。",
144
+ "enum": [
145
+ "query_param",
146
+ "header",
147
+ "url_encoded",
148
+ "json_path"
149
+ ]
150
+ }
151
+ },
152
+ "required": [
153
+ "field",
154
+ "key",
155
+ "source"
156
+ ],
157
+ "type": "object"
158
+ },
159
+ "QLinkerKeyValue": {
160
+ "additionalProperties": false,
161
+ "description": "HTTP 请求中的键值对。",
162
+ "properties": {
163
+ "key": {
164
+ "description": "参数名。",
165
+ "minLength": 1,
166
+ "type": "string"
167
+ },
168
+ "value": {
169
+ "description": "参数值;null 表示空值。",
170
+ "type": [
171
+ "string",
172
+ "null"
173
+ ]
174
+ }
175
+ },
176
+ "required": [
177
+ "key"
178
+ ],
179
+ "type": "object"
180
+ },
181
+ "QLinkerOutputBinding": {
182
+ "additionalProperties": false,
183
+ "description": "一个响应值到表单目标字段的映射。",
184
+ "properties": {
185
+ "alias": {
186
+ "description": "输出别名;用于后续数据关联引用。",
187
+ "minLength": 1,
188
+ "type": "string"
189
+ },
190
+ "aliasId": {
191
+ "description": "后端生成的输出别名 ID;新增输出时可省略,get 返回后必须保留。",
192
+ "minimum": 1,
193
+ "type": "integer"
194
+ },
195
+ "path": {
196
+ "description": "从响应中取值的 JSONPath。",
197
+ "minLength": 1,
198
+ "type": "string"
199
+ },
200
+ "targetField": {
201
+ "$ref": "#/$defs/FieldSelector",
202
+ "description": "接收结果的当前表单字段。"
203
+ }
204
+ },
205
+ "required": [
206
+ "alias",
207
+ "path",
208
+ "targetField"
209
+ ],
210
+ "type": "object"
211
+ },
212
+ "QLinkerRequest": {
213
+ "additionalProperties": false,
214
+ "description": "Q-Linker 远程 HTTP 请求配置。",
215
+ "properties": {
216
+ "autoTrigger": {
217
+ "description": "是否在输入变化时自动触发请求。",
218
+ "type": [
219
+ "boolean",
220
+ "null"
221
+ ]
222
+ },
223
+ "bodyType": {
224
+ "default": "url_encoded",
225
+ "description": "请求体格式;分别映射后端 bodyType 1、2、3。",
226
+ "enum": [
227
+ "url_encoded",
228
+ "json",
229
+ "xml"
230
+ ]
231
+ },
232
+ "customButtonText": {
233
+ "description": "自定义触发按钮文案。",
234
+ "type": [
235
+ "string",
236
+ "null"
237
+ ]
238
+ },
239
+ "customButtonTextEnabled": {
240
+ "description": "是否启用自定义触发按钮文案。",
241
+ "type": [
242
+ "boolean",
243
+ "null"
244
+ ]
245
+ },
246
+ "headers": {
247
+ "description": "请求头键值对。",
248
+ "items": {
249
+ "$ref": "#/$defs/QLinkerKeyValue"
250
+ },
251
+ "type": "array"
252
+ },
253
+ "hideOnForm": {
254
+ "description": "是否在表单填写界面隐藏该 Q-Linker 字段。",
255
+ "type": [
256
+ "boolean",
257
+ "null"
258
+ ]
259
+ },
260
+ "insertValueDirectly": {
261
+ "description": "是否把请求结果直接写入目标字段。",
262
+ "type": [
263
+ "boolean",
264
+ "null"
265
+ ]
266
+ },
267
+ "jsonValue": {
268
+ "description": "bodyType 为 json 时的 JSON 请求体字符串。",
269
+ "type": [
270
+ "string",
271
+ "null"
272
+ ]
273
+ },
274
+ "method": {
275
+ "default": "GET",
276
+ "description": "HTTP 方法;当前 Q-Linker 仅支持 GET 和 POST,缺失时按 GET 处理。",
277
+ "enum": [
278
+ "GET",
279
+ "POST"
280
+ ]
281
+ },
282
+ "queryParams": {
283
+ "description": "URL 查询参数键值对。",
284
+ "items": {
285
+ "$ref": "#/$defs/QLinkerKeyValue"
286
+ },
287
+ "type": "array"
288
+ },
289
+ "resultType": {
290
+ "default": "json",
291
+ "description": "响应解析格式;分别映射后端 resultType 1、2、3。",
292
+ "enum": [
293
+ "json",
294
+ "xml",
295
+ "text"
296
+ ]
297
+ },
298
+ "url": {
299
+ "description": "请求 URL。",
300
+ "minLength": 1,
301
+ "type": "string"
302
+ },
303
+ "urlEncodedValue": {
304
+ "description": "bodyType 为 url_encoded 时的表单键值对。",
305
+ "items": {
306
+ "$ref": "#/$defs/QLinkerKeyValue"
307
+ },
308
+ "type": "array"
309
+ },
310
+ "xmlValue": {
311
+ "description": "bodyType 为 xml 时的 XML 请求体字符串。",
312
+ "type": [
313
+ "string",
314
+ "null"
315
+ ]
316
+ }
317
+ },
318
+ "required": [
319
+ "url"
320
+ ],
321
+ "type": "object"
322
+ },
323
+ "ScalarDefaultValue": {
324
+ "description": "不包含对象或数组的普通字段默认值。",
325
+ "type": [
326
+ "null",
327
+ "boolean",
328
+ "number",
329
+ "string"
330
+ ]
331
+ }
332
+ },
333
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/fields/q_linker.json",
334
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
335
+ "allOf": [
336
+ {
337
+ "$ref": "#/$defs/FieldCommon"
338
+ },
339
+ {
340
+ "properties": {
341
+ "config": {
342
+ "$ref": "#/$defs/QLinkerConfig"
343
+ },
344
+ "type": {
345
+ "const": "q_linker"
346
+ }
347
+ },
348
+ "required": [
349
+ "type",
350
+ "config"
351
+ ]
352
+ }
353
+ ],
354
+ "title": "Qingflow AppForm v1alpha1 q_linker field",
355
+ "type": "object",
356
+ "unevaluatedProperties": false
357
+ }