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

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 (62) hide show
  1. package/README.md +11 -5
  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 +1 -2
  6. package/pyproject.toml +1 -3
  7. package/skills/qingflow-app-form/SKILL.md +23 -11
  8. package/skills/qingflow-cli/SKILL.md +4 -2
  9. package/skills/qingflow-cli/reference/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
  10. package/skills/qingflow-cli/reference/QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md +1 -1
  11. package/skills/qingflow-cli/reference/builder/10-build-single-app.md +3 -3
  12. package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +1 -1
  13. package/skills/qingflow-cli/reference/builder/30-schema-fields.md +25 -24
  14. package/skills/qingflow-cli/reference/builder/40-layout.md +5 -5
  15. package/skills/qingflow-cli/reference/builder/README.md +3 -3
  16. package/skills/qingflow-cli/reference/builder/code-integrations/README.md +1 -1
  17. package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +7 -7
  18. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
  19. package/skills/qingflow-cli/reference/examples/README.md +1 -1
  20. package/skills/qingflow-common/SKILL.md +47 -0
  21. package/skills/qingflow-common/agents/openai.yaml +4 -0
  22. package/src/qingflow_mcp/__main__.py +2 -3
  23. package/src/qingflow_mcp/app_form_compat.py +11 -27
  24. package/src/qingflow_mcp/app_form_validator.py +201 -35
  25. package/src/qingflow_mcp/builder_facade/app_form.py +762 -148
  26. package/src/qingflow_mcp/builder_facade/app_form_schema.py +114 -3
  27. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +310 -245
  28. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +82 -27
  29. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +85 -32
  30. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +82 -30
  31. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +113 -37
  32. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +87 -64
  33. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +82 -27
  34. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +82 -27
  35. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +83 -28
  36. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +82 -27
  37. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +82 -27
  38. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +82 -27
  39. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +83 -28
  40. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +82 -27
  41. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +85 -32
  42. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +82 -27
  43. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +95 -40
  44. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +100 -28
  45. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +82 -27
  46. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +82 -27
  47. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +212 -117
  48. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +82 -27
  49. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +143 -161
  50. package/src/qingflow_mcp/builder_facade/service.py +3 -2
  51. package/src/qingflow_mcp/response_trim.py +2 -0
  52. package/src/qingflow_mcp/server.py +24 -3
  53. package/src/qingflow_mcp/server_app_builder.py +2 -2
  54. package/src/qingflow_mcp/tools/record_tools.py +3 -3
  55. package/src/qingflow_mcp/version.py +2 -4
  56. package/docs/local-agent-install.md +0 -370
  57. package/skills/qingflow-mcp-setup/SKILL.md +0 -115
  58. package/skills/qingflow-mcp-setup/agents/openai.yaml +0 -4
  59. package/skills/qingflow-mcp-setup/references/claude-desktop.md +0 -34
  60. package/skills/qingflow-mcp-setup/references/environments.md +0 -62
  61. package/skills/qingflow-mcp-setup/references/generic-stdio.md +0 -32
  62. package/skills/qingflow-mcp-setup/scripts/check_local_server.sh +0 -38
@@ -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
- "dataTitle": {
75
- "description": "是否作为数据标题;整个 body 最多且必须按规则存在一个。",
130
+ "beingRequired": {
131
+ "description": "该字段是否必填;缺失时保留已有字段当前值。",
76
132
  "type": "boolean"
77
133
  },
78
134
  "defaultType": {
79
135
  "default": 1,
80
- "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
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": "普通字段的标量默认值;表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
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;get 返回,新增字段省略。",
154
+ "description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
106
155
  "minimum": 1,
107
156
  "type": "integer"
108
157
  },
109
- "required": {
110
- "description": "是否必填;缺失时保留已有字段当前值。",
111
- "type": "boolean"
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": "字段在所在行的宽度百分比;同一行要么全部提供且合计 100,要么全部省略。",
115
- "maximum": 100,
116
- "minimum": 1,
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 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
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
- "type": {
201
+ "questionType": {
147
202
  "const": "single_choice"
148
203
  }
149
204
  },
150
205
  "required": [
151
- "type",
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
- "dataTitle": {
75
- "description": "是否作为数据标题;整个 body 最多且必须按规则存在一个。",
130
+ "beingRequired": {
131
+ "description": "该字段是否必填;缺失时保留已有字段当前值。",
76
132
  "type": "boolean"
77
133
  },
78
134
  "defaultType": {
79
135
  "default": 1,
80
- "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
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": "普通字段的标量默认值;表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
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;get 返回,新增字段省略。",
154
+ "description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
106
155
  "minimum": 1,
107
156
  "type": "integer"
108
157
  },
109
- "required": {
110
- "description": "是否必填;缺失时保留已有字段当前值。",
111
- "type": "boolean"
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": "字段在所在行的宽度百分比;同一行要么全部提供且合计 100,要么全部省略。",
115
- "maximum": 100,
116
- "minimum": 1,
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 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
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
- "type": {
201
+ "questionType": {
147
202
  "const": "single_select"
148
203
  }
149
204
  },
150
205
  "required": [
151
- "type",
206
+ "questionType",
152
207
  "config"
153
208
  ]
154
209
  }