@josephyan/qingflow-cli 0.2.0-beta.56 → 0.2.0-beta.57

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-cli@0.2.0-beta.56
6
+ npm install @josephyan/qingflow-cli@0.2.0-beta.57
7
7
  ```
8
8
 
9
9
  Run:
10
10
 
11
11
  ```bash
12
- npx -y -p @josephyan/qingflow-cli@0.2.0-beta.56 qingflow
12
+ npx -y -p @josephyan/qingflow-cli@0.2.0-beta.57 qingflow
13
13
  ```
14
14
 
15
15
  Environment:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@josephyan/qingflow-cli",
3
- "version": "0.2.0-beta.56",
3
+ "version": "0.2.0-beta.57",
4
4
  "description": "Human-friendly Qingflow command line interface for auth, record operations, import, tasks, and stable builder flows.",
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.0b56"
7
+ version = "0.2.0b57"
8
8
  description = "User-authenticated MCP server for Qingflow"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -129,9 +129,9 @@ def _handle_fields_apply(args: argparse.Namespace, context: CliContext) -> dict:
129
129
  app_title=args.app_title,
130
130
  create_if_missing=bool(args.create_if_missing),
131
131
  publish=bool(args.publish),
132
- add_fields=_coerce_list(payload.get("add_fields")),
132
+ add_fields=[_normalize_field_spec(item) for item in _coerce_list(payload.get("add_fields"))],
133
133
  update_fields=_coerce_list(payload.get("update_fields")),
134
- remove_fields=_coerce_list(payload.get("remove_fields")),
134
+ remove_fields=[_normalize_field_selector(item) for item in _coerce_list(payload.get("remove_fields"))],
135
135
  )
136
136
 
137
137
 
@@ -197,3 +197,26 @@ def _handle_publish_verify(args: argparse.Namespace, context: CliContext) -> dic
197
197
 
198
198
  def _coerce_list(value: Any) -> list[Any]:
199
199
  return value if isinstance(value, list) else []
200
+
201
+
202
+ def _normalize_field_spec(value: Any) -> Any:
203
+ if not isinstance(value, dict):
204
+ return value
205
+ normalized = dict(value)
206
+ if "name" not in normalized and isinstance(normalized.get("field_name"), str):
207
+ normalized["name"] = normalized["field_name"]
208
+ if "type" not in normalized and isinstance(normalized.get("field_type"), str):
209
+ normalized["type"] = normalized["field_type"]
210
+ normalized.pop("field_name", None)
211
+ normalized.pop("field_type", None)
212
+ return normalized
213
+
214
+
215
+ def _normalize_field_selector(value: Any) -> Any:
216
+ if not isinstance(value, dict):
217
+ return value
218
+ normalized = dict(value)
219
+ if "name" not in normalized and isinstance(normalized.get("field_name"), str):
220
+ normalized["name"] = normalized["field_name"]
221
+ normalized.pop("field_name", None)
222
+ return normalized