@qingflow-tech/qingflow-app-builder-mcp 1.0.9 → 1.0.10
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 +2 -2
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/skills/qingflow-app-builder/SKILL.md +8 -0
- package/skills/qingflow-app-builder/references/create-app.md +39 -2
- package/skills/qingflow-app-builder/references/tool-selection.md +2 -2
- package/skills/qingflow-app-builder/references/update-views.md +2 -1
- package/src/qingflow_mcp/builder_facade/models.py +2 -0
- package/src/qingflow_mcp/builder_facade/service.py +223 -39
- package/src/qingflow_mcp/cli/commands/builder.py +40 -11
- package/src/qingflow_mcp/cli/main.py +204 -3
- package/src/qingflow_mcp/response_trim.py +15 -10
- package/src/qingflow_mcp/server_app_builder.py +27 -2
- package/src/qingflow_mcp/tools/ai_builder_tools.py +1189 -29
- package/src/qingflow_mcp/tools/record_tools.py +200 -6
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.
|
|
6
|
+
npm install @qingflow-tech/qingflow-app-builder-mcp@1.0.10
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.0.
|
|
12
|
+
npx -y -p @qingflow-tech/qingflow-app-builder-mcp@1.0.10 qingflow-app-builder-mcp
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Environment:
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -49,6 +49,9 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
49
49
|
- Package work:
|
|
50
50
|
- use `package_get(package_id=...)` to read one known package
|
|
51
51
|
- use `package_apply(...)` for package creation, rename, icon, visibility, grouping, ordering, and app/portal layout
|
|
52
|
+
- Multi-app schema work:
|
|
53
|
+
- use one `app_schema_apply(apps=[...])` / CLI `builder schema apply --apps-file` when creating several apps in one package
|
|
54
|
+
- same-call relation fields may use `target_app_ref` to point at another `apps[].client_key`
|
|
52
55
|
- App base permissions:
|
|
53
56
|
- trust `app_get.editability.can_edit_app_base` for app base-info writes like app name, icon, and visibility
|
|
54
57
|
- `can_edit_form` only means schema/form-route capability; it no longer implies app base-info write capability
|
|
@@ -97,6 +100,7 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
97
100
|
- builder view writes use raw `view_key` values from `app_get.views`; `custom:<viewKey>` is a record-data `view_id` form, not a builder `view_key`
|
|
98
101
|
- use `builder_tool_contract` whenever the minimal legal shape is unclear
|
|
99
102
|
- keep view `filters` and `query_conditions` separate: `filters` are fixed saved filters; `query_conditions` configure the frontend query panel fields and only take effect after users enter query values
|
|
103
|
+
- new views default the associated report/view display area to visible with `limit_type="all"`; existing views preserve their current associated-resource display unless `associated_resources` is explicitly patched
|
|
100
104
|
- configure associated reports/views through `app_associated_resources_apply`, not through `app_views_apply`
|
|
101
105
|
|
|
102
106
|
## Standard Operating Order
|
|
@@ -145,6 +149,10 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
145
149
|
|
|
146
150
|
## Response Interpretation
|
|
147
151
|
|
|
152
|
+
- All builder apply/write tools return a standard UI envelope in addition to legacy fields:
|
|
153
|
+
`schema_version`, `operation`, `summary`, and `resources[]`.
|
|
154
|
+
- For UI cards or quick narration, read `resources[]` first. Each resource has `resource_type`, `operation`, `status`, `id`, `key`, `name`, typed `ids`, and `parent`.
|
|
155
|
+
- Use legacy fields such as `field_diff`, `views_diff`, `chart_results`, `created/updated/removed`, and `verification` only for compatibility and troubleshooting.
|
|
148
156
|
- Treat post-write readback as the source of truth, not just write status codes.
|
|
149
157
|
- `success` means write and verification completed; `partial_success` means the write landed but verification is incomplete.
|
|
150
158
|
- For portals, distinguish clearly between:
|
|
@@ -37,8 +37,8 @@ then do not treat that as one app.
|
|
|
37
37
|
Use this pattern instead:
|
|
38
38
|
|
|
39
39
|
1. `package_get` or `package_apply(create_if_missing=true, package_name=...)`
|
|
40
|
-
2. for
|
|
41
|
-
3.
|
|
40
|
+
2. for a multi-app system, run one `app_schema_apply` with `apps[]`
|
|
41
|
+
3. use `apps[].client_key` plus relation field `target_app_ref` when one new app references another new app
|
|
42
42
|
|
|
43
43
|
## Example
|
|
44
44
|
|
|
@@ -91,6 +91,43 @@ Apply schema for a new app:
|
|
|
91
91
|
}
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
+
Apply schema for multiple apps in one call:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"tool_name": "app_schema_apply",
|
|
99
|
+
"arguments": {
|
|
100
|
+
"profile": "default",
|
|
101
|
+
"package_id": 1218950,
|
|
102
|
+
"create_if_missing": true,
|
|
103
|
+
"publish": true,
|
|
104
|
+
"apps": [
|
|
105
|
+
{
|
|
106
|
+
"client_key": "customer",
|
|
107
|
+
"app_name": "客户",
|
|
108
|
+
"add_fields": [
|
|
109
|
+
{"name": "客户名称", "type": "text", "required": true, "as_data_title": true}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"client_key": "order",
|
|
114
|
+
"app_name": "订单",
|
|
115
|
+
"add_fields": [
|
|
116
|
+
{"name": "订单编号", "type": "text", "required": true, "as_data_title": true},
|
|
117
|
+
{
|
|
118
|
+
"name": "关联客户",
|
|
119
|
+
"type": "relation",
|
|
120
|
+
"target_app_ref": "customer",
|
|
121
|
+
"display_field": {"name": "客户名称"},
|
|
122
|
+
"visible_fields": [{"name": "客户名称"}]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
94
131
|
Data title is required: mark exactly one top-level field with `as_data_title: true`. Data cover is optional and only valid on a top-level `attachment` field.
|
|
95
132
|
|
|
96
133
|
## Common failures
|
|
@@ -45,7 +45,7 @@ These execute normalized patches. Some app apply tools publish by default and st
|
|
|
45
45
|
- `app_schema_apply`: create app shell or change fields
|
|
46
46
|
- `app_layout_apply`: merge or replace layout
|
|
47
47
|
- `app_flow_apply`: replace workflow
|
|
48
|
-
- `app_views_apply`: use `patch_views` for existing-view parameter replacement; use `upsert_views` for creation or full target config; remove views by key
|
|
48
|
+
- `app_views_apply`: use `patch_views` for existing-view parameter replacement; use `upsert_views` for creation or full target config; remove views by key; new views default associated report/view display to visible with `limit_type="all"`
|
|
49
49
|
- `app_custom_buttons_apply`: use `patch_buttons` for existing-button parameter replacement; use `upsert_buttons` for creation or full target config; configure add-data field mappings/default values; bind buttons to header/detail/list view positions; `placement=list` maps to the backend `INSIDE` row/list button position; merge-mode view configs require `buttons`; use `view_configs[].mode="replace"` or `buttons=[]` to clear a view's custom button bindings. For child-record creation linked to the current source record, map `source_field: "数据ID"` to the target relation field.
|
|
50
50
|
- `app_associated_resources_apply`: attach existing BI reports/views to the Qingflow app associated-resource pool and per-view display area; it does not create or edit QingBI report bodies/configs. Use `patch_resources` for existing associated-resource parameter replacement; use `upsert_resources` for creation or full target config; `view_configs`, remove, and reorder may reference existing resources by internal `associated_item_id` or by `chart_id`/`chart_key`/`view_key`; use `match_mappings` for associated view/report filters; publishes after successful writes; omit raw `sourceType`, and use `report_source="dataset"` only to attach an existing BI dataset report. Before `upsert_resources`, read `app_get.associated_resources` and reuse an existing matching `target_app_key + view_key/chart_key`; repeated upsert can create duplicates because `client_key` is only valid inside one apply call.
|
|
51
51
|
- `app_charts_apply`: create/edit/remove/reorder app-source QingBI report bodies/configs with `dataSourceType=qingflow`; it does not create/edit dataset BI reports and does not attach reports to Qingflow app associated-resource display. Use `patch_charts` for existing-chart parameter replacement; use `upsert_charts` for creation or full target config; supports `target/table` aliases plus QingBI chart types such as `summary`, `columnar`, `area`, `funnel`, `radar`, `scatter`, `dualaxes`, and `map`; charts are immediate-live and do not publish; use `chart_id` when names are not unique
|
|
@@ -64,7 +64,7 @@ For object-level updates, the safe partial syntax is `patch_*` with the object's
|
|
|
64
64
|
- Create a brand new package, then create one app in it:
|
|
65
65
|
`package_apply(create_if_missing=true) -> app_schema_apply`
|
|
66
66
|
- Create a brand new multi-app system/package:
|
|
67
|
-
`package_apply(create_if_missing=true) ->
|
|
67
|
+
`package_apply(create_if_missing=true) -> app_schema_apply(apps[])`
|
|
68
68
|
- Update fields on an existing app:
|
|
69
69
|
`app_resolve -> app_get_fields -> app_schema_apply`
|
|
70
70
|
- Tidy layout:
|
|
@@ -30,7 +30,8 @@ Canonical rules before any example:
|
|
|
30
30
|
- Treat `fields` only as a legacy alias the MCP may normalize, not as the preferred shape
|
|
31
31
|
- Use `filters` with canonical keys `field_name`, `operator`, `value`/`values`
|
|
32
32
|
- Use `query_conditions` for the frontend query panel. Do not put query-panel fields into `filters`.
|
|
33
|
-
-
|
|
33
|
+
- New views created by `app_views_apply` default the frontend associated report/view area to visible with `limit_type="all"`. Existing views preserve their current associated-resource display unless `associated_resources` is explicitly patched.
|
|
34
|
+
- Use `app_associated_resources_apply` for the associated report/view resource pool, selected resources, and match rules. `associated_item_id` is the internal associated-resource id from `app_get.associated_resources`; `view_configs`, remove, and reorder may also pass an existing resource's `chart_id`/`chart_key`/`view_key`, which the tool resolves to the internal id. Do not write backend raw `sourceType`; reports default to BI app reports, and dataset reports use `report_source="dataset"`. Use `match_mappings` for associated view/report filters; read `match-rules.md` if field type compatibility is unclear.
|
|
34
35
|
- For gantt, use `start_field`, `end_field`, and optionally `title_field`
|
|
35
36
|
- If `app_get.views` or `app_get_views` shows duplicate view names, include `view_key` in `upsert_views[]` and update that exact target
|
|
36
37
|
- Builder view writes always use the raw `view_key` from `app_get.views[].view_key`, such as `emsrao25rs02`. Do not pass `custom:emsrao25rs02`; that prefixed form is only for record-data `view_id`.
|
|
@@ -2034,6 +2034,8 @@ FieldUpdatePatch.model_rebuild()
|
|
|
2034
2034
|
|
|
2035
2035
|
class AppGetResponse(StrictModel):
|
|
2036
2036
|
app_key: str
|
|
2037
|
+
app_name: str | None = None
|
|
2038
|
+
name: str | None = None
|
|
2037
2039
|
title: str | None = None
|
|
2038
2040
|
app_icon: str | None = None
|
|
2039
2041
|
visibility: dict[str, Any] = Field(default_factory=dict)
|