@qingflow-tech/qingflow-cli 1.1.43-beta.1 → 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.
- package/README.md +4 -3
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/skills/qingflow-app-form/SKILL.md +53 -0
- package/skills/qingflow-app-form/agents/openai.yaml +4 -0
- package/skills/qingflow-cli/SKILL.md +6 -6
- package/skills/qingflow-cli/manifest.yaml +1 -1
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_APP_DELIVERY_WORKFLOW.md +4 -4
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_EXPLORATION_REPORT.md +1 -1
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md +4 -4
- package/skills/qingflow-cli/reference/builder/10-build-single-app.md +5 -5
- package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +14 -14
- package/skills/qingflow-cli/reference/builder/30-schema-fields.md +98 -101
- package/skills/qingflow-cli/reference/builder/40-layout.md +39 -31
- package/skills/qingflow-cli/reference/builder/README.md +9 -9
- package/skills/qingflow-cli/reference/builder/code-integrations/README.md +4 -2
- package/skills/qingflow-cli/reference/builder/code-integrations/code-block.md +2 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/q-linker.md +2 -0
- package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +45 -38
- package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_EXPLORATION_REPORT.md +1 -1
- package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
- package/skills/qingflow-cli/reference/examples/README.md +3 -3
- package/skills/qingflow-mcp-setup/SKILL.md +1 -1
- package/src/qingflow_mcp/app_form_compat.py +6 -1
- package/src/qingflow_mcp/builder_facade/app_form.py +547 -18
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +1321 -178
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +268 -7
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +115 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +304 -7
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +23 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +23 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +23 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +23 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +145 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +69 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +69 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +69 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +360 -7
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +71 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +115 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +78 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +23 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +249 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +71 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +71 -4
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +1041 -20
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +69 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +23 -0
- package/src/qingflow_mcp/response_trim.py +41 -1
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$defs": {
|
|
3
|
-
"EmptyConfig": {
|
|
4
|
-
"additionalProperties": false,
|
|
5
|
-
"description": "该字段类型没有特殊配置。",
|
|
6
|
-
"type": "object"
|
|
7
|
-
},
|
|
8
3
|
"FieldCommon": {
|
|
9
4
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
10
5
|
"properties": {
|
|
11
|
-
"dataCover": {
|
|
12
|
-
"description": "是否作为数据封面;仅顶层附件字段可设为 true。",
|
|
13
|
-
"type": "boolean"
|
|
14
|
-
},
|
|
15
6
|
"dataTitle": {
|
|
16
7
|
"description": "是否作为数据标题;整个 body 最多且必须按规则存在一个。",
|
|
17
8
|
"type": "boolean"
|
|
18
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
|
+
},
|
|
19
24
|
"description": {
|
|
20
25
|
"description": "字段说明;null 或空字符串表示清空。",
|
|
21
26
|
"type": [
|
|
@@ -48,6 +53,60 @@
|
|
|
48
53
|
"name"
|
|
49
54
|
],
|
|
50
55
|
"type": "object"
|
|
56
|
+
},
|
|
57
|
+
"ScalarDefaultValue": {
|
|
58
|
+
"description": "不包含对象或数组的普通字段默认值。",
|
|
59
|
+
"type": [
|
|
60
|
+
"null",
|
|
61
|
+
"boolean",
|
|
62
|
+
"number",
|
|
63
|
+
"string"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"TextConfig": {
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"description": "文字类字段的长度限制;省略表示保留当前值。",
|
|
69
|
+
"properties": {
|
|
70
|
+
"canScan": {
|
|
71
|
+
"description": "是否允许扫码输入。",
|
|
72
|
+
"type": [
|
|
73
|
+
"boolean",
|
|
74
|
+
"null"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"maxWordCount": {
|
|
78
|
+
"description": "最多字数;null 表示清除限制。",
|
|
79
|
+
"minimum": 0,
|
|
80
|
+
"type": [
|
|
81
|
+
"integer",
|
|
82
|
+
"null"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"minWordCount": {
|
|
86
|
+
"description": "最少字数;null 表示清除限制。",
|
|
87
|
+
"minimum": 0,
|
|
88
|
+
"type": [
|
|
89
|
+
"integer",
|
|
90
|
+
"null"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"noRepeat": {
|
|
94
|
+
"description": "是否禁止重复值。",
|
|
95
|
+
"type": [
|
|
96
|
+
"boolean",
|
|
97
|
+
"null"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"scanType": {
|
|
101
|
+
"description": "扫码类型 ID。",
|
|
102
|
+
"minimum": 0,
|
|
103
|
+
"type": [
|
|
104
|
+
"integer",
|
|
105
|
+
"null"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"type": "object"
|
|
51
110
|
}
|
|
52
111
|
},
|
|
53
112
|
"$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/fields/text.json",
|
|
@@ -59,7 +118,7 @@
|
|
|
59
118
|
{
|
|
60
119
|
"properties": {
|
|
61
120
|
"config": {
|
|
62
|
-
"$ref": "#/$defs/
|
|
121
|
+
"$ref": "#/$defs/TextConfig"
|
|
63
122
|
},
|
|
64
123
|
"type": {
|
|
65
124
|
"const": "text"
|
|
@@ -170,6 +170,20 @@
|
|
|
170
170
|
"dataTitle": {
|
|
171
171
|
"type": "boolean"
|
|
172
172
|
},
|
|
173
|
+
"defaultType": {
|
|
174
|
+
"default": 1,
|
|
175
|
+
"description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
|
|
176
|
+
"enum": [
|
|
177
|
+
1,
|
|
178
|
+
2,
|
|
179
|
+
3
|
|
180
|
+
],
|
|
181
|
+
"type": "integer"
|
|
182
|
+
},
|
|
183
|
+
"defaultValue": {
|
|
184
|
+
"$ref": "#/$defs/ScalarDefaultValue",
|
|
185
|
+
"description": "普通字段的标量默认值;结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
186
|
+
},
|
|
173
187
|
"description": {
|
|
174
188
|
"type": [
|
|
175
189
|
"string",
|
|
@@ -252,6 +266,15 @@
|
|
|
252
266
|
],
|
|
253
267
|
"type": "object"
|
|
254
268
|
},
|
|
269
|
+
"ScalarDefaultValue": {
|
|
270
|
+
"description": "不包含对象或数组的普通字段默认值。",
|
|
271
|
+
"type": [
|
|
272
|
+
"null",
|
|
273
|
+
"boolean",
|
|
274
|
+
"number",
|
|
275
|
+
"string"
|
|
276
|
+
]
|
|
277
|
+
},
|
|
255
278
|
"SectionBlock": {
|
|
256
279
|
"additionalProperties": false,
|
|
257
280
|
"description": "段落布局容器;不是业务字段,必须独占一个根级块。",
|
|
@@ -55,6 +55,8 @@ SUCCESS_POLICY_BY_TOOL: dict[str, TransformFn] = {}
|
|
|
55
55
|
def trim_public_response(tool_name: str | None, payload: dict[str, Any]) -> dict[str, Any]:
|
|
56
56
|
if not isinstance(payload, dict):
|
|
57
57
|
return payload
|
|
58
|
+
if tool_name == "builder:app_form_apply" and str(payload.get("status") or "").lower() == "partial_success":
|
|
59
|
+
return trim_success_response(tool_name, payload)
|
|
58
60
|
if _looks_like_failure_payload(payload):
|
|
59
61
|
status = str(payload.get("status") or "").lower()
|
|
60
62
|
if _is_executed_nonfatal_payload(payload) or (
|
|
@@ -1086,6 +1088,44 @@ def _trim_builder_list_like(payload: JSONObject) -> None:
|
|
|
1086
1088
|
_trim_builder_envelope(payload)
|
|
1087
1089
|
|
|
1088
1090
|
|
|
1091
|
+
def _trim_app_form_apply(payload: JSONObject) -> None:
|
|
1092
|
+
details = payload.get("details")
|
|
1093
|
+
details_diff = deepcopy(details.get("diff")) if isinstance(details, dict) and isinstance(details.get("diff"), dict) else None
|
|
1094
|
+
if isinstance(details, dict):
|
|
1095
|
+
_drop_deep_keys(details, {"transportError"})
|
|
1096
|
+
_trim_builder_envelope(payload)
|
|
1097
|
+
_trim_form_diff(payload)
|
|
1098
|
+
if details_diff is not None:
|
|
1099
|
+
payload.setdefault("details", {})["diff"] = _summarize_form_diff(details_diff)
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
def _trim_form_diff(payload: JSONObject) -> None:
|
|
1103
|
+
diff = payload.get("diff")
|
|
1104
|
+
if isinstance(diff, dict):
|
|
1105
|
+
payload["diff"] = _summarize_form_diff(diff)
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
def _summarize_form_diff(diff: dict[str, Any]) -> dict[str, Any]:
|
|
1109
|
+
summary: dict[str, Any] = {}
|
|
1110
|
+
for key in ("added", "updated", "removed"):
|
|
1111
|
+
items = diff.get(key)
|
|
1112
|
+
if not isinstance(items, list):
|
|
1113
|
+
continue
|
|
1114
|
+
names = []
|
|
1115
|
+
for item in items:
|
|
1116
|
+
if isinstance(item, str):
|
|
1117
|
+
names.append(item)
|
|
1118
|
+
elif isinstance(item, dict):
|
|
1119
|
+
name = item.get("name") or item.get("queTitle")
|
|
1120
|
+
if name:
|
|
1121
|
+
names.append(name)
|
|
1122
|
+
summary[key] = names
|
|
1123
|
+
for key in ("layoutChanged", "configChanged"):
|
|
1124
|
+
if key in diff:
|
|
1125
|
+
summary[key] = bool(diff[key])
|
|
1126
|
+
return summary
|
|
1127
|
+
|
|
1128
|
+
|
|
1089
1129
|
def _register_policy(domains: tuple[str, ...], names: tuple[str, ...], transform: TransformFn) -> None:
|
|
1090
1130
|
for domain in domains:
|
|
1091
1131
|
for name in names:
|
|
@@ -1192,7 +1232,6 @@ _register_policy(
|
|
|
1192
1232
|
"app_resolve",
|
|
1193
1233
|
"app_form_schema",
|
|
1194
1234
|
"app_form_get",
|
|
1195
|
-
"app_form_apply",
|
|
1196
1235
|
"app_delete",
|
|
1197
1236
|
"button_style_catalog_get",
|
|
1198
1237
|
"app_custom_buttons_apply",
|
|
@@ -1218,3 +1257,4 @@ _register_policy(
|
|
|
1218
1257
|
),
|
|
1219
1258
|
_trim_builder_list_like,
|
|
1220
1259
|
)
|
|
1260
|
+
_register_policy((BUILDER_DOMAIN,), ("app_form_apply",), _trim_app_form_apply)
|