@qingflow-tech/qingflow-cli 1.1.43-beta.3 → 1.1.43-beta.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 +3 -3
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/skills/qingflow-app-form/SKILL.md +12 -9
- package/skills/qingflow-cli/reference/builder/30-schema-fields.md +15 -13
- package/src/qingflow_mcp/app_form_compat.py +11 -27
- package/src/qingflow_mcp/app_form_validator.py +298 -35
- package/src/qingflow_mcp/builder_facade/app_form.py +777 -150
- package/src/qingflow_mcp/builder_facade/app_form_schema.py +164 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +5 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +299 -239
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +82 -30
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +113 -37
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +87 -64
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +83 -28
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +83 -28
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +95 -40
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +100 -28
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +201 -111
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/formula.json +1594 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +143 -161
- package/src/qingflow_mcp/builder_facade/service.py +3 -2
- package/src/qingflow_mcp/cli/commands/builder.py +2 -0
- package/src/qingflow_mcp/response_trim.py +2 -0
- package/src/qingflow_mcp/server_app_builder.py +9 -4
- package/src/qingflow_mcp/tools/ai_builder_tools.py +13 -3
|
@@ -69,15 +69,71 @@
|
|
|
69
69
|
"type": "object"
|
|
70
70
|
},
|
|
71
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
|
+
],
|
|
72
128
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
73
129
|
"properties": {
|
|
74
|
-
"
|
|
75
|
-
"description": "
|
|
130
|
+
"beingRequired": {
|
|
131
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
76
132
|
"type": "boolean"
|
|
77
133
|
},
|
|
78
134
|
"defaultType": {
|
|
79
135
|
"default": 1,
|
|
80
|
-
"description": "
|
|
136
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
81
137
|
"enum": [
|
|
82
138
|
1,
|
|
83
139
|
2,
|
|
@@ -87,47 +143,46 @@
|
|
|
87
143
|
},
|
|
88
144
|
"defaultValue": {
|
|
89
145
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
90
|
-
"description": "
|
|
91
|
-
},
|
|
92
|
-
"description": {
|
|
93
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
94
|
-
"type": [
|
|
95
|
-
"string",
|
|
96
|
-
"null"
|
|
97
|
-
]
|
|
146
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
98
147
|
},
|
|
99
148
|
"name": {
|
|
100
|
-
"description": "
|
|
149
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
101
150
|
"minLength": 1,
|
|
102
151
|
"type": "string"
|
|
103
152
|
},
|
|
104
153
|
"queId": {
|
|
105
|
-
"description": "已有字段的后端 ID
|
|
154
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
106
155
|
"minimum": 1,
|
|
107
156
|
"type": "integer"
|
|
108
157
|
},
|
|
109
|
-
"
|
|
110
|
-
"description": "
|
|
111
|
-
"type":
|
|
158
|
+
"questionDescription": {
|
|
159
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
160
|
+
"type": [
|
|
161
|
+
"string",
|
|
162
|
+
"null"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"questionType": {
|
|
166
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
167
|
+
"type": "string"
|
|
112
168
|
},
|
|
113
169
|
"width": {
|
|
114
|
-
"description": "
|
|
115
|
-
"
|
|
116
|
-
|
|
170
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
171
|
+
"enum": [
|
|
172
|
+
25,
|
|
173
|
+
50,
|
|
174
|
+
75,
|
|
175
|
+
100
|
|
176
|
+
],
|
|
117
177
|
"type": "integer"
|
|
118
178
|
}
|
|
119
179
|
},
|
|
120
|
-
"required": [
|
|
121
|
-
"name"
|
|
122
|
-
],
|
|
123
180
|
"type": "object"
|
|
124
181
|
},
|
|
125
182
|
"ScalarDefaultValue": {
|
|
126
|
-
"description": "
|
|
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。",
|
|
127
184
|
"type": [
|
|
128
185
|
"null",
|
|
129
|
-
"boolean",
|
|
130
|
-
"number",
|
|
131
186
|
"string"
|
|
132
187
|
]
|
|
133
188
|
}
|
|
@@ -143,12 +198,12 @@
|
|
|
143
198
|
"config": {
|
|
144
199
|
"$ref": "#/$defs/ChoiceConfig"
|
|
145
200
|
},
|
|
146
|
-
"
|
|
201
|
+
"questionType": {
|
|
147
202
|
"const": "single_choice"
|
|
148
203
|
}
|
|
149
204
|
},
|
|
150
205
|
"required": [
|
|
151
|
-
"
|
|
206
|
+
"questionType",
|
|
152
207
|
"config"
|
|
153
208
|
]
|
|
154
209
|
}
|
|
@@ -69,15 +69,71 @@
|
|
|
69
69
|
"type": "object"
|
|
70
70
|
},
|
|
71
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
|
+
],
|
|
72
128
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
73
129
|
"properties": {
|
|
74
|
-
"
|
|
75
|
-
"description": "
|
|
130
|
+
"beingRequired": {
|
|
131
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
76
132
|
"type": "boolean"
|
|
77
133
|
},
|
|
78
134
|
"defaultType": {
|
|
79
135
|
"default": 1,
|
|
80
|
-
"description": "
|
|
136
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
81
137
|
"enum": [
|
|
82
138
|
1,
|
|
83
139
|
2,
|
|
@@ -87,47 +143,46 @@
|
|
|
87
143
|
},
|
|
88
144
|
"defaultValue": {
|
|
89
145
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
90
|
-
"description": "
|
|
91
|
-
},
|
|
92
|
-
"description": {
|
|
93
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
94
|
-
"type": [
|
|
95
|
-
"string",
|
|
96
|
-
"null"
|
|
97
|
-
]
|
|
146
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
98
147
|
},
|
|
99
148
|
"name": {
|
|
100
|
-
"description": "
|
|
149
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
101
150
|
"minLength": 1,
|
|
102
151
|
"type": "string"
|
|
103
152
|
},
|
|
104
153
|
"queId": {
|
|
105
|
-
"description": "已有字段的后端 ID
|
|
154
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
106
155
|
"minimum": 1,
|
|
107
156
|
"type": "integer"
|
|
108
157
|
},
|
|
109
|
-
"
|
|
110
|
-
"description": "
|
|
111
|
-
"type":
|
|
158
|
+
"questionDescription": {
|
|
159
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
160
|
+
"type": [
|
|
161
|
+
"string",
|
|
162
|
+
"null"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"questionType": {
|
|
166
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
167
|
+
"type": "string"
|
|
112
168
|
},
|
|
113
169
|
"width": {
|
|
114
|
-
"description": "
|
|
115
|
-
"
|
|
116
|
-
|
|
170
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
171
|
+
"enum": [
|
|
172
|
+
25,
|
|
173
|
+
50,
|
|
174
|
+
75,
|
|
175
|
+
100
|
|
176
|
+
],
|
|
117
177
|
"type": "integer"
|
|
118
178
|
}
|
|
119
179
|
},
|
|
120
|
-
"required": [
|
|
121
|
-
"name"
|
|
122
|
-
],
|
|
123
180
|
"type": "object"
|
|
124
181
|
},
|
|
125
182
|
"ScalarDefaultValue": {
|
|
126
|
-
"description": "
|
|
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。",
|
|
127
184
|
"type": [
|
|
128
185
|
"null",
|
|
129
|
-
"boolean",
|
|
130
|
-
"number",
|
|
131
186
|
"string"
|
|
132
187
|
]
|
|
133
188
|
}
|
|
@@ -143,12 +198,12 @@
|
|
|
143
198
|
"config": {
|
|
144
199
|
"$ref": "#/$defs/ChoiceConfig"
|
|
145
200
|
},
|
|
146
|
-
"
|
|
201
|
+
"questionType": {
|
|
147
202
|
"const": "single_select"
|
|
148
203
|
}
|
|
149
204
|
},
|
|
150
205
|
"required": [
|
|
151
|
-
"
|
|
206
|
+
"questionType",
|
|
152
207
|
"config"
|
|
153
208
|
]
|
|
154
209
|
}
|