@qingflow-tech/qingflow-app-builder-mcp 1.0.24 → 1.0.26

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 CHANGED
@@ -3,13 +3,13 @@
3
3
  Install:
4
4
 
5
5
  ```bash
6
- npm install @qingflow-tech/qingflow-app-builder-mcp@1.0.24
6
+ npm install @qingflow-tech/qingflow-app-builder-mcp@1.0.26
7
7
  ```
8
8
 
9
9
  Run:
10
10
 
11
11
  ```bash
12
- npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.0.24 qingflow-app-builder-mcp
12
+ npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.0.26 qingflow-app-builder-mcp
13
13
  ```
14
14
 
15
15
  Environment:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qingflow-tech/qingflow-app-builder-mcp",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "Builder MCP for Qingflow app/package/system design and staged solution workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qingflow-mcp"
7
- version = "1.0.24"
7
+ version = "1.0.26"
8
8
  description = "User-authenticated MCP server for Qingflow"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -36,7 +36,7 @@ def register(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) ->
36
36
  feedback_submit.add_argument("--record-id")
37
37
  feedback_submit.add_argument("--workflow-node-id")
38
38
  feedback_submit.add_argument("--note")
39
- feedback_submit.set_defaults(handler=_handle_feedback_submit, format_hint="generic")
39
+ feedback_submit.set_defaults(handler=_handle_feedback_submit, format_hint="feedback_submit")
40
40
 
41
41
  contract = builder_subparsers.add_parser("contract", help="读取 builder tool 合约")
42
42
  contract.add_argument("--tool-name", required=True)
@@ -1217,8 +1217,14 @@ def _format_builder_summary(result: dict[str, Any]) -> str:
1217
1217
  "app_keys",
1218
1218
  ):
1219
1219
  value = result.get(key)
1220
+ if not isinstance(value, list) and isinstance(data, dict):
1221
+ value = data.get(key)
1220
1222
  if isinstance(value, list):
1221
1223
  lines.append(f"{key}: {len(value)}")
1224
+ for item in value[:8]:
1225
+ lines.append("- " + _builder_item_summary(item))
1226
+ if len(value) > 8:
1227
+ lines.append(f"... {len(value) - 8} more")
1222
1228
  components = result.get("components") if isinstance(result.get("components"), list) else []
1223
1229
  if components:
1224
1230
  lines.append("Component Refs:")
@@ -1251,6 +1257,53 @@ def _format_builder_summary(result: dict[str, Any]) -> str:
1251
1257
  return "\n".join(lines) + "\n"
1252
1258
 
1253
1259
 
1260
+ def _builder_item_summary(item: Any) -> str:
1261
+ if not isinstance(item, dict):
1262
+ return str(item)
1263
+ preferred_keys = (
1264
+ "app_key",
1265
+ "appKey",
1266
+ "app_name",
1267
+ "appName",
1268
+ "package_id",
1269
+ "packageId",
1270
+ "package_name",
1271
+ "packageName",
1272
+ "dash_key",
1273
+ "dashKey",
1274
+ "dash_name",
1275
+ "dashName",
1276
+ "view_key",
1277
+ "viewKey",
1278
+ "view_name",
1279
+ "viewName",
1280
+ "chart_id",
1281
+ "chartId",
1282
+ "chart_name",
1283
+ "chartName",
1284
+ "field_id",
1285
+ "queId",
1286
+ "title",
1287
+ "queTitle",
1288
+ "name",
1289
+ "role_id",
1290
+ "roleId",
1291
+ "role_name",
1292
+ "roleName",
1293
+ "uid",
1294
+ "userId",
1295
+ "email",
1296
+ )
1297
+ parts = [
1298
+ f"{key}={item.get(key)}"
1299
+ for key in preferred_keys
1300
+ if item.get(key) not in (None, "", [], {})
1301
+ ]
1302
+ if not parts:
1303
+ parts = _dict_scalar_lines(item)[:6]
1304
+ return " / ".join(parts) if parts else json.dumps(item, ensure_ascii=False)
1305
+
1306
+
1254
1307
  def _format_file_upload_local(result: dict[str, Any]) -> str:
1255
1308
  lines = [
1256
1309
  f"Upload Kind: {result.get('upload_kind') or result.get('requested_upload_kind') or '-'}",
@@ -1292,6 +1345,47 @@ def _format_file_upload_local(result: dict[str, Any]) -> str:
1292
1345
  return "\n".join(lines) + "\n"
1293
1346
 
1294
1347
 
1348
+ def _format_feedback_submit(result: dict[str, Any]) -> str:
1349
+ submitted = bool(result.get("ok") is True or result.get("feedback_request_id") or result.get("submission_mode"))
1350
+ lines = [
1351
+ "Feedback Submitted" if submitted else "Feedback Result",
1352
+ f"Submission Mode: {result.get('submission_mode') or '-'}",
1353
+ f"Request ID: {result.get('feedback_request_id') or '-'}",
1354
+ ]
1355
+ target = result.get("feedback_target") if isinstance(result.get("feedback_target"), dict) else {}
1356
+ if target:
1357
+ lines.append(
1358
+ "Target: "
1359
+ f"app_key={target.get('app_key') or '-'} / "
1360
+ f"mcp_side={target.get('mcp_side') or '-'}"
1361
+ )
1362
+ payload = result.get("submission_summary") if isinstance(result.get("submission_summary"), dict) else {}
1363
+ if not payload:
1364
+ payload = result.get("normalized_payload") if isinstance(result.get("normalized_payload"), dict) else {}
1365
+ if payload:
1366
+ for key, label in (
1367
+ ("category", "Category"),
1368
+ ("反馈类型", "Category"),
1369
+ ("title", "Title"),
1370
+ ("tool_name", "Tool"),
1371
+ ("关联工具", "Tool"),
1372
+ ("app_key", "App Key"),
1373
+ ("关联应用", "App Key"),
1374
+ ("record_id", "Record ID"),
1375
+ ("关联记录", "Record ID"),
1376
+ ("workflow_node_id", "Workflow Node ID"),
1377
+ ("关联节点", "Workflow Node ID"),
1378
+ ("impact_scope", "Impact Scope"),
1379
+ ("影响范围", "Impact Scope"),
1380
+ ):
1381
+ value = payload.get(key)
1382
+ if value not in (None, ""):
1383
+ lines.append(f"{label}: {value}")
1384
+ _append_warnings(lines, result.get("warnings"))
1385
+ _append_verification(lines, result.get("verification"))
1386
+ return "\n".join(lines) + "\n"
1387
+
1388
+
1295
1389
  def emit_json_result(result: dict[str, Any], *, stream: TextIO) -> None:
1296
1390
  json.dump(result, stream, ensure_ascii=False, indent=2)
1297
1391
  stream.write("\n")
@@ -1508,4 +1602,5 @@ _FORMATTERS = {
1508
1602
  "export_direct": _format_export_direct,
1509
1603
  "builder_summary": _format_builder_summary,
1510
1604
  "file_upload_local": _format_file_upload_local,
1605
+ "feedback_submit": _format_feedback_submit,
1511
1606
  }
@@ -146,6 +146,15 @@ class FeedbackTools:
146
146
  "app_key": get_feedback_app_key(),
147
147
  "mcp_side": self.mcp_side,
148
148
  },
149
+ "submission_summary": {
150
+ "category": normalized_payload.get("反馈类型"),
151
+ "title": normalized_payload.get("title"),
152
+ "tool_name": normalized_payload.get("关联工具"),
153
+ "app_key": normalized_payload.get("关联应用"),
154
+ "record_id": normalized_payload.get("关联记录"),
155
+ "workflow_node_id": normalized_payload.get("关联节点"),
156
+ "impact_scope": normalized_payload.get("影响范围"),
157
+ },
149
158
  "normalized_payload": normalized_payload,
150
159
  "feedback_request_id": feedback_request_id,
151
160
  }