@josephyan/qingflow-app-builder-mcp 1.1.26 → 1.1.27
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 +4 -3
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/skills/qingflow-app-builder/SKILL.md +24 -75
- package/skills/qingflow-app-builder/references/build-complete-system.md +185 -379
- package/skills/qingflow-app-builder/references/build-single-app.md +103 -495
- package/skills/qingflow-app-builder/references/create-app.md +15 -3
- package/skills/qingflow-app-builder/references/gotchas.md +6 -10
- package/skills/qingflow-app-builder/references/match-rules.md +18 -14
- package/skills/qingflow-app-builder/references/public-surface-sync.md +2 -2
- package/skills/qingflow-app-builder/references/tool-selection.md +9 -11
- package/src/qingflow_mcp/builder_facade/models.py +167 -71
- package/src/qingflow_mcp/builder_facade/service.py +612 -152
- package/src/qingflow_mcp/cli/commands/builder.py +3 -1
- package/src/qingflow_mcp/cli/main.py +8 -3
- package/src/qingflow_mcp/server_app_builder.py +9 -8
- package/src/qingflow_mcp/tools/ai_builder_tools.py +231 -180
- package/src/qingflow_mcp/version.py +2 -0
package/README.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Install:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install @josephyan/qingflow-app-builder-mcp@1.1.
|
|
6
|
+
npm install @josephyan/qingflow-app-builder-mcp@1.1.27
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y -p @josephyan/qingflow-app-builder-mcp@1.1.
|
|
12
|
+
npx -y -p @josephyan/qingflow-app-builder-mcp@1.1.27 qingflow-app-builder-mcp
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Environment:
|
|
@@ -30,5 +30,6 @@ Bundled skills:
|
|
|
30
30
|
Note:
|
|
31
31
|
|
|
32
32
|
- The skill files are included in the npm package.
|
|
33
|
-
- On install, the package
|
|
33
|
+
- On install, the package installs bundled skills into `$CODEX_HOME/skills` (or `~/.codex/skills` if `CODEX_HOME` is unset) by symlink and refreshes them on package updates.
|
|
34
|
+
- You can also run `qingflow-app-builder-mcp skills list` or `qingflow-app-builder-mcp skills install --agent codex|claude-code|cursor|generic --scope user|project [--copy] [--force]`.
|
|
34
35
|
- If a stdio MCP client reports `Transport closed`, delete `.npm-python`, reinstall the package, and make sure CLI/user/builder packages are on the same version. The stdio entrypoints refuse runtime bootstrap so install logs never corrupt MCP stdout.
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -7,6 +7,8 @@ metadata:
|
|
|
7
7
|
|
|
8
8
|
# Qingflow App Builder
|
|
9
9
|
|
|
10
|
+
> **Skill 版本**:`qingflow-skills-2026.06.30.1`
|
|
11
|
+
|
|
10
12
|
## Overview
|
|
11
13
|
|
|
12
14
|
This skill is for the current **public builder surface**, not for legacy low-level builder writes.
|
|
@@ -35,10 +37,10 @@ Default modeling rules:
|
|
|
35
37
|
## Public Tools You Should Think In
|
|
36
38
|
|
|
37
39
|
- Package: `package_get`, `package_apply`
|
|
38
|
-
- App reads: `app_resolve`, `app_get`, `app_get_fields`, `app_get_layout`, `app_get_views`, `app_get_flow`, `app_get_charts`, `
|
|
40
|
+
- App reads: `app_resolve`, `app_get`, `app_get_fields`, `app_get_layout`, `app_get_views`, `app_get_flow`, `app_get_charts`, `app_get_associated_resources`
|
|
39
41
|
- Builder reads: `portal_list`, `portal_get`, `view_get`, `chart_get`, `builder_tool_contract`
|
|
40
42
|
- Directory: `member_search`, `role_search`, `role_create`
|
|
41
|
-
- Writes: `app_schema_apply`, `app_layout_apply`, `app_flow_apply`, `app_views_apply`, `
|
|
43
|
+
- Writes: `app_schema_apply`, `app_layout_apply`, `app_flow_apply`, `app_views_apply`, `app_associated_resources_apply`, `app_charts_apply`, `portal_apply`, `app_release_edit_lock_if_mine`
|
|
42
44
|
- Verification: `app_publish_verify`
|
|
43
45
|
- Cross-cutting escalation: `feedback_submit` after explicit user confirmation when the public builder surface still cannot satisfy the user's need
|
|
44
46
|
|
|
@@ -51,40 +53,35 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
51
53
|
- use `package_apply(...)` for package creation, rename, icon, visibility, grouping, ordering, and app/portal layout
|
|
52
54
|
- Multi-app schema work:
|
|
53
55
|
- use one `app_schema_apply(apps=[...])` / CLI `builder schema apply --apps-file` when creating several apps in one package
|
|
56
|
+
- put form layout directly in `apps[].form.sections`; the CLI writes it in the same schema save as fields and relations
|
|
54
57
|
- same-call relation fields may use `target_app_ref` to point at another `apps[].client_key`
|
|
55
58
|
- App base permissions:
|
|
56
59
|
- trust `app_get.editability.can_edit_app_base` for app base-info writes like app name, icon, and visibility
|
|
57
60
|
- `can_edit_form` only means schema/form-route capability; it no longer implies app base-info write capability
|
|
58
61
|
- Partial update rule:
|
|
59
|
-
- for existing views,
|
|
60
|
-
- each patch item uses the object's real selector field (`view_key` / `
|
|
62
|
+
- for existing views, associated resources, and charts, prefer `patch_views` / `patch_resources` / `patch_charts`
|
|
63
|
+
- each patch item uses the object's real selector field (`view_key` / `associated_item_id` / `chart_id`, or unique name where supported) plus `set` and optional `unset`; do not send a literal `selector` key for these tools
|
|
61
64
|
- use `upsert_*` for creation or full target configuration; do not send a partial `upsert_*` and expect the backend to merge missing required fields
|
|
62
65
|
- Portal work:
|
|
63
66
|
- `portal_apply` is the public write path
|
|
67
|
+
- complete-system portals create QingBI charts inline through `sections[].chart`; do not pre-create charts as the standard route
|
|
64
68
|
- in edit mode, omitting `sections` means “preserve existing layout and update base info only”
|
|
65
69
|
- supplying `sections` means full replace semantics for sections
|
|
66
70
|
- portal sections use a 24-column PC grid; all components sharing the same `y` coordinate must have identical `rows` values and their `cols` must sum to exactly 24; mixing `rows` in the same row causes height misalignment, and a `cols` sum under 24 leaves blank space at the row end; the next row's `y` must equal the previous row's `y` + `rows`
|
|
67
|
-
-
|
|
71
|
+
- Standalone chart maintenance:
|
|
68
72
|
- `app_charts_apply` is the public write path for app-source QingBI report bodies/configs; it creates/updates reports with `dataSourceType=qingflow`
|
|
73
|
+
- do not use it as the standard complete-system route; complete-system portals should inline QingBI charts through `portal_apply sections[].chart`
|
|
69
74
|
- dataset BI reports are not created or edited by `app_charts_apply` yet; create them in QingBI first, then attach the existing report with `app_associated_resources_apply` and `report_source="dataset"`
|
|
70
75
|
- it does not attach the report to the Qingflow app associated-resource display; use `app_associated_resources_apply` for that
|
|
71
76
|
- supported `chart_type` values include legacy public aliases `target`, `table` and QingBI types such as `summary`, `columnar`, `area`, `stacked_area`, `funnel`, `waterfall`, `gauge`, `heatmap`, `histogram`, `treemap`, `radar`, `stacked_bar`, `stacked_column`, `scatter`, `ring`, `rose`, `dualaxes`, `map`, and `timeline`
|
|
72
77
|
- use `patch_charts` for changing a chart name, visibility, filters, or one config fragment on an existing chart
|
|
73
78
|
- `visibility` is a public capability and should be treated as a base-only permission update
|
|
74
79
|
- do not model chart visibility changes as raw config rewrites
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
- for
|
|
79
|
-
- use `field_mappings` for dynamic current-record values, including system fields such as `数据ID` (`field_id=-17`) and `编号` (`field_id=0`)
|
|
80
|
-
- to prefill a target relation field with the current source record, map `{"source_field": "数据ID", "target_field": "目标引用字段"}`; use `default_values` only for static constants
|
|
80
|
+
- View action work:
|
|
81
|
+
- declare button configuration only inside `app_views_apply` view items with `action_buttons`
|
|
82
|
+
- design the view and its available actions together
|
|
83
|
+
- use `field_mappings` for dynamic current-record values, including system fields such as `数据ID` and `编号`
|
|
81
84
|
- if field type compatibility is unclear, read [references/match-rules.md](references/match-rules.md)
|
|
82
|
-
- bind buttons to views through `view_configs[].buttons[]`; default to `placement`: `header` or `detail`
|
|
83
|
-
- builder `view_configs[].view_key` uses the raw key from `app_get.views[].view_key`, without a `custom:` prefix
|
|
84
|
-
- `buttons` is required in merge mode; do not send a view config with only `view_key`
|
|
85
|
-
- `view_configs[].mode` defaults to `merge`; use `mode: "replace"` or an explicit empty `buttons: []` to clear a view's custom button bindings
|
|
86
|
-
- `placement=list` configures row/list buttons and maps to the backend `INSIDE` button position
|
|
87
|
-
- advanced bindings may use `button_limit`, `button_formula`, `button_formula_type`, and `print_tpls` only when visibility or print-template behavior is required
|
|
88
85
|
- Associated resources:
|
|
89
86
|
- `app_associated_resources_apply` is the public write path for the Qingflow app-level associated report/view pool and per-view display config
|
|
90
87
|
- for multi-app systems, use `apps[]` to batch associated-resource writes; each item carries its own `app_key` plus `upsert_resources` / `patch_resources` / `view_configs`
|
|
@@ -98,6 +95,8 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
98
95
|
- if field type compatibility is unclear, read [references/match-rules.md](references/match-rules.md)
|
|
99
96
|
- Views and flows:
|
|
100
97
|
- stay on `app_views_apply` / `app_flow_apply`
|
|
98
|
+
- new views use top-level `views[]`; the same batch may mix same-app and cross-app views
|
|
99
|
+
- buttons belong in view `action_buttons`
|
|
101
100
|
- use `patch_views` for existing-view parameter changes such as `query_conditions`, `filters`, `columns`, or visibility
|
|
102
101
|
- 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`
|
|
103
102
|
- use `builder_tool_contract` whenever the minimal legal shape is unclear
|
|
@@ -116,7 +115,7 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
116
115
|
- package-scoped work with known id -> `package_get`
|
|
117
116
|
- portal inventory -> `portal_list`
|
|
118
117
|
5. Read only the smallest config slice needed:
|
|
119
|
-
- app map -> `app_get` (default entry; includes compact views, charts,
|
|
118
|
+
- app map -> `app_get` (default entry; includes compact views, charts, and associated resource pool)
|
|
120
119
|
- fields -> `app_get_fields`
|
|
121
120
|
- layout -> `app_get_layout`
|
|
122
121
|
- views -> `app_get_views` only when the app_get compact list is not enough
|
|
@@ -125,11 +124,10 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
125
124
|
- portal -> `portal_get`
|
|
126
125
|
6. If the public shape is unclear, call `builder_tool_contract`
|
|
127
126
|
7. Apply the smallest patch tool that fits:
|
|
128
|
-
- fields -> `app_schema_apply`
|
|
129
|
-
- layout -> `app_layout_apply`
|
|
127
|
+
- fields and form layout -> `app_schema_apply`
|
|
128
|
+
- layout-only maintenance -> `app_layout_apply`
|
|
130
129
|
- flow -> `app_flow_apply`
|
|
131
130
|
- existing views -> `app_views_apply.patch_views`; new/full views -> `app_views_apply.upsert_views`
|
|
132
|
-
- existing buttons -> `app_custom_buttons_apply.patch_buttons`; new/full buttons -> `app_custom_buttons_apply.upsert_buttons`
|
|
133
131
|
- existing associated resources -> `app_associated_resources_apply.patch_resources`; new/full resources -> `app_associated_resources_apply.upsert_resources`
|
|
134
132
|
- existing charts -> `app_charts_apply.patch_charts`; new/full charts -> `app_charts_apply.upsert_charts`
|
|
135
133
|
- portal -> `portal_apply`
|
|
@@ -142,7 +140,7 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
142
140
|
- If `package_id` is unknown, derive it from related app/portal readback when possible; otherwise ask the user instead of falling back to hidden package lookup tools.
|
|
143
141
|
- Do not use `package_create` or `package_attach_app` as a public default path. If they still appear in low-level code, treat them as internal/legacy implementation details.
|
|
144
142
|
- Do not use raw `portal_*` writes or raw `qingbi_report_*` writes as the default builder strategy.
|
|
145
|
-
- Always pass `publish: true` (or CLI `--publish`) explicitly on `app_schema_apply`, `app_layout_apply`, `app_flow_apply`, `app_views_apply`, and `portal_apply`
|
|
143
|
+
- Always pass `publish: true` (or CLI `--publish`) explicitly on `app_schema_apply`, `app_layout_apply`, `app_flow_apply`, `app_views_apply`, and `portal_apply` when those tools are used directly. `app_associated_resources_apply` publishes automatically after at least one write succeeds and does not accept a `publish` parameter. `app_charts_apply` is immediate-live without a publish step.
|
|
146
144
|
- When creating or updating fields, configure the app data title/cover directly in field JSON: `as_data_title: true` is required on exactly one readable top-level title field; `as_data_cover: true` is optional and only valid on one top-level `attachment` field.
|
|
147
145
|
- When any tool returns `error_code` or `VALIDATION_ERROR`, read the `message` field verbatim first before guessing at parameter or CLI parsing issues. A clear `message` like "relation field requires visible_fields" is the root cause — do not redirect to unrelated hypotheses such as `create_if_missing` parsing or flag conflicts.
|
|
148
146
|
- If the same validation error repeats twice, stop guessing and re-read `builder_tool_contract`.
|
|
@@ -185,72 +183,23 @@ Treat these as the official surface. Do not default to `package_create`, `packag
|
|
|
185
183
|
- Search members or roles: `member_search`, `role_search`
|
|
186
184
|
- Create reusable role: `role_create`
|
|
187
185
|
- Add/update/remove fields: `app_schema_apply`
|
|
188
|
-
- Merge or replace layout: `app_layout_apply`
|
|
186
|
+
- Merge or replace layout-only changes on an existing app: `app_layout_apply`
|
|
189
187
|
- Replace workflow: `app_flow_apply`
|
|
190
188
|
- Upsert/patch/remove views: `app_views_apply`
|
|
191
|
-
- Upsert/patch/remove custom buttons and bind them to header/detail view positions: `app_custom_buttons_apply`
|
|
192
189
|
- Upsert/patch/remove app associated reports/views and per-view display: `app_associated_resources_apply`
|
|
193
190
|
- Upsert/patch/remove/reorder charts: `app_charts_apply`
|
|
194
191
|
- Create or update portal pages: `portal_apply`
|
|
195
192
|
- Release your own stale edit lock: `app_release_edit_lock_if_mine`
|
|
196
193
|
- Final publish verification: `app_publish_verify`
|
|
197
194
|
|
|
198
|
-
## Button Pattern
|
|
199
|
-
|
|
200
|
-
Use `app_custom_buttons_apply` for the whole custom-button path: button body, add-data mapping, default values, and placement.
|
|
201
|
-
|
|
202
|
-
```json
|
|
203
|
-
{
|
|
204
|
-
"tool_name": "app_custom_buttons_apply",
|
|
205
|
-
"arguments": {
|
|
206
|
-
"app_key": "EMPLOYEE_APP",
|
|
207
|
-
"upsert_buttons": [
|
|
208
|
-
{
|
|
209
|
-
"client_key": "add_worklog",
|
|
210
|
-
"button_text": "快捷添加工时",
|
|
211
|
-
"style_preset": "primary_blue",
|
|
212
|
-
"button_icon": "ex-plus-circle",
|
|
213
|
-
"trigger_action": "addData",
|
|
214
|
-
"trigger_add_data_config": {
|
|
215
|
-
"target_app_key": "WORKLOG_APP",
|
|
216
|
-
"field_mappings": [
|
|
217
|
-
{"source_field": "数据ID", "target_field": "关联员工"},
|
|
218
|
-
{"source_field": "员工名称", "target_field": "员工姓名"},
|
|
219
|
-
{"source_field": "所属部门", "target_field": "部门名称"}
|
|
220
|
-
],
|
|
221
|
-
"default_values": {
|
|
222
|
-
"工时类型": "日常工作",
|
|
223
|
-
"状态": "待提交"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
],
|
|
228
|
-
"remove_buttons": [],
|
|
229
|
-
"view_configs": [
|
|
230
|
-
{
|
|
231
|
-
"view_key": "EMPLOYEE_VIEW",
|
|
232
|
-
"mode": "merge",
|
|
233
|
-
"buttons": [
|
|
234
|
-
{"button_ref": "add_worklog", "placement": "detail", "primary": true}
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
]
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
`button_ref` may be a same-call `client_key` or an existing `button_id`. Supported placements are `header`, `detail`, and `list`; `list` maps to the backend `INSIDE` row/list button position.
|
|
243
|
-
|
|
244
|
-
For add-data buttons that create a child record linked back to the current record, map `source_field: "数据ID"` to the target relation field. Do not use raw `que_relation` unless maintaining an existing backend config.
|
|
245
|
-
|
|
246
195
|
## Playbook Selection
|
|
247
196
|
|
|
248
197
|
Before starting any build or create task, route to the right reference first:
|
|
249
198
|
|
|
250
199
|
| User intent | Signal phrases | Playbook |
|
|
251
200
|
|-------------|---------------|---------|
|
|
252
|
-
| Multi-app business system with cross-app relations
|
|
253
|
-
| Single app end-to-end:
|
|
201
|
+
| Multi-app business system with cross-app relations and a portal workbench | "建一套系统"、"包含 N 个模块"、"这几个表单之间建立关联"、"完整的业务系统" | [build-complete-system.md](references/build-complete-system.md) |
|
|
202
|
+
| Single app end-to-end: schema, form layout, views, view actions, optional workflow, and verification | "建一个应用"、"帮我搭一个XX管理"、"从零开始建一个XX"、"我需要一个管理XX的应用" | [build-single-app.md](references/build-single-app.md) |
|
|
254
203
|
| Add one new app inside an existing package | "在这个包里加一个表单"、"现有系统里新增一个模块" | [create-app.md](references/create-app.md) |
|
|
255
204
|
| Update fields or schema only | "加一个字段"、"改字段名"、"删除字段" | [update-schema.md](references/update-schema.md) |
|
|
256
205
|
| Update layout only | "调整分组"、"改排列顺序" | [update-layout.md](references/update-layout.md) |
|
|
@@ -274,4 +223,4 @@ Decision rule: if the user mentions **multiple related apps or a portal**, use `
|
|
|
274
223
|
- Update views only: [references/update-views.md](references/update-views.md)
|
|
275
224
|
- Standard end-to-end builder sequences: [references/solution-playbooks.md](references/solution-playbooks.md)
|
|
276
225
|
- Build a complete multi-app system from scratch: [references/build-complete-system.md](references/build-complete-system.md)
|
|
277
|
-
- Build a single app end-to-end (schema + layout +
|
|
226
|
+
- Build a single app end-to-end (schema + form layout + views + view actions + optional workflow + verification): [references/build-single-app.md](references/build-single-app.md)
|