@josephyan/qingflow-app-builder-mcp 0.2.0-beta.8 → 0.2.0-beta.9

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 @josephyan/qingflow-app-builder-mcp@0.2.0-beta.8
6
+ npm install @josephyan/qingflow-app-builder-mcp@0.2.0-beta.9
7
7
  ```
8
8
 
9
9
  Run:
10
10
 
11
11
  ```bash
12
- npx -y -p @josephyan/qingflow-app-builder-mcp@0.2.0-beta.8 qingflow-app-builder-mcp
12
+ npx -y -p @josephyan/qingflow-app-builder-mcp@0.2.0-beta.9 qingflow-app-builder-mcp
13
13
  ```
14
14
 
15
15
  Environment:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@josephyan/qingflow-app-builder-mcp",
3
- "version": "0.2.0-beta.8",
3
+ "version": "0.2.0-beta.9",
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 = "0.2.0b8"
7
+ version = "0.2.0b9"
8
8
  description = "User-authenticated MCP server for Qingflow"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -2,4 +2,4 @@ from __future__ import annotations
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.2.0b8"
5
+ __version__ = "0.2.0b9"
@@ -1058,6 +1058,11 @@ class AiBuilderFacade:
1058
1058
  fields=current_fields,
1059
1059
  layout=layout,
1060
1060
  )
1061
+ payload["editVersionNo"] = self._resolve_form_edit_version(
1062
+ profile=profile,
1063
+ app_key=target.app_key,
1064
+ current_schema=schema_result,
1065
+ )
1061
1066
  try:
1062
1067
  self.apps.app_update_form_schema(profile=profile, app_key=target.app_key, payload=payload)
1063
1068
  except (QingflowApiError, RuntimeError) as error:
@@ -1273,6 +1278,11 @@ class AiBuilderFacade:
1273
1278
  current_schema=schema_result,
1274
1279
  layout=target_layout,
1275
1280
  )
1281
+ payload["editVersionNo"] = self._resolve_form_edit_version(
1282
+ profile=profile,
1283
+ app_key=app_key,
1284
+ current_schema=schema_result,
1285
+ )
1276
1286
  applied_layout = target_layout
1277
1287
  fallback_applied = None
1278
1288
  try:
@@ -1285,6 +1295,11 @@ class AiBuilderFacade:
1285
1295
  current_schema=schema_result,
1286
1296
  layout=flattened_layout,
1287
1297
  )
1298
+ fallback_payload["editVersionNo"] = self._resolve_form_edit_version(
1299
+ profile=profile,
1300
+ app_key=app_key,
1301
+ current_schema=schema_result,
1302
+ )
1288
1303
  try:
1289
1304
  self.apps.app_update_form_schema(profile=profile, app_key=app_key, payload=fallback_payload)
1290
1305
  applied_layout = flattened_layout
@@ -1875,6 +1890,13 @@ class AiBuilderFacade:
1875
1890
  "published": True,
1876
1891
  }
1877
1892
 
1893
+ def _resolve_form_edit_version(self, *, profile: str, app_key: str, current_schema: dict[str, Any]) -> int:
1894
+ try:
1895
+ version_result = self.apps.app_get_edit_version_no(profile=profile, app_key=app_key).get("result") or {}
1896
+ except (QingflowApiError, RuntimeError):
1897
+ version_result = {}
1898
+ return _coerce_positive_int(version_result.get("editVersionNo") or version_result.get("versionNo")) or int(current_schema.get("editVersionNo") or 1)
1899
+
1878
1900
  def _append_publish_result(self, *, profile: str, app_key: str, publish: bool, response: JSONObject) -> JSONObject:
1879
1901
  response["publish_requested"] = publish
1880
1902
  if not publish: