@qingflow-tech/qingflow-app-builder-mcp 1.0.17 → 1.0.19

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.17
6
+ npm install @qingflow-tech/qingflow-app-builder-mcp@1.0.19
7
7
  ```
8
8
 
9
9
  Run:
10
10
 
11
11
  ```bash
12
- npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.0.17 qingflow-app-builder-mcp
12
+ npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.0.19 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.17",
3
+ "version": "1.0.19",
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.17"
7
+ version = "1.0.19"
8
8
  description = "User-authenticated MCP server for Qingflow"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -25,14 +25,14 @@ def register(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) ->
25
25
  repair.add_argument("--authorized-file-modification", action="store_true")
26
26
  repair.add_argument("--output-path")
27
27
  repair.add_argument("--repair", dest="selected_repairs", action="append", default=[])
28
- repair.set_defaults(handler=_handle_repair, format_hint="")
28
+ repair.set_defaults(handler=_handle_repair, format_hint="import_repair")
29
29
 
30
30
  start = import_subparsers.add_parser("start", help="启动导入")
31
31
  start.add_argument("--app-key", required=True)
32
32
  start.add_argument("--verification-id", required=True)
33
33
  start.add_argument("--being-enter-auditing", type=parse_bool_text, required=True)
34
34
  start.add_argument("--view-key")
35
- start.set_defaults(handler=_handle_start, format_hint="")
35
+ start.set_defaults(handler=_handle_start, format_hint="import_start")
36
36
 
37
37
  status = import_subparsers.add_parser("status", help="查询导入状态")
38
38
  status.add_argument("--app-key")
@@ -82,7 +82,7 @@ def register(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) ->
82
82
 
83
83
  log = task_subparsers.add_parser("log", help="读取流程日志;--task-id 必须来自 task list 的 data.items[].task_id")
84
84
  log.add_argument("--task-id", help="来自 `qingflow --json task list` 的 data.items[].task_id;不是列表序号")
85
- log.set_defaults(handler=_handle_log, format_hint="", app_key="", record_id="", workflow_node_id=0)
85
+ log.set_defaults(handler=_handle_log, format_hint="task_workflow_log_get", app_key="", record_id="", workflow_node_id=0)
86
86
 
87
87
 
88
88
  def _handle_list(args: argparse.Namespace, context: CliContext) -> dict:
@@ -566,6 +566,50 @@ def _format_task_get(result: dict[str, Any]) -> str:
566
566
  return "\n".join(lines) + "\n"
567
567
 
568
568
 
569
+ def _format_task_workflow_log(result: dict[str, Any]) -> str:
570
+ data = result.get("data") if isinstance(result.get("data"), dict) else {}
571
+ selection = data.get("selection") if isinstance(data.get("selection"), dict) else {}
572
+ visibility = data.get("visibility") if isinstance(data.get("visibility"), dict) else {}
573
+ items = data.get("items") if isinstance(data.get("items"), list) else []
574
+ lines: list[str] = []
575
+ if selection.get("task_id") not in (None, ""):
576
+ lines.append(f"Task ID: {selection.get('task_id')}")
577
+ locator = " / ".join(
578
+ str(value or "-")
579
+ for value in (
580
+ selection.get("app_key"),
581
+ selection.get("record_id"),
582
+ selection.get("workflow_node_id"),
583
+ )
584
+ )
585
+ if locator != "- / - / -":
586
+ lines.append(f"Locator: {locator}")
587
+ if visibility:
588
+ lines.append(
589
+ "Visibility: "
590
+ f"audit_record={visibility.get('audit_record_visible')} / "
591
+ f"qrobot_record={visibility.get('qrobot_record_visible')}"
592
+ )
593
+ lines.append(f"Workflow Logs: {len(items)}")
594
+ for item in items[:20]:
595
+ if not isinstance(item, dict):
596
+ continue
597
+ operator = item.get("operator") if isinstance(item.get("operator"), dict) else {}
598
+ operator_name = operator.get("name") or operator.get("email") or operator.get("uid") or "-"
599
+ parts = [
600
+ str(item.get("operation_time") or "-"),
601
+ str(item.get("node_name") or item.get("node_id") or "-"),
602
+ str(operator_name),
603
+ str(item.get("remark") or item.get("operation") or "-"),
604
+ ]
605
+ lines.append("- " + " / ".join(parts))
606
+ if len(items) > 20:
607
+ lines.append(f"... {len(items) - 20} more")
608
+ _append_warnings(lines, result.get("warnings"))
609
+ _append_verification(lines, result.get("verification"))
610
+ return "\n".join(lines) + "\n"
611
+
612
+
569
613
  def _format_task_action(result: dict[str, Any]) -> str:
570
614
  data = result.get("data") if isinstance(result.get("data"), dict) else {}
571
615
  action = str(data.get("action") or "").strip().lower()
@@ -741,6 +785,59 @@ def _format_import_status(result: dict[str, Any]) -> str:
741
785
  return "\n".join(lines) + "\n"
742
786
 
743
787
 
788
+ def _format_import_repair(result: dict[str, Any]) -> str:
789
+ lines = [
790
+ f"Status: {result.get('status') or '-'}",
791
+ f"Source File: {result.get('source_file_path') or '-'}",
792
+ f"Repaired File: {result.get('repaired_file_path') or '-'}",
793
+ f"Can Import After Repair: {result.get('can_import_after_repair')}",
794
+ ]
795
+ verification_id = result.get("verification_id") or result.get("new_verification_id")
796
+ if verification_id:
797
+ lines.append(f"Verification ID: {verification_id}")
798
+ applied_repairs = result.get("applied_repairs") if isinstance(result.get("applied_repairs"), list) else []
799
+ skipped_repairs = result.get("skipped_repairs") if isinstance(result.get("skipped_repairs"), list) else []
800
+ lines.append(f"Applied Repairs: {', '.join(map(str, applied_repairs)) if applied_repairs else '-'}")
801
+ if skipped_repairs:
802
+ lines.append(f"Skipped Repairs: {', '.join(map(str, skipped_repairs))}")
803
+ issue_summary = result.get("post_repair_issue_summary") if isinstance(result.get("post_repair_issue_summary"), dict) else {}
804
+ if issue_summary:
805
+ lines.append(
806
+ "Post Repair Issues: "
807
+ f"total={issue_summary.get('total', 0)}, "
808
+ f"errors={issue_summary.get('errors', 0)}, "
809
+ f"warnings={issue_summary.get('warnings', 0)}"
810
+ )
811
+ _append_warnings(lines, result.get("warnings"))
812
+ _append_verification(lines, result.get("verification"))
813
+ return "\n".join(lines) + "\n"
814
+
815
+
816
+ def _format_import_start(result: dict[str, Any]) -> str:
817
+ lines = [
818
+ f"Status: {result.get('status') or '-'}",
819
+ f"Accepted: {result.get('accepted')}",
820
+ f"Write Executed: {result.get('write_executed')}",
821
+ f"Safe To Retry: {result.get('safe_to_retry')}",
822
+ f"Import ID: {result.get('import_id') or '-'}",
823
+ f"Process ID: {result.get('process_id_str') or '-'}",
824
+ ]
825
+ if result.get("file_url"):
826
+ lines.append(f"File URL: {result.get('file_url')}")
827
+ for key, label in (
828
+ ("total", "Total Rows"),
829
+ ("finished", "Finished Rows"),
830
+ ("succeeded", "Succeeded Rows"),
831
+ ("failed", "Failed Rows"),
832
+ ):
833
+ value = result.get(key)
834
+ if value not in (None, ""):
835
+ lines.append(f"{label}: {value}")
836
+ _append_warnings(lines, result.get("warnings"))
837
+ _append_verification(lines, result.get("verification"))
838
+ return "\n".join(lines) + "\n"
839
+
840
+
744
841
  def _format_export_common(result: dict[str, Any], *, title: str | None = None) -> str:
745
842
  lines: list[str] = []
746
843
  if title:
@@ -1025,10 +1122,13 @@ _FORMATTERS = {
1025
1122
  "task_list": _format_task_list,
1026
1123
  "task_workbench": _format_task_workbench,
1027
1124
  "task_get": _format_task_get,
1125
+ "task_workflow_log_get": _format_task_workflow_log,
1028
1126
  "task_action_execute": _format_task_action,
1029
1127
  "task_associated_report_detail_get": _format_task_associated_report_detail,
1030
1128
  "import_template": _format_import_template,
1031
1129
  "import_verify": _format_import_verify,
1130
+ "import_repair": _format_import_repair,
1131
+ "import_start": _format_import_start,
1032
1132
  "import_status": _format_import_status,
1033
1133
  "export_start": _format_export_start,
1034
1134
  "export_status": _format_export_status,