@qingflow-tech/qingflow-app-builder-mcp 1.0.25 → 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.
|
|
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.
|
|
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
package/pyproject.toml
CHANGED
|
@@ -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="
|
|
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)
|
|
@@ -1345,6 +1345,47 @@ def _format_file_upload_local(result: dict[str, Any]) -> str:
|
|
|
1345
1345
|
return "\n".join(lines) + "\n"
|
|
1346
1346
|
|
|
1347
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
|
+
|
|
1348
1389
|
def emit_json_result(result: dict[str, Any], *, stream: TextIO) -> None:
|
|
1349
1390
|
json.dump(result, stream, ensure_ascii=False, indent=2)
|
|
1350
1391
|
stream.write("\n")
|
|
@@ -1561,4 +1602,5 @@ _FORMATTERS = {
|
|
|
1561
1602
|
"export_direct": _format_export_direct,
|
|
1562
1603
|
"builder_summary": _format_builder_summary,
|
|
1563
1604
|
"file_upload_local": _format_file_upload_local,
|
|
1605
|
+
"feedback_submit": _format_feedback_submit,
|
|
1564
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
|
}
|