@qingflow-tech/qingflow-app-user-mcp 1.0.28 → 1.0.30
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-user-mcp@1.0.
|
|
6
|
+
npm install @qingflow-tech/qingflow-app-user-mcp@1.0.30
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y -p @qingflow-tech/qingflow-app-user-mcp@1.0.
|
|
12
|
+
npx -y -p @qingflow-tech/qingflow-app-user-mcp@1.0.30 qingflow-app-user-mcp
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Environment:
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -490,7 +490,6 @@ class RecordTools(ToolBase):
|
|
|
490
490
|
record_id: str = "",
|
|
491
491
|
columns: list[JSONObject | int] | None = None,
|
|
492
492
|
view_id: str | None = None,
|
|
493
|
-
workflow_node_id: int | None = None,
|
|
494
493
|
output_profile: str = "detail_context",
|
|
495
494
|
) -> JSONObject:
|
|
496
495
|
return self.record_get_public(
|
|
@@ -499,7 +498,7 @@ class RecordTools(ToolBase):
|
|
|
499
498
|
record_id=record_id,
|
|
500
499
|
columns=columns or [],
|
|
501
500
|
view_id=view_id,
|
|
502
|
-
workflow_node_id=
|
|
501
|
+
workflow_node_id=None,
|
|
503
502
|
output_profile=output_profile,
|
|
504
503
|
)
|
|
505
504
|
|
|
@@ -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."
|