@qingflow-tech/qingflow-app-builder-mcp 1.1.0 → 1.1.2

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.1.0
6
+ npm install @qingflow-tech/qingflow-app-builder-mcp@1.1.2
7
7
  ```
8
8
 
9
9
  Run:
10
10
 
11
11
  ```bash
12
- npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.1.0 qingflow-app-builder-mcp
12
+ npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.1.2 qingflow-app-builder-mcp
13
13
  ```
14
14
 
15
15
  Environment:
@@ -12,7 +12,9 @@ const PKG_BY_BIN = {
12
12
  function resolvePackageModule(metaUrl, ...segments) {
13
13
  const scriptPath = fileURLToPath(metaUrl);
14
14
  const scriptDir = path.dirname(scriptPath);
15
- const direct = path.join(scriptDir, ...segments);
15
+ // bin files live in <pkg>/npm/bin/, runtime.mjs lives in the sibling <pkg>/npm/lib/,
16
+ // so step up one level before joining the requested segments.
17
+ const direct = path.join(scriptDir, "..", ...segments);
16
18
  if (fs.existsSync(direct)) {
17
19
  return pathToFileURL(direct).href;
18
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qingflow-tech/qingflow-app-builder-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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.1.0"
7
+ version = "1.1.2"
8
8
  description = "User-authenticated MCP server for Qingflow"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -33,6 +33,7 @@ from .record_tools import (
33
33
  _collect_question_relations,
34
34
  _field_ref_payload,
35
35
  _merge_field_indexes,
36
+ _normalize_form_schema,
36
37
  _subtable_descendant_ids,
37
38
  )
38
39
  from .task_tools import TaskTools, _task_page_amount, _task_page_items, _task_page_total
@@ -2487,21 +2488,43 @@ class TaskContextTools(ToolBase):
2487
2488
  ) -> dict[str, Any]:
2488
2489
  """执行内部辅助逻辑。"""
2489
2490
  record_id_text = stringify_backend_id(record_id)
2491
+ schema_warnings: list[JSONObject] = []
2490
2492
  try:
2491
- app_schema = self._record_tools._get_form_schema(profile, context, app_key, force_refresh=False)
2493
+ app_schema = _normalize_form_schema(
2494
+ self.backend.request(
2495
+ "GET",
2496
+ context,
2497
+ f"/app/{app_key}/form",
2498
+ params={"type": 3, "auditNodeId": workflow_node_id},
2499
+ )
2500
+ )
2492
2501
  except QingflowApiError as error:
2493
2502
  if not _is_task_optional_read_error(error):
2494
2503
  raise
2495
- return self._build_task_update_schema_from_runtime_answers(
2496
- profile=profile,
2497
- context=context,
2498
- app_key=app_key,
2499
- record_id=record_id,
2500
- workflow_node_id=workflow_node_id,
2501
- node_info=node_info,
2502
- current_answers=current_answers,
2503
- source_error=error,
2504
+ schema_warnings.append(
2505
+ {
2506
+ "code": "TASK_NODE_UPDATE_SCHEMA_UNAVAILABLE",
2507
+ "message": "task update schema fell back to the applicant form because the processing-node form was unavailable in this permission context.",
2508
+ "backend_code": error.backend_code,
2509
+ "http_status": error.http_status,
2510
+ "request_id": error.request_id,
2511
+ }
2504
2512
  )
2513
+ try:
2514
+ app_schema = self._record_tools._get_form_schema(profile, context, app_key, force_refresh=False)
2515
+ except QingflowApiError as fallback_error:
2516
+ if not _is_task_optional_read_error(fallback_error):
2517
+ raise
2518
+ return self._build_task_update_schema_from_runtime_answers(
2519
+ profile=profile,
2520
+ context=context,
2521
+ app_key=app_key,
2522
+ record_id=record_id,
2523
+ workflow_node_id=workflow_node_id,
2524
+ node_info=node_info,
2525
+ current_answers=current_answers,
2526
+ source_error=fallback_error,
2527
+ )
2505
2528
 
2506
2529
  question_relations = _collect_question_relations(app_schema)
2507
2530
  linked_field_ids = _collect_linked_required_field_ids(question_relations)
@@ -2512,12 +2535,13 @@ class TaskContextTools(ToolBase):
2512
2535
  linked_field_ids=linked_field_ids,
2513
2536
  )
2514
2537
  index = _merge_field_indexes(base_index, linked_hidden_index)
2515
- editable_question_ids, schema_warnings, source = self._resolve_task_editable_question_ids(
2538
+ editable_question_ids, editable_warnings, source = self._resolve_task_editable_question_ids(
2516
2539
  context,
2517
2540
  app_key=app_key,
2518
2541
  workflow_node_id=workflow_node_id,
2519
2542
  node_info=node_info,
2520
2543
  )
2544
+ schema_warnings.extend(editable_warnings)
2521
2545
  index, augmentation_warnings = self._augment_task_editable_field_index(
2522
2546
  index=index,
2523
2547
  current_answers=current_answers,