@qingflow-tech/qingflow-app-builder-mcp 1.0.29 → 1.0.31

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.29
6
+ npm install @qingflow-tech/qingflow-app-builder-mcp@1.0.31
7
7
  ```
8
8
 
9
9
  Run:
10
10
 
11
11
  ```bash
12
- npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.0.29 qingflow-app-builder-mcp
12
+ npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.0.31 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.29",
3
+ "version": "1.0.31",
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.29"
7
+ version = "1.0.31"
8
8
  description = "User-authenticated MCP server for Qingflow"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -99,6 +99,8 @@ from .models import (
99
99
  FlowNodePermissionsPatch,
100
100
  )
101
101
 
102
+ BUILDER_PORTAL_LIST_DETAIL_VERIFY_LIMIT = 50
103
+
102
104
 
103
105
  QUESTION_TYPE_TO_FIELD_TYPE: dict[int, str] = {
104
106
  2: FieldType.text.value,
@@ -5998,6 +6000,42 @@ class AiBuilderFacade:
5998
6000
  warnings: list[dict[str, Any]] = []
5999
6001
  items: list[dict[str, Any]] = []
6000
6002
  permission_verified = True
6003
+ if isinstance(raw_items, list) and len(raw_items) > BUILDER_PORTAL_LIST_DETAIL_VERIFY_LIMIT:
6004
+ normalized = _normalize_portal_list_items(raw_items)
6005
+ response = PortalListResponse(items=normalized, total=len(normalized))
6006
+ warnings.append(
6007
+ _warning(
6008
+ "PORTAL_PERMISSION_VERIFICATION_SKIPPED",
6009
+ "builder portal_list returned the discovery list without per-portal edit permission checks because the workspace has too many portals",
6010
+ total_available=len(raw_items),
6011
+ detail_verify_limit=BUILDER_PORTAL_LIST_DETAIL_VERIFY_LIMIT,
6012
+ )
6013
+ )
6014
+ return {
6015
+ "status": "success",
6016
+ "error_code": None,
6017
+ "recoverable": False,
6018
+ "message": "list builder portal discovery items",
6019
+ "normalized_args": {},
6020
+ "missing_fields": [],
6021
+ "allowed_values": {},
6022
+ "details": {
6023
+ "total_available": len(raw_items),
6024
+ "detail_verify_limit": BUILDER_PORTAL_LIST_DETAIL_VERIFY_LIMIT,
6025
+ "permission_filter_applied": False,
6026
+ },
6027
+ "request_id": None,
6028
+ "suggested_next_call": None,
6029
+ "noop": False,
6030
+ "warnings": warnings,
6031
+ "verification": {
6032
+ "portal_list_loaded": True,
6033
+ "portal_permissions_verified": False,
6034
+ "permission_filter_applied": False,
6035
+ },
6036
+ "verified": False,
6037
+ **response.model_dump(mode="json"),
6038
+ }
6001
6039
  for raw_item in raw_items if isinstance(raw_items, list) else []:
6002
6040
  if not isinstance(raw_item, dict):
6003
6041
  continue
@@ -5343,6 +5343,7 @@ _BUILDER_TOOL_CONTRACTS: dict[str, JSONObject] = {
5343
5343
  "returns builder-configurable portal list items only",
5344
5344
  "use this as the builder portal discovery path before portal_get",
5345
5345
  "results are compact list items, not raw dash payloads",
5346
+ "large workspaces may return an unfiltered discovery list with portal_permissions_verified=false instead of probing every portal detail",
5346
5347
  ],
5347
5348
  "minimal_example": {
5348
5349
  "profile": "default",
@@ -38,6 +38,9 @@ from .record_tools import (
38
38
  from .task_tools import TaskTools, _task_page_amount, _task_page_items, _task_page_total
39
39
 
40
40
 
41
+ TASK_LOCATOR_MAX_SCAN_PAGES_PER_BOX = 3
42
+
43
+
41
44
  class TaskContextTools(ToolBase):
42
45
  """任务上下文工具(中文名:任务上下文与审批执行)。
43
46
 
@@ -1252,6 +1255,7 @@ class TaskContextTools(ToolBase):
1252
1255
  searched_task_boxes = ("todo", "initiated", "cc", "done")
1253
1256
  incomplete_task_boxes: list[str] = []
1254
1257
  inaccessible_task_boxes: list[dict[str, Any]] = []
1258
+ truncated_task_boxes: list[dict[str, Any]] = []
1255
1259
  page_size = 100
1256
1260
  for task_box in searched_task_boxes:
1257
1261
  page = 1
@@ -1305,6 +1309,16 @@ class TaskContextTools(ToolBase):
1305
1309
  break
1306
1310
  if not items or len(items) < page_size:
1307
1311
  break
1312
+ if page >= TASK_LOCATOR_MAX_SCAN_PAGES_PER_BOX:
1313
+ truncated_task_boxes.append(
1314
+ {
1315
+ "task_box": task_box,
1316
+ "max_pages": TASK_LOCATOR_MAX_SCAN_PAGES_PER_BOX,
1317
+ "page_size": page_size,
1318
+ "reported_page_amount": page_amount,
1319
+ }
1320
+ )
1321
+ break
1308
1322
  page += 1
1309
1323
  if incomplete_task_boxes:
1310
1324
  searched = ", ".join(incomplete_task_boxes)
@@ -1325,6 +1339,19 @@ class TaskContextTools(ToolBase):
1325
1339
  },
1326
1340
  )
1327
1341
  )
1342
+ if truncated_task_boxes:
1343
+ raise_tool_error(
1344
+ QingflowApiError.config_error(
1345
+ f"task_id={task_id_text} was not found in the first {TASK_LOCATOR_MAX_SCAN_PAGES_PER_BOX} pages of each visible task box. Rerun task_list with a query or the relevant page and pass the exact data.items[].task_id; do not guess task ids.",
1346
+ details={
1347
+ "task_id": task_id_text,
1348
+ "searched_task_boxes": list(searched_task_boxes),
1349
+ "truncated_task_boxes": truncated_task_boxes,
1350
+ "max_pages_per_task_box": TASK_LOCATOR_MAX_SCAN_PAGES_PER_BOX,
1351
+ "page_size": page_size,
1352
+ },
1353
+ )
1354
+ )
1328
1355
  raise_tool_error(
1329
1356
  QingflowApiError.config_error(
1330
1357
  f"task_id={task_id_text} was not found in the current visible task boxes (todo, initiated, cc, done). Rerun task_list and pass data.items[].task_id; do not use the displayed row number or guess app_key/record_id/workflow_node_id."