@josephyan/qingflow-cli 1.1.3 → 1.1.5
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 +7 -3
- package/docs/local-agent-install.md +57 -6
- package/entry_point.py +1 -1
- package/npm/bin/qingflow-skills.mjs +5 -0
- package/npm/bin/qingflow.mjs +1 -34
- package/npm/lib/runtime.mjs +21 -101
- package/npm/scripts/postinstall.mjs +1 -10
- package/package.json +3 -2
- package/pyproject.toml +1 -1
- package/skills/qingflow-cli/SKILL.md +58 -44
- package/skills/qingflow-cli/manifest.yaml +1 -1
- package/skills/qingflow-cli/reference/00-INDEX.md +35 -0
- package/skills/qingflow-cli/reference/builder/10-build-single-app.md +38 -0
- package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +39 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md → builder/30-schema-fields.md} +52 -10
- package/skills/qingflow-cli/reference/builder/40-layout.md +52 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_VIEWS_WORKFLOW.md → builder/50-views.md} +39 -15
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_CHARTS_WORKFLOW.md → builder/60-charts.md} +36 -13
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_PORTAL_WORKFLOW.md → builder/70-portal.md} +36 -13
- package/skills/qingflow-cli/reference/builder/80-buttons-associated-resources.md +41 -0
- package/skills/qingflow-cli/reference/builder/90-workflow.md +34 -0
- package/skills/qingflow-cli/reference/builder/99-publish-verify.md +46 -0
- package/skills/qingflow-cli/reference/builder/README.md +41 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/README.md +130 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/code-block.md +66 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/q-linker.md +77 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_APP_DELIVERY_WORKFLOW.md → builder/reference/app-delivery-sop.md} +26 -16
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/README.md +293 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/build-complete-system.md +809 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/build-single-app.md +830 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/complete-system-development-guide.md +123 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/create-app.md +182 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/environments.md +63 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/flow-actors-and-permissions.md +142 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/gotchas.md +108 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/match-rules.md +114 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/public-surface-sync.md +75 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/single-app-development-guide.md +58 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/solution-playbooks.md +52 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/tool-selection.md +107 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-flow.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-layout.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-schema.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-views.md +7 -0
- package/skills/qingflow-cli/reference/builder/workflow/01-overview.md +45 -0
- package/skills/qingflow-cli/reference/builder/workflow/02-update-mode.md +53 -0
- package/skills/qingflow-cli/reference/builder/workflow/03-flow-patterns.md +57 -0
- package/skills/qingflow-cli/reference/builder/workflow/04-stage1-business-modeling.md +131 -0
- package/skills/qingflow-cli/reference/builder/workflow/05-stage2-members-roles.md +29 -0
- package/skills/qingflow-cli/reference/builder/workflow/06-stage3-build-spec.md +165 -0
- package/skills/qingflow-cli/reference/builder/workflow/07-stage4-validate-spec.md +33 -0
- package/skills/qingflow-cli/reference/builder/workflow/08-stage5-apply-verify.md +51 -0
- package/skills/qingflow-cli/reference/builder/workflow/09-stage6-summary.md +88 -0
- package/skills/qingflow-cli/reference/builder/workflow/10-node-config-reference.md +93 -0
- package/skills/qingflow-cli/reference/builder/workflow/11-troubleshooting.md +15 -0
- package/skills/qingflow-cli/reference/builder/workflow/README.md +88 -0
- package/skills/qingflow-cli/reference/builder/workflow/workflow-schema.json +1754 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_ADMIN_CHEATSHEET.md → core/QINGFLOW_CLI_ADMIN_CHEATSHEET.md} +3 -3
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md → core/QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md} +6 -6
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_EXPLORATION_REPORT.md → core/QINGFLOW_CLI_EXPLORATION_REPORT.md} +2 -2
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_FIELD_DATA_TYPES.md → core/QINGFLOW_CLI_FIELD_DATA_TYPES.md} +11 -11
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_MEMBER_CHEATSHEET.md → core/QINGFLOW_CLI_MEMBER_CHEATSHEET.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md → core/QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md} +3 -3
- package/skills/qingflow-cli/reference/record/QINGFLOW_CLI_RECORD_DELETE_WORKFLOW.md +31 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_IMPORT_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_IMPORT_WORKFLOW.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md} +7 -7
- package/skills/qingflow-cli/reference/record/analysis/README.md +130 -0
- package/skills/qingflow-cli/reference/record/analysis/analysis-gotchas.md +91 -0
- package/skills/qingflow-cli/reference/record/analysis/analysis-patterns.md +112 -0
- package/skills/qingflow-cli/reference/record/analysis/business-context.md +74 -0
- package/skills/qingflow-cli/reference/record/analysis/confidence-reporting.md +69 -0
- package/skills/qingflow-cli/reference/record/analysis/data-access-playbook.md +106 -0
- package/skills/qingflow-cli/reference/record/analysis/pandas-recipes.md +172 -0
- package/skills/qingflow-cli/reference/record/analysis/report-format.md +76 -0
- package/skills/qingflow-cli/reference/record/insert/README.md +75 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_TASK_CONTEXT_WORKFLOW.md → task/QINGFLOW_CLI_TASK_CONTEXT_WORKFLOW.md} +5 -5
- package/skills/qingflow-cli/reference/task/ops/README.md +131 -0
- package/skills/qingflow-cli/reference/task/ops/environments.md +43 -0
- package/skills/qingflow-cli/reference/task/ops/workflow-usage.md +26 -0
- package/skills/qingflow-cli/scripts/validate_system_build_summary.py +124 -0
- package/skills/qingflow-cli/scripts/workflow/diff_flow_spec.py +275 -0
- package/skills/qingflow-cli/scripts/workflow/validate_flow_spec.py +605 -0
- package/skills/qingflow-mcp-setup/SKILL.md +115 -0
- package/skills/qingflow-mcp-setup/agents/openai.yaml +4 -0
- package/skills/qingflow-mcp-setup/references/claude-desktop.md +34 -0
- package/skills/qingflow-mcp-setup/references/environments.md +62 -0
- package/skills/qingflow-mcp-setup/references/generic-stdio.md +32 -0
- package/skills/qingflow-mcp-setup/scripts/check_local_server.sh +38 -0
- package/src/qingflow_mcp/__init__.py +1 -1
- package/src/qingflow_mcp/__main__.py +6 -2
- package/src/qingflow_mcp/builder_facade/models.py +287 -25
- package/src/qingflow_mcp/builder_facade/service.py +4195 -856
- package/src/qingflow_mcp/cli/commands/builder.py +316 -247
- package/src/qingflow_mcp/cli/commands/chart.py +1 -1
- package/src/qingflow_mcp/cli/commands/common.py +12 -3
- package/src/qingflow_mcp/cli/commands/exports.py +2 -2
- package/src/qingflow_mcp/cli/commands/imports.py +3 -3
- package/src/qingflow_mcp/cli/commands/portal.py +2 -2
- package/src/qingflow_mcp/cli/commands/record.py +101 -27
- package/src/qingflow_mcp/cli/commands/task.py +28 -47
- package/src/qingflow_mcp/cli/commands/view.py +1 -1
- package/src/qingflow_mcp/cli/context.py +0 -3
- package/src/qingflow_mcp/cli/formatters.py +784 -16
- package/src/qingflow_mcp/cli/main.py +117 -33
- package/src/qingflow_mcp/errors.py +43 -2
- package/src/qingflow_mcp/public_surface.py +26 -17
- package/src/qingflow_mcp/response_trim.py +81 -17
- package/src/qingflow_mcp/server.py +14 -12
- package/src/qingflow_mcp/server_app_builder.py +65 -21
- package/src/qingflow_mcp/server_app_user.py +22 -16
- package/src/qingflow_mcp/session_store.py +11 -7
- package/src/qingflow_mcp/solution/compiler/__init__.py +3 -1
- package/src/qingflow_mcp/solution/compiler/workflow_compiler.py +173 -0
- package/src/qingflow_mcp/solution/executor.py +245 -18
- package/src/qingflow_mcp/tools/ai_builder_tools.py +1782 -399
- package/src/qingflow_mcp/tools/app_tools.py +184 -43
- package/src/qingflow_mcp/tools/approval_tools.py +197 -35
- package/src/qingflow_mcp/tools/auth_tools.py +92 -16
- package/src/qingflow_mcp/tools/code_block_tools.py +298 -40
- package/src/qingflow_mcp/tools/custom_button_tools.py +64 -10
- package/src/qingflow_mcp/tools/directory_tools.py +236 -72
- package/src/qingflow_mcp/tools/export_tools.py +244 -34
- package/src/qingflow_mcp/tools/feedback_tools.py +9 -0
- package/src/qingflow_mcp/tools/file_tools.py +9 -3
- package/src/qingflow_mcp/tools/import_tools.py +336 -49
- package/src/qingflow_mcp/tools/navigation_tools.py +91 -12
- package/src/qingflow_mcp/tools/package_tools.py +118 -6
- package/src/qingflow_mcp/tools/portal_tools.py +39 -3
- package/src/qingflow_mcp/tools/qingbi_report_tools.py +116 -7
- package/src/qingflow_mcp/tools/record_tools.py +1141 -356
- package/src/qingflow_mcp/tools/resource_read_tools.py +188 -39
- package/src/qingflow_mcp/tools/role_tools.py +80 -9
- package/src/qingflow_mcp/tools/solution_tools.py +59 -45
- package/src/qingflow_mcp/tools/task_context_tools.py +662 -158
- package/src/qingflow_mcp/tools/task_tools.py +113 -29
- package/src/qingflow_mcp/tools/view_tools.py +106 -3
- package/src/qingflow_mcp/tools/workflow_tools.py +48 -4
- package/src/qingflow_mcp/tools/workspace_tools.py +71 -3
- /package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_MATCH_RULES.md → builder/reference/match-rules.md} +0 -0
- /package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_WORKSPACE_ICONS.md → builder/reference/workspace-icons.md} +0 -0
- /package/skills/qingflow-cli/reference/{charts_remove.example.json → examples/charts/charts_remove.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_reorder.example.json → examples/charts/charts_reorder.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_bar.example.json → examples/charts/charts_upsert_bar.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_dashboard_starter.example.json → examples/charts/charts_upsert_dashboard_starter.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_minimal.example.json → examples/charts/charts_upsert_minimal.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_all_types.example.json → examples/portal/portal_sections_all_types.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_five_types.example.json → examples/portal/portal_sections_five_types.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_standard_workbench.example.json → examples/portal/portal_sections_standard_workbench.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{_batch_schema_complex.json → examples/schema/_batch_schema_complex.json} +0 -0
- /package/skills/qingflow-cli/reference/{_batch_schema_scalar.json → examples/schema/_batch_schema_scalar.json} +0 -0
- /package/skills/qingflow-cli/reference/{schema_add_fields_minimal.example.json → examples/schema/schema_add_fields_minimal.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{schema_apply_add_fields_all_types.json → examples/schema/schema_apply_add_fields_all_types.json} +0 -0
- /package/skills/qingflow-cli/reference/{views_upsert_table_minimal.example.json → examples/views/views_upsert_table_minimal.example.json} +0 -0
|
@@ -0,0 +1,830 @@
|
|
|
1
|
+
# Build Single App(单应用完整搭建)
|
|
2
|
+
|
|
3
|
+
Use this when the user wants to set up one Qingflow app end-to-end: a rich field schema, grouped layout, approval flow, multiple view types, custom action buttons, in-app charts, associated reports on views, and sample data.
|
|
4
|
+
|
|
5
|
+
**Signal phrases**: "创建一个应用"、"帮我搭一个XX管理"、"从零开始建一个XX表单"、"我需要一个管理XX的应用"
|
|
6
|
+
|
|
7
|
+
For a multi-app system with cross-app relations and a portal dashboard, use [20-build-complete-system.md](../../20-build-complete-system.md) instead.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Execution order (never reorder)
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 → Phase 5 → Phase 6 → Phase 7 → Phase 8 → Phase 9
|
|
15
|
+
Package Schema Layout Flow Views Buttons Charts Assoc. Data Verify
|
|
16
|
+
Res.
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- Phase 4 (views) must complete before Phase 7 (associated resources) — `view_key` values must be known first
|
|
20
|
+
- Phase 6 (charts) must complete before Phase 7 (associated resources) — `chart_id`/`chart_key` values must be known first
|
|
21
|
+
- Phase 8 (data) runs after all config phases — fields, flow, and views must be live
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Phase 0 — Scan workspace packages
|
|
26
|
+
|
|
27
|
+
> CLI-only note: this is the payload from former internal surface `package_list`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
28
|
+
|
|
29
|
+
- **Package name exists in workspace** → tell the user, wait for explicit confirmation before adding the app into it
|
|
30
|
+
- **Package name not in workspace** → create immediately, no confirmation needed:
|
|
31
|
+
|
|
32
|
+
> CLI-only note: this is the payload from former internal surface `package_apply`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"package_name": "合同管理",
|
|
37
|
+
"create_if_missing": true
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Record the returned `package_id`. All subsequent phases use it.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Phase 1 — Schema (15–20 fields)
|
|
46
|
+
|
|
47
|
+
> **Read first**: [30-schema-fields.md](../../30-schema-fields.md)
|
|
48
|
+
|
|
49
|
+
### Field type distribution
|
|
50
|
+
|
|
51
|
+
| Type | Count | Examples |
|
|
52
|
+
|------|-------|---------|
|
|
53
|
+
| `text` | 2–3 | 名称、编号、联系人 |
|
|
54
|
+
| `long_text` | 1–2 | 描述、摘要、备注 |
|
|
55
|
+
| `single_select` | 2–3 | 状态、类型、优先级 |
|
|
56
|
+
| `multi_select` | 1–2 | 标签、关联业务线 |
|
|
57
|
+
| `date` / `datetime` | 2–3 | 签署日期、生效日期、到期日期 |
|
|
58
|
+
| `amount` | 1–2 | 合同金额、已付金额 |
|
|
59
|
+
| `number` | 1–2 | 期限(月)、完成率(%) |
|
|
60
|
+
| `member` | 2 | 负责人、审核人 |
|
|
61
|
+
| `department` | 0–1 | 所属部门 |
|
|
62
|
+
| `phone` | 0–1 | 联系电话 |
|
|
63
|
+
| `attachment` | 1 | 附件(`as_data_cover: true` for cover display) |
|
|
64
|
+
|
|
65
|
+
### Hard rules
|
|
66
|
+
|
|
67
|
+
- Exactly one field must have `as_data_title: true`
|
|
68
|
+
- `as_data_cover: true` requires `type: attachment`
|
|
69
|
+
- No `relation` fields in a single-app build — use [20-build-complete-system.md](../../20-build-complete-system.md) if cross-app links are needed
|
|
70
|
+
- `single_select`/`multi_select` fields must include an `options` array
|
|
71
|
+
|
|
72
|
+
### Example — 合同管理
|
|
73
|
+
|
|
74
|
+
> CLI-only note: this is the payload from former internal surface `app_schema_apply`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"package_id": 1218950,
|
|
79
|
+
"create_if_missing": true,
|
|
80
|
+
"publish": true,
|
|
81
|
+
"apps": [
|
|
82
|
+
{
|
|
83
|
+
"client_key": "contract",
|
|
84
|
+
"app_name": "合同",
|
|
85
|
+
"add_fields": [
|
|
86
|
+
{
|
|
87
|
+
"name": "合同名称",
|
|
88
|
+
"type": "text",
|
|
89
|
+
"required": true,
|
|
90
|
+
"as_data_title": true
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "合同编号",
|
|
94
|
+
"type": "text"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "合同类型",
|
|
98
|
+
"type": "single_select",
|
|
99
|
+
"options": [
|
|
100
|
+
"服务合同",
|
|
101
|
+
"采购合同",
|
|
102
|
+
"劳务合同",
|
|
103
|
+
"保密协议",
|
|
104
|
+
"其他"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "合同状态",
|
|
109
|
+
"type": "single_select",
|
|
110
|
+
"options": [
|
|
111
|
+
"草稿",
|
|
112
|
+
"审批中",
|
|
113
|
+
"已生效",
|
|
114
|
+
"已到期",
|
|
115
|
+
"已终止"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "优先级",
|
|
120
|
+
"type": "single_select",
|
|
121
|
+
"options": [
|
|
122
|
+
"高",
|
|
123
|
+
"中",
|
|
124
|
+
"低"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "合同标签",
|
|
129
|
+
"type": "multi_select",
|
|
130
|
+
"options": [
|
|
131
|
+
"重点客户",
|
|
132
|
+
"续签",
|
|
133
|
+
"新签",
|
|
134
|
+
"框架协议"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "签署日期",
|
|
139
|
+
"type": "date"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "生效日期",
|
|
143
|
+
"type": "date"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "到期日期",
|
|
147
|
+
"type": "date"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "合同金额",
|
|
151
|
+
"type": "amount"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "已付金额",
|
|
155
|
+
"type": "amount"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "付款比例",
|
|
159
|
+
"type": "number"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "合同期限(月)",
|
|
163
|
+
"type": "number"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "负责人",
|
|
167
|
+
"type": "member"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "法务审核人",
|
|
171
|
+
"type": "member"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "所属部门",
|
|
175
|
+
"type": "department"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "甲方联系人",
|
|
179
|
+
"type": "text"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "甲方联系电话",
|
|
183
|
+
"type": "phone"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "合同内容摘要",
|
|
187
|
+
"type": "long_text"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "合同附件",
|
|
191
|
+
"type": "attachment",
|
|
192
|
+
"as_data_cover": true
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Record the returned `app_key`. All subsequent phases use it.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Phase 2 — Layout
|
|
205
|
+
|
|
206
|
+
> **Read first**: [40-layout.md](../../40-layout.md)
|
|
207
|
+
|
|
208
|
+
Group fields into 3–4 logical sections with 2–3 fields per row.
|
|
209
|
+
|
|
210
|
+
> CLI-only note: this is the payload from former internal surface `app_layout_apply`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"app_key": "APP_KEY",
|
|
215
|
+
"mode": "merge",
|
|
216
|
+
"publish": true,
|
|
217
|
+
"sections": [
|
|
218
|
+
{
|
|
219
|
+
"title": "基础信息",
|
|
220
|
+
"rows": [
|
|
221
|
+
[
|
|
222
|
+
"合同名称",
|
|
223
|
+
"合同编号"
|
|
224
|
+
],
|
|
225
|
+
[
|
|
226
|
+
"合同类型",
|
|
227
|
+
"合同状态"
|
|
228
|
+
],
|
|
229
|
+
[
|
|
230
|
+
"优先级",
|
|
231
|
+
"合同标签"
|
|
232
|
+
]
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"title": "时间与金额",
|
|
237
|
+
"rows": [
|
|
238
|
+
[
|
|
239
|
+
"签署日期",
|
|
240
|
+
"生效日期",
|
|
241
|
+
"到期日期"
|
|
242
|
+
],
|
|
243
|
+
[
|
|
244
|
+
"合同金额",
|
|
245
|
+
"已付金额"
|
|
246
|
+
],
|
|
247
|
+
[
|
|
248
|
+
"付款比例",
|
|
249
|
+
"合同期限(月)"
|
|
250
|
+
]
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"title": "责任人",
|
|
255
|
+
"rows": [
|
|
256
|
+
[
|
|
257
|
+
"负责人",
|
|
258
|
+
"法务审核人"
|
|
259
|
+
],
|
|
260
|
+
[
|
|
261
|
+
"所属部门"
|
|
262
|
+
]
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"title": "对方信息与附件",
|
|
267
|
+
"rows": [
|
|
268
|
+
[
|
|
269
|
+
"甲方联系人",
|
|
270
|
+
"甲方联系电话"
|
|
271
|
+
],
|
|
272
|
+
[
|
|
273
|
+
"合同内容摘要"
|
|
274
|
+
],
|
|
275
|
+
[
|
|
276
|
+
"合同附件"
|
|
277
|
+
]
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Phase 3 — Flow
|
|
287
|
+
|
|
288
|
+
> **Read first**: [90-workflow.md](../../90-workflow.md) and [flow-actors-and-permissions.md](./flow-actors-and-permissions.md)
|
|
289
|
+
|
|
290
|
+
Search for roles first; create only if none fits:
|
|
291
|
+
|
|
292
|
+
> CLI-only note: this is the payload from former internal surface `role_search`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
293
|
+
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"query": "法务"
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
> CLI-only note: this is the payload from former internal surface `app_flow_apply`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
301
|
+
|
|
302
|
+
```json
|
|
303
|
+
{
|
|
304
|
+
"app_key": "APP_KEY",
|
|
305
|
+
"preset": "basic_approval",
|
|
306
|
+
"publish": true,
|
|
307
|
+
"nodes": [
|
|
308
|
+
{
|
|
309
|
+
"id": "approve_1",
|
|
310
|
+
"type": "approve",
|
|
311
|
+
"name": "法务审核",
|
|
312
|
+
"assignees": {
|
|
313
|
+
"role_names": [
|
|
314
|
+
"法务"
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
"permissions": {
|
|
318
|
+
"editable_fields": [
|
|
319
|
+
"合同状态",
|
|
320
|
+
"合同内容摘要"
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"id": "approve_2",
|
|
326
|
+
"type": "approve",
|
|
327
|
+
"name": "负责人确认",
|
|
328
|
+
"assignees": {
|
|
329
|
+
"role_names": [
|
|
330
|
+
"部门主管"
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"permissions": {
|
|
334
|
+
"editable_fields": [
|
|
335
|
+
"合同状态"
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## Phase 4 — Views (multiple types)
|
|
346
|
+
|
|
347
|
+
> **Read first**: [50-views.md](../../50-views.md)
|
|
348
|
+
|
|
349
|
+
Build all applicable view types in one call. All views require `query_conditions` with `enabled: true`.
|
|
350
|
+
|
|
351
|
+
| Type | Build condition | Key config |
|
|
352
|
+
|------|----------------|------------|
|
|
353
|
+
| **table** | Always — build first | `columns` covering title/status/date/amount/member |
|
|
354
|
+
| **board** | App has a `single_select` status or stage field | `group_by` = that field name |
|
|
355
|
+
| **gantt** | App has 2+ date fields | `start_field` + `end_field` |
|
|
356
|
+
| **card** | App has `attachment` with `as_data_cover: true` | Visual browsing |
|
|
357
|
+
| **calendar** | App has a key due/expiry date field | `date_field` = that field name |
|
|
358
|
+
|
|
359
|
+
> CLI-only note: this is the payload from former internal surface `app_views_apply`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
360
|
+
|
|
361
|
+
```json
|
|
362
|
+
{
|
|
363
|
+
"app_key": "APP_KEY",
|
|
364
|
+
"publish": true,
|
|
365
|
+
"upsert_views": [
|
|
366
|
+
{
|
|
367
|
+
"name": "全部合同",
|
|
368
|
+
"type": "table",
|
|
369
|
+
"columns": [
|
|
370
|
+
"合同名称",
|
|
371
|
+
"合同编号",
|
|
372
|
+
"合同类型",
|
|
373
|
+
"合同状态",
|
|
374
|
+
"合同金额",
|
|
375
|
+
"负责人",
|
|
376
|
+
"签署日期",
|
|
377
|
+
"到期日期"
|
|
378
|
+
],
|
|
379
|
+
"query_conditions": {
|
|
380
|
+
"enabled": true,
|
|
381
|
+
"exact": false,
|
|
382
|
+
"hide_before_query": false,
|
|
383
|
+
"rows": [
|
|
384
|
+
[
|
|
385
|
+
"合同名称",
|
|
386
|
+
"合同类型"
|
|
387
|
+
],
|
|
388
|
+
[
|
|
389
|
+
"合同状态",
|
|
390
|
+
"负责人"
|
|
391
|
+
],
|
|
392
|
+
[
|
|
393
|
+
"签署日期",
|
|
394
|
+
"到期日期"
|
|
395
|
+
]
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"name": "合同看板",
|
|
401
|
+
"type": "board",
|
|
402
|
+
"columns": [
|
|
403
|
+
"合同名称",
|
|
404
|
+
"合同类型",
|
|
405
|
+
"合同金额",
|
|
406
|
+
"负责人",
|
|
407
|
+
"到期日期"
|
|
408
|
+
],
|
|
409
|
+
"group_by": "合同状态",
|
|
410
|
+
"query_conditions": {
|
|
411
|
+
"enabled": true,
|
|
412
|
+
"exact": false,
|
|
413
|
+
"hide_before_query": false,
|
|
414
|
+
"rows": [
|
|
415
|
+
[
|
|
416
|
+
"合同名称",
|
|
417
|
+
"负责人"
|
|
418
|
+
]
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "合同甘特图",
|
|
424
|
+
"type": "gantt",
|
|
425
|
+
"columns": [
|
|
426
|
+
"合同名称",
|
|
427
|
+
"合同状态",
|
|
428
|
+
"负责人",
|
|
429
|
+
"合同金额"
|
|
430
|
+
],
|
|
431
|
+
"start_field": "生效日期",
|
|
432
|
+
"end_field": "到期日期",
|
|
433
|
+
"query_conditions": {
|
|
434
|
+
"enabled": true,
|
|
435
|
+
"exact": false,
|
|
436
|
+
"hide_before_query": false,
|
|
437
|
+
"rows": [
|
|
438
|
+
[
|
|
439
|
+
"合同名称",
|
|
440
|
+
"合同状态"
|
|
441
|
+
]
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "合同卡片",
|
|
447
|
+
"type": "card",
|
|
448
|
+
"columns": [
|
|
449
|
+
"合同名称",
|
|
450
|
+
"合同类型",
|
|
451
|
+
"合同状态",
|
|
452
|
+
"合同金额",
|
|
453
|
+
"到期日期"
|
|
454
|
+
],
|
|
455
|
+
"query_conditions": {
|
|
456
|
+
"enabled": true,
|
|
457
|
+
"exact": false,
|
|
458
|
+
"hide_before_query": false,
|
|
459
|
+
"rows": [
|
|
460
|
+
[
|
|
461
|
+
"合同名称",
|
|
462
|
+
"合同状态"
|
|
463
|
+
]
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "到期日历",
|
|
469
|
+
"type": "calendar",
|
|
470
|
+
"columns": [
|
|
471
|
+
"合同名称",
|
|
472
|
+
"合同类型",
|
|
473
|
+
"合同金额",
|
|
474
|
+
"负责人"
|
|
475
|
+
],
|
|
476
|
+
"date_field": "到期日期",
|
|
477
|
+
"query_conditions": {
|
|
478
|
+
"enabled": true,
|
|
479
|
+
"exact": false,
|
|
480
|
+
"hide_before_query": false,
|
|
481
|
+
"rows": [
|
|
482
|
+
[
|
|
483
|
+
"合同名称",
|
|
484
|
+
"合同状态"
|
|
485
|
+
]
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Record all `view_key` values before Phase 7.
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
## Phase 5 — Custom Buttons
|
|
498
|
+
|
|
499
|
+
> Call `qingflow --json builder contract --tool-name app_custom_buttons_apply` if the exact button schema is unclear.
|
|
500
|
+
> `app_custom_buttons_apply` publishes automatically — do **not** pass `publish`.
|
|
501
|
+
|
|
502
|
+
Build 2–3 buttons. Common patterns for a single app:
|
|
503
|
+
|
|
504
|
+
| Button | Trigger type | Placement | When to use |
|
|
505
|
+
|--------|-------------|-----------|-------------|
|
|
506
|
+
| 快捷创建子记录 | `add_data` | header, detail | When a related app exists in the same package |
|
|
507
|
+
| 外部跳转 | `link` | header, list | Always applicable — jump to external URL or doc |
|
|
508
|
+
| 列表行操作 | `add_data` / `link` | list | Row-level quick action in table view |
|
|
509
|
+
|
|
510
|
+
**Example — link button (always applicable) + add-data button (requires a related app):**
|
|
511
|
+
|
|
512
|
+
> CLI-only note: this is the payload from former internal surface `app_custom_buttons_apply`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
513
|
+
|
|
514
|
+
```json
|
|
515
|
+
{
|
|
516
|
+
"app_key": "APP_KEY",
|
|
517
|
+
"upsert_buttons": [
|
|
518
|
+
{
|
|
519
|
+
"name": "查看合同模板",
|
|
520
|
+
"trigger_type": "link",
|
|
521
|
+
"style": "default",
|
|
522
|
+
"placements": [
|
|
523
|
+
"header",
|
|
524
|
+
"detail"
|
|
525
|
+
],
|
|
526
|
+
"trigger_link_config": {
|
|
527
|
+
"url": "https://your-template-url"
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"name": "发起变更申请",
|
|
532
|
+
"trigger_type": "add_data",
|
|
533
|
+
"style": "primary",
|
|
534
|
+
"placements": [
|
|
535
|
+
"header",
|
|
536
|
+
"detail",
|
|
537
|
+
"list"
|
|
538
|
+
],
|
|
539
|
+
"trigger_add_data_config": {
|
|
540
|
+
"target_app_key": "CHANGE_REQUEST_APP_KEY",
|
|
541
|
+
"field_mappings": [
|
|
542
|
+
{
|
|
543
|
+
"source_field": "数据ID",
|
|
544
|
+
"target_field": "关联合同"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"source_field": "合同名称",
|
|
548
|
+
"target_field": "合同标题"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"source_field": "负责人",
|
|
552
|
+
"target_field": "申请人"
|
|
553
|
+
}
|
|
554
|
+
]
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
],
|
|
558
|
+
"view_configs": [
|
|
559
|
+
{
|
|
560
|
+
"view_key": "TABLE_VIEW_KEY",
|
|
561
|
+
"mode": "merge",
|
|
562
|
+
"buttons": [
|
|
563
|
+
"发起变更申请",
|
|
564
|
+
"查看合同模板"
|
|
565
|
+
]
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
**Notes:**
|
|
572
|
+
- `placements: ["list"]` maps to the backend row-level `INSIDE` position
|
|
573
|
+
- `view_configs[].buttons` is required in merge mode — do not send a view config with only `view_key`
|
|
574
|
+
- `source_field: "数据ID"` passes the current record's ID to the target relation field
|
|
575
|
+
- If this app has no related app, skip the add-data button and use the link button only
|
|
576
|
+
- Use raw `view_key` from `app_get.views[].view_key`; do not prefix with `custom:`
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
## Phase 6 — Charts
|
|
581
|
+
|
|
582
|
+
> `app_charts_apply` is immediate-live — no publish step. Record all returned `chart_id`/`chart_key` values before Phase 7.
|
|
583
|
+
|
|
584
|
+
Build 2–4 charts: 2 indicator cards + 1 distribution chart + 1 trend chart.
|
|
585
|
+
|
|
586
|
+
> CLI-only note: this is the payload from former internal surface `app_charts_apply`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
587
|
+
|
|
588
|
+
```json
|
|
589
|
+
{
|
|
590
|
+
"app_key": "APP_KEY",
|
|
591
|
+
"upsert_charts": [
|
|
592
|
+
{
|
|
593
|
+
"name": "合同总金额",
|
|
594
|
+
"chart_type": "target",
|
|
595
|
+
"config": {
|
|
596
|
+
"measure_field": "合同金额",
|
|
597
|
+
"aggregate": "SUM"
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "有效合同数",
|
|
602
|
+
"chart_type": "target",
|
|
603
|
+
"config": {
|
|
604
|
+
"filter": {
|
|
605
|
+
"合同状态": [
|
|
606
|
+
"已生效"
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
"aggregate": "COUNT"
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"name": "合同状态分布",
|
|
614
|
+
"chart_type": "columnar",
|
|
615
|
+
"config": {
|
|
616
|
+
"dimension_field": "合同状态",
|
|
617
|
+
"measure_field": "合同金额",
|
|
618
|
+
"aggregate": "SUM"
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "月度签约趋势",
|
|
623
|
+
"chart_type": "area",
|
|
624
|
+
"config": {
|
|
625
|
+
"dimension_field": "签署日期",
|
|
626
|
+
"time_granularity": "month",
|
|
627
|
+
"measure_field": "合同金额",
|
|
628
|
+
"aggregate": "SUM"
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
]
|
|
632
|
+
}
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
## Phase 7 — Associated Resources
|
|
638
|
+
|
|
639
|
+
Attach charts to the app's view area so users can see them inline without leaving the app.
|
|
640
|
+
|
|
641
|
+
Before running `upsert_resources`, check existing resources with the dedicated read tool:
|
|
642
|
+
|
|
643
|
+
> CLI-only note: this is the payload from former internal surface `app_get_associated_resources`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
644
|
+
|
|
645
|
+
```json
|
|
646
|
+
{
|
|
647
|
+
"app_key": "APP_KEY"
|
|
648
|
+
}
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
If the result already contains the target chart, use `patch_resources` with its `associated_item_id` instead of re-upserting.
|
|
652
|
+
|
|
653
|
+
> CLI-only note: this is the payload from former internal surface `app_associated_resources_apply`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
654
|
+
|
|
655
|
+
```json
|
|
656
|
+
{
|
|
657
|
+
"app_key": "APP_KEY",
|
|
658
|
+
"upsert_resources": [
|
|
659
|
+
{
|
|
660
|
+
"client_key": "res_status_chart",
|
|
661
|
+
"resource_type": "chart",
|
|
662
|
+
"chart_key": "CHART_KEY_FOR_STATUS_DISTRIBUTION",
|
|
663
|
+
"display_name": "合同状态分布"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"client_key": "res_trend_chart",
|
|
667
|
+
"resource_type": "chart",
|
|
668
|
+
"chart_key": "CHART_KEY_FOR_TREND",
|
|
669
|
+
"display_name": "月度签约趋势"
|
|
670
|
+
}
|
|
671
|
+
],
|
|
672
|
+
"view_configs": [
|
|
673
|
+
{
|
|
674
|
+
"view_key": "TABLE_VIEW_KEY",
|
|
675
|
+
"associated_item_refs": [
|
|
676
|
+
"res_status_chart",
|
|
677
|
+
"res_trend_chart"
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
]
|
|
681
|
+
}
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
**Notes:**
|
|
685
|
+
- `app_associated_resources_apply` publishes automatically — do **not** pass `publish`
|
|
686
|
+
- `client_key` is a same-call alias only; repeated `upsert_resources` without `associated_item_id` creates duplicates
|
|
687
|
+
- On subsequent edits, use `patch_resources` with `associated_item_id` instead
|
|
688
|
+
|
|
689
|
+
---
|
|
690
|
+
|
|
691
|
+
## Phase 8 — Sample Data
|
|
692
|
+
|
|
693
|
+
> **Use CLI record insert rules**: read [record/insert](../../../record/insert/README.md) before inserting sample data.
|
|
694
|
+
|
|
695
|
+
Insert **5–8 records** covering all status values and realistic amounts. Call `qingflow record schema insert` first.
|
|
696
|
+
|
|
697
|
+
> CLI-only note: this is the payload from former internal surface `qingflow record schema insert`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
698
|
+
|
|
699
|
+
```json
|
|
700
|
+
{
|
|
701
|
+
"app_key": "APP_KEY"
|
|
702
|
+
}
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
> CLI-only note: this is the payload from former internal surface `record_insert`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
706
|
+
|
|
707
|
+
```json
|
|
708
|
+
{
|
|
709
|
+
"app_key": "APP_KEY",
|
|
710
|
+
"items": [
|
|
711
|
+
{
|
|
712
|
+
"合同名称": "上海科技服务协议",
|
|
713
|
+
"合同编号": "HT-2024-001",
|
|
714
|
+
"合同类型": "服务合同",
|
|
715
|
+
"合同状态": "已生效",
|
|
716
|
+
"合同金额": 580000,
|
|
717
|
+
"已付金额": 290000,
|
|
718
|
+
"负责人": "张三",
|
|
719
|
+
"签署日期": "2024-01-15",
|
|
720
|
+
"生效日期": "2024-02-01",
|
|
721
|
+
"到期日期": "2025-01-31",
|
|
722
|
+
"优先级": "高",
|
|
723
|
+
"合同期限(月)": 12
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"合同名称": "北京采购框架合同",
|
|
727
|
+
"合同编号": "HT-2024-002",
|
|
728
|
+
"合同类型": "采购合同",
|
|
729
|
+
"合同状态": "审批中",
|
|
730
|
+
"合同金额": 1200000,
|
|
731
|
+
"已付金额": 0,
|
|
732
|
+
"负责人": "李四",
|
|
733
|
+
"签署日期": "2024-03-10",
|
|
734
|
+
"生效日期": "2024-04-01",
|
|
735
|
+
"到期日期": "2025-03-31",
|
|
736
|
+
"优先级": "高",
|
|
737
|
+
"合同期限(月)": 12
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"合同名称": "广州运维服务合同",
|
|
741
|
+
"合同编号": "HT-2024-003",
|
|
742
|
+
"合同类型": "服务合同",
|
|
743
|
+
"合同状态": "已生效",
|
|
744
|
+
"合同金额": 240000,
|
|
745
|
+
"已付金额": 120000,
|
|
746
|
+
"负责人": "王五",
|
|
747
|
+
"签署日期": "2024-02-20",
|
|
748
|
+
"生效日期": "2024-03-01",
|
|
749
|
+
"到期日期": "2024-12-31",
|
|
750
|
+
"优先级": "中",
|
|
751
|
+
"合同期限(月)": 10
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"合同名称": "深圳保密协议",
|
|
755
|
+
"合同编号": "HT-2024-004",
|
|
756
|
+
"合同类型": "保密协议",
|
|
757
|
+
"合同状态": "已生效",
|
|
758
|
+
"合同金额": 0,
|
|
759
|
+
"已付金额": 0,
|
|
760
|
+
"负责人": "张三",
|
|
761
|
+
"签署日期": "2024-04-05",
|
|
762
|
+
"生效日期": "2024-04-05",
|
|
763
|
+
"到期日期": "2027-04-04",
|
|
764
|
+
"优先级": "中",
|
|
765
|
+
"合同期限(月)": 36
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"合同名称": "杭州合作开发合同",
|
|
769
|
+
"合同编号": "HT-2024-005",
|
|
770
|
+
"合同类型": "服务合同",
|
|
771
|
+
"合同状态": "草稿",
|
|
772
|
+
"合同金额": 850000,
|
|
773
|
+
"已付金额": 0,
|
|
774
|
+
"负责人": "李四",
|
|
775
|
+
"签署日期": "2024-05-01",
|
|
776
|
+
"生效日期": "2024-06-01",
|
|
777
|
+
"到期日期": "2025-05-31",
|
|
778
|
+
"优先级": "高",
|
|
779
|
+
"合同期限(月)": 12
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"合同名称": "成都劳务外包合同",
|
|
783
|
+
"合同编号": "HT-2023-006",
|
|
784
|
+
"合同类型": "劳务合同",
|
|
785
|
+
"合同状态": "已到期",
|
|
786
|
+
"合同金额": 360000,
|
|
787
|
+
"已付金额": 360000,
|
|
788
|
+
"负责人": "王五",
|
|
789
|
+
"签署日期": "2023-01-01",
|
|
790
|
+
"生效日期": "2023-01-01",
|
|
791
|
+
"到期日期": "2023-12-31",
|
|
792
|
+
"优先级": "低",
|
|
793
|
+
"合同期限(月)": 12
|
|
794
|
+
}
|
|
795
|
+
]
|
|
796
|
+
}
|
|
797
|
+
```
|
|
798
|
+
|
|
799
|
+
Member and department fields accept natural language values — do not look up IDs manually.
|
|
800
|
+
|
|
801
|
+
---
|
|
802
|
+
|
|
803
|
+
## Phase 9 — Publish Verify
|
|
804
|
+
|
|
805
|
+
> CLI-only note: this is the payload from former internal surface `app_publish_verify`. Execute it through the matching `qingflow` CLI command and `--*-file` flags from SKILL.md / builder reference; do not call internal tool JSON.
|
|
806
|
+
|
|
807
|
+
```json
|
|
808
|
+
{
|
|
809
|
+
"app_key": "APP_KEY"
|
|
810
|
+
}
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
Confirm `publish_status` is live and `unplaced_fields` is empty. If `unplaced_fields` is non-empty, run `app_layout_apply` to place them before reporting completion.
|
|
814
|
+
|
|
815
|
+
---
|
|
816
|
+
|
|
817
|
+
## Common failures
|
|
818
|
+
|
|
819
|
+
| Error | Phase | Fix |
|
|
820
|
+
|-------|-------|-----|
|
|
821
|
+
| `VALIDATION_ERROR` on select field | 1 | `single_select`/`multi_select` must include `options` array |
|
|
822
|
+
| `UNKNOWN_LAYOUT_FIELD` | 2 | Re-read with `app_get_fields`; field name in `rows` must match exactly |
|
|
823
|
+
| `FLOW_ASSIGNEE_REQUIRED` | 3 | Run `role_search` first; every approve/fill node must have at least one assignee |
|
|
824
|
+
| View `partial_success` | 4 | Check `verification.view_query_conditions_verified`; read `views_diff.failed` |
|
|
825
|
+
| `calendar` view rejected | 4 | Build calendar only when a date field exists; verify field type |
|
|
826
|
+
| Button `view_configs` blocked | 5 | `buttons` array is required in merge mode; do not send a view config with only `view_key` |
|
|
827
|
+
| Button add-data fails — no related app | 5 | Skip add-data button; use link button only |
|
|
828
|
+
| Chart config rejected | 6 | Call `qingflow --json builder contract --tool-name app_charts_apply` for exact field/aggregate schema |
|
|
829
|
+
| Associated resource duplicate | 7 | Check `app_get.associated_resources` first; use `patch_resources` with `associated_item_id` if already exists |
|
|
830
|
+
| `unplaced_fields` non-empty on verify | 9 | Run `app_layout_apply` to place the missing fields, then re-verify |
|