@qingflow-tech/qingflow-cli 1.1.61-beta.1 → 1.1.61-beta.2

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.
@@ -0,0 +1,387 @@
1
+ from __future__ import annotations
2
+
3
+ import re
4
+ from typing import Iterable, Mapping
5
+
6
+ from . import __version__
7
+ from .public_surface import PUBLIC_TOOL_BY_KEY
8
+ from .tool_catalog_i18n import DEFAULT_LOCALE, SUPPORTED_LOCALES, TOOL_DISPLAY_TEXT
9
+
10
+
11
+ CATALOG_VERSION = 2
12
+ POLICY_VERSION = 1
13
+ TOOL_ID_PATTERN = re.compile(r"^[a-z][a-z0-9_]*:[a-z][a-z0-9_]*$")
14
+
15
+
16
+ # 基础恢复能力必须逐项登记,禁止按 auth_ / workspace_ 前缀推断。
17
+ EXEMPT_TOOL_IDS = frozenset(
18
+ {
19
+ "user:auth_login",
20
+ "user:auth_use_credential",
21
+ "user:auth_whoami",
22
+ "user:auth_logout",
23
+ "user:get_login_link",
24
+ "user:workspace_list",
25
+ "user:workspace_get",
26
+ "user:workspace_select",
27
+ "builder:auth_use_credential",
28
+ "builder:auth_whoami",
29
+ "builder:auth_logout",
30
+ "builder:get_login_link",
31
+ "builder:workspace_list",
32
+ "builder:workspace_get",
33
+ }
34
+ )
35
+
36
+
37
+ # 历史统一 stdio 独有入口没有 App User/Builder 公共声明,必须逐项冻结;
38
+ # 与 public_surface 声明取并集后才是允许进入目录和闸门绑定的完整登记表。
39
+ LEGACY_STDIO_TOOL_IDS = frozenset(
40
+ {
41
+ "user:navigation_create",
42
+ "user:navigation_delete",
43
+ "user:navigation_get_detail",
44
+ "user:navigation_get_status",
45
+ "user:navigation_list_draft_all",
46
+ "user:navigation_list_draft_page",
47
+ "user:navigation_list_published",
48
+ "user:navigation_publish",
49
+ "user:navigation_reorder",
50
+ "user:navigation_set_visible",
51
+ "user:navigation_update",
52
+ "user:package_create",
53
+ "user:package_delete",
54
+ "user:package_get",
55
+ "user:package_get_base",
56
+ "user:package_list",
57
+ "user:package_update",
58
+ "user:portal_create",
59
+ "user:portal_delete",
60
+ "user:portal_get_base_info",
61
+ "user:portal_publish",
62
+ "user:portal_update",
63
+ "user:portal_update_base_info",
64
+ "user:qingbi_report_delete",
65
+ "user:qingbi_report_get_base",
66
+ "user:qingbi_report_get_config",
67
+ "user:qingbi_report_get_data",
68
+ "user:qingbi_report_list",
69
+ "user:qingbi_report_list_field_options",
70
+ "user:qingbi_report_list_fields",
71
+ "user:qingbi_report_reorder",
72
+ "user:role_create",
73
+ "user:role_delete",
74
+ "user:role_search",
75
+ "user:role_update",
76
+ "user:solution_build_all",
77
+ "user:solution_build_analytics_portal",
78
+ "user:solution_build_app",
79
+ "user:solution_build_app_flow",
80
+ "user:solution_build_app_from_requirements",
81
+ "user:solution_build_flow",
82
+ "user:solution_build_navigation",
83
+ "user:solution_build_status",
84
+ "user:solution_build_views",
85
+ "user:solution_design_session",
86
+ "user:solution_schema_example",
87
+ "user:view_board_get_lane_base_info",
88
+ "user:view_get_base_info",
89
+ "user:view_get_config",
90
+ "user:view_get_future_nodes",
91
+ "user:view_get_workflow_status",
92
+ "user:view_list",
93
+ "user:view_list_associations",
94
+ "user:view_list_flat",
95
+ "user:view_list_questions",
96
+ "user:workflow_get_future_nodes",
97
+ "user:workflow_get_future_nodes_app",
98
+ "user:workspace_set_plugin_status",
99
+ }
100
+ )
101
+ REGISTERED_TOOL_IDS = frozenset(PUBLIC_TOOL_BY_KEY).union(LEGACY_STDIO_TOOL_IDS)
102
+
103
+
104
+ # 能力说明只描述实际工具行为;产品分类和分类映射由 Wingent-X 维护。
105
+ TOOL_DESCRIPTIONS: dict[str, str] = {
106
+ "builder:app_associated_resources_apply": "配置应用关联视图、关联报表及其按视图展示规则。",
107
+ "builder:app_charts_apply": "创建、更新、删除或重排轻流应用数据源的图表与报表配置。",
108
+ "builder:app_custom_buttons_apply": "维护独立按钮定义、样式以及跨视图绑定与排序。",
109
+ "builder:app_delete": "删除应用及其配置,执行前仍受原权限和确认限制。",
110
+ "builder:app_flow_apply": "替换工作流声明或修改节点;删除旧节点时沿用破坏性确认。",
111
+ "builder:app_flow_get": "读取当前草稿或指定历史版本的工作流声明。",
112
+ "builder:app_flow_get_schema": "读取工作流声明的版本化 Schema。",
113
+ "builder:app_flow_list_versions": "列出可用于恢复的工作流历史版本。",
114
+ "builder:app_flow_restore_version": "把指定历史工作流版本恢复到草稿,属于写操作。",
115
+ "builder:app_flow_validate": "校验工作流声明,执行原有维护和合同检查。",
116
+ "builder:app_form_apply": "根据完整表单声明创建或更新应用、字段、布局及相关配置。",
117
+ "builder:app_form_get": "读取应用的 canonical 表单声明。",
118
+ "builder:app_form_schema": "读取表单声明、字段或公式的版本化 Schema。",
119
+ "builder:app_form_validate": "本地校验表单声明,不访问业务后端。",
120
+ "builder:app_form_validate_code_block": "静态检查代码块并可在后端试运行代码。",
121
+ "builder:app_form_validate_formula": "校验公式语法并在后端求值验证。",
122
+ "builder:app_get": "读取应用配置概览及可继续定位的表单、视图和流程资源。",
123
+ "builder:app_get_associated_resources": "读取应用关联视图、关联报表及其展示配置。",
124
+ "builder:app_get_buttons": "读取应用按钮定义和绑定配置。",
125
+ "builder:app_get_charts": "读取应用图表与报表配置。",
126
+ "builder:app_get_fields": "读取应用字段及可用于图表配置的字段能力。",
127
+ "builder:app_get_flow": "读取应用工作流配置概览。",
128
+ "builder:app_get_layout": "读取应用表单布局配置。",
129
+ "builder:app_get_views": "读取应用视图配置概览。",
130
+ "builder:app_publish_verify": "按当前发布状态核验应用,必要时执行发布、结束编辑及发布后的读取核验。",
131
+ "builder:app_release_edit_lock_if_mine": "仅释放当前用户自己持有的应用编辑锁。",
132
+ "builder:app_repair_code_blocks": "检查并可修复输出绑定代码块;apply=false/true 共用一个完整工具许可。",
133
+ "builder:app_resolve": "按名称或引用定位目标应用。",
134
+ "builder:app_views_apply": "创建或修改视图、过滤与查询面板,并可创建和绑定视图按钮。",
135
+ "builder:app_views_get": "读取 canonical 视图声明及相关配置。",
136
+ "builder:app_views_schema": "读取视图声明的版本化 Schema。",
137
+ "builder:app_views_validate": "校验视图声明。",
138
+ "builder:auth_logout": "退出当前认证上下文,并可清理保存的凭据。",
139
+ "builder:auth_use_credential": "使用提供的凭据建立认证上下文,并按参数决定是否保存。",
140
+ "builder:auth_whoami": "查看当前认证身份。",
141
+ "builder:builder_tool_contract": "读取配置工具合同,包含表单、视图、流程、图表、应用包和成员相关配置能力。",
142
+ "builder:button_style_catalog_get": "读取可用按钮样式、颜色和图标。",
143
+ "builder:chart_get": "读取目标图表的配置。",
144
+ "builder:feedback_submit": "提交产品反馈,沿用原用户确认要求。",
145
+ "builder:file_upload_local": "把本地文件上传到轻流。",
146
+ "builder:get_login_link": "为指定轻流页面生成短时免登录链接。",
147
+ "builder:member_search": "搜索工作区成员。",
148
+ "builder:package_apply": "创建或更新应用包元数据、可见性、分组及排序。",
149
+ "builder:package_get": "读取应用包详情。",
150
+ "builder:package_list": "列出可访问的应用包。",
151
+ "builder:portal_apply": "创建或更新门户,并可创建其内嵌图表。",
152
+ "builder:portal_delete": "删除门户,沿用原破坏性确认要求。",
153
+ "builder:portal_get": "读取门户配置。",
154
+ "builder:portal_list": "列出可访问的门户。",
155
+ "builder:role_create": "创建工作区角色。",
156
+ "builder:role_search": "搜索工作区角色。",
157
+ "builder:solution_install": "安装完整方案,可创建应用包、应用、字段、视图、流程、图表、门户和角色,并按参数复制业务数据。",
158
+ "builder:view_get": "读取目标视图的配置。",
159
+ "builder:workspace_get": "读取工作区信息。",
160
+ "builder:workspace_icon_catalog_get": "读取应用配置可用的工作区图标和颜色。",
161
+ "builder:workspace_list": "列出可访问的工作区。",
162
+ "user:app_get": "读取应用信息、数据访问范围和可访问视图。",
163
+ "user:app_list": "列出或按名称搜索可访问的应用。",
164
+ "user:auth_login": "登录并建立轻流认证上下文。",
165
+ "user:auth_logout": "退出当前认证上下文,并可清理保存的凭据。",
166
+ "user:auth_use_credential": "使用提供的凭据建立认证上下文,并按参数决定是否保存。",
167
+ "user:auth_whoami": "查看当前认证身份。",
168
+ "user:chart_get": "读取目标图表。",
169
+ "user:data_delete": "在应用数据面批量删除记录,沿用原数据范围和权限检查。",
170
+ "user:data_get": "按记录 ID 读取应用数据及可选字段信息。",
171
+ "user:data_insert": "在应用数据面批量新增记录。",
172
+ "user:data_query": "按字段 ID 查询应用数据,支持过滤、排序、分页及完整 CSV 导出。",
173
+ "user:data_update": "在应用数据面批量局部更新记录。",
174
+ "user:directory_list_all_departments": "读取全部可访问部门。",
175
+ "user:directory_list_all_internal_users": "读取全部可访问内部成员。",
176
+ "user:directory_list_external_members": "列出外部成员。",
177
+ "user:directory_list_internal_departments": "列出内部部门。",
178
+ "user:directory_list_internal_users": "列出内部成员。",
179
+ "user:directory_list_sub_departments": "列出指定部门的子部门。",
180
+ "user:directory_search": "搜索通讯录成员或部门。",
181
+ "user:feedback_submit": "提交产品反馈,沿用原用户确认要求。",
182
+ "user:file_get_upload_info": "获取文件上传所需的信息。",
183
+ "user:file_upload_local": "把本地文件上传到轻流。",
184
+ "user:get_login_link": "为指定轻流页面生成短时免登录链接。",
185
+ "user:navigation_create": "创建导航配置。",
186
+ "user:navigation_delete": "删除导航配置。",
187
+ "user:navigation_get_detail": "读取导航详情。",
188
+ "user:navigation_get_status": "读取导航状态。",
189
+ "user:navigation_list_draft_all": "读取全部导航草稿。",
190
+ "user:navigation_list_draft_page": "分页读取导航草稿。",
191
+ "user:navigation_list_published": "读取已发布导航。",
192
+ "user:navigation_publish": "发布导航配置。",
193
+ "user:navigation_reorder": "调整导航排序。",
194
+ "user:navigation_set_visible": "调整导航可见性。",
195
+ "user:navigation_update": "更新导航配置。",
196
+ "user:package_create": "创建应用包。",
197
+ "user:package_delete": "删除应用包,并可按 deleted_all_data 删除业务数据及关联应用配置。",
198
+ "user:package_get": "读取应用包详情。",
199
+ "user:package_get_base": "读取应用包基础信息。",
200
+ "user:package_list": "列出应用包。",
201
+ "user:package_update": "更新应用包配置。",
202
+ "user:portal_create": "创建门户。",
203
+ "user:portal_delete": "删除门户。",
204
+ "user:portal_get": "读取门户详情。",
205
+ "user:portal_get_base_info": "读取门户基础信息。",
206
+ "user:portal_list": "列出门户。",
207
+ "user:portal_publish": "发布门户。",
208
+ "user:portal_update": "更新门户内容配置。",
209
+ "user:portal_update_base_info": "更新门户基础信息。",
210
+ "user:qingbi_report_delete": "删除轻析报表。",
211
+ "user:qingbi_report_get_base": "读取轻析报表基础信息。",
212
+ "user:qingbi_report_get_config": "读取轻析报表配置。",
213
+ "user:qingbi_report_get_data": "读取轻析报表数据。",
214
+ "user:qingbi_report_list": "列出轻析报表。",
215
+ "user:qingbi_report_list_field_options": "读取轻析报表字段的可选配置项。",
216
+ "user:qingbi_report_list_fields": "读取轻析报表字段。",
217
+ "user:qingbi_report_reorder": "调整轻析报表排序。",
218
+ "user:record_access": "解析应用和视图的数据访问入口及原有权限范围。",
219
+ "user:record_analyze": "分析指定应用或视图的记录数据。",
220
+ "user:record_browse_schema_get": "读取按视图浏览记录的字段合同。",
221
+ "user:record_code_block_run": "执行记录数据相关代码块。",
222
+ "user:record_code_block_schema_get": "读取记录代码块的输入输出合同。",
223
+ "user:record_delete": "通过原记录接口删除记录。",
224
+ "user:record_department_candidates": "读取记录字段可选部门。",
225
+ "user:record_export_direct": "直接导出记录数据。",
226
+ "user:record_export_get": "获取记录导出结果。",
227
+ "user:record_export_start": "启动记录导出任务。",
228
+ "user:record_export_status_get": "查询记录导出任务状态。",
229
+ "user:record_get": "读取单条记录。",
230
+ "user:record_import_repair_local": "修复本地记录导入文件。",
231
+ "user:record_import_schema_get": "读取记录导入字段合同。",
232
+ "user:record_import_start": "启动记录导入任务。",
233
+ "user:record_import_status_get": "查询记录导入任务状态。",
234
+ "user:record_import_template_get": "获取记录导入模板。",
235
+ "user:record_import_verify": "验证记录导入结果。",
236
+ "user:record_insert": "通过原记录接口新增记录。",
237
+ "user:record_insert_schema_get": "读取记录新增字段合同。",
238
+ "user:record_list": "按视图读取记录列表。",
239
+ "user:record_logs_get": "读取记录操作日志。",
240
+ "user:record_member_candidates": "读取记录字段可选成员。",
241
+ "user:record_schema_get": "读取申请表单字段合同。",
242
+ "user:record_update": "通过原记录接口更新记录。",
243
+ "user:record_update_schema_get": "读取记录更新字段合同。",
244
+ "user:role_create": "创建工作区角色。",
245
+ "user:role_delete": "删除工作区角色。",
246
+ "user:role_search": "搜索工作区角色。",
247
+ "user:role_update": "更新工作区角色。",
248
+ "user:solution_build_all": "规划、执行或修复完整方案,可创建应用包、角色、应用、字段、流程、视图、图表、门户、导航及初始业务数据。",
249
+ "user:solution_build_analytics_portal": "规划、执行或修复图表与门户搭建,并可启用相应工作区插件。",
250
+ "user:solution_build_app": "规划、执行或修复应用搭建,并可创建应用包、角色、字段及初始业务数据。",
251
+ "user:solution_build_app_flow": "规划、执行或修复应用及流程搭建,并可创建应用包、角色、字段及初始业务数据。",
252
+ "user:solution_build_app_from_requirements": "根据需求搭建应用,并可创建应用包、角色、字段及初始业务数据。",
253
+ "user:solution_build_flow": "规划、执行或修复流程搭建,并可为流程角色引用创建工作区角色。",
254
+ "user:solution_build_navigation": "规划、执行或修复导航搭建,并可启用相应工作区插件。",
255
+ "user:solution_build_status": "读取方案搭建任务的进度和结果。",
256
+ "user:solution_build_views": "规划、执行或修复方案中的视图配置。",
257
+ "user:solution_design_session": "创建、读取或更新本地方案设计会话。",
258
+ "user:solution_schema_example": "读取方案声明 Schema 和示例。",
259
+ "user:task_action_execute": "执行待办动作,沿用原审批权限和确认边界。",
260
+ "user:task_associated_report_detail_get": "读取待办关联报表详情。",
261
+ "user:task_get": "读取待办详情。",
262
+ "user:task_list": "列出待办。",
263
+ "user:task_workbench": "进入交互式待办工作台,可读取待办并执行其现有审批动作。",
264
+ "user:task_workflow_log_get": "读取待办工作流日志。",
265
+ "user:view_board_get_lane_base_info": "读取看板视图泳道信息。",
266
+ "user:view_get": "读取可访问视图的业务信息及导出能力。",
267
+ "user:view_get_base_info": "读取视图基础信息。",
268
+ "user:view_get_config": "读取视图配置。",
269
+ "user:view_get_future_nodes": "读取视图记录后续流程节点。",
270
+ "user:view_get_workflow_status": "读取视图记录流程状态。",
271
+ "user:view_list": "列出视图。",
272
+ "user:view_list_associations": "读取视图关联资源。",
273
+ "user:view_list_flat": "读取扁平视图列表。",
274
+ "user:view_list_questions": "读取视图字段。",
275
+ "user:workflow_get_future_nodes": "读取记录后续流程节点。",
276
+ "user:workflow_get_future_nodes_app": "读取应用流程的后续节点。",
277
+ "user:workspace_get": "读取工作区信息。",
278
+ "user:workspace_list": "列出可访问的工作区。",
279
+ "user:workspace_select": "切换当前工作区上下文。",
280
+ "user:workspace_set_plugin_status": "启用或停用工作区业务插件,属于受控业务写操作。",
281
+ }
282
+
283
+
284
+ def tool_id(domain: str, name: str) -> str:
285
+ value = f"{domain}:{name}"
286
+ if TOOL_ID_PATTERN.fullmatch(value) is None:
287
+ raise ValueError(f"非法工具 ID: {value}")
288
+ return value
289
+
290
+
291
+ def require_registered_tool_id(stable_id: str) -> None:
292
+ if TOOL_ID_PATTERN.fullmatch(stable_id) is None:
293
+ raise ValueError(f"非法工具 ID: {stable_id}")
294
+ if stable_id not in REGISTERED_TOOL_IDS:
295
+ raise ValueError(f"工具尚未登记: {stable_id}")
296
+
297
+
298
+ def tool_is_exempt(stable_id: str) -> bool:
299
+ return stable_id in EXEMPT_TOOL_IDS
300
+
301
+
302
+ def build_tool_catalog(
303
+ cli_bindings: Mapping[tuple[str, ...], str],
304
+ mcp_bindings: Mapping[str, Mapping[str, str]],
305
+ ) -> dict[str, object]:
306
+ entrypoints: dict[str, list[dict[str, object]]] = {}
307
+ for route, stable_id in sorted(cli_bindings.items()):
308
+ require_registered_tool_id(stable_id)
309
+ entrypoints.setdefault(stable_id, []).append({"type": "cli", "route": list(route)})
310
+ for surface, bindings in sorted(mcp_bindings.items()):
311
+ for name, stable_id in sorted(bindings.items()):
312
+ require_registered_tool_id(stable_id)
313
+ entrypoints.setdefault(stable_id, []).append({"type": "mcp", "surface": surface, "name": name})
314
+
315
+ # 完整提供方目录必须覆盖所有登记工具,不能静默导出缺少历史入口的子集。
316
+ if set(entrypoints) != REGISTERED_TOOL_IDS:
317
+ missing = sorted(REGISTERED_TOOL_IDS - set(entrypoints))
318
+ raise ValueError(f"工具目录入口不完整: missing={missing}")
319
+ if set(TOOL_DESCRIPTIONS) != REGISTERED_TOOL_IDS:
320
+ raise ValueError("工具能力说明与完整登记表不一致")
321
+ if set(TOOL_DISPLAY_TEXT) != REGISTERED_TOOL_IDS:
322
+ raise ValueError("工具多语言文案与完整登记表不一致")
323
+
324
+ tools: list[dict[str, object]] = []
325
+ for stable_id in sorted(entrypoints):
326
+ description = TOOL_DESCRIPTIONS[stable_id]
327
+ if not isinstance(description, str) or not description.strip():
328
+ raise ValueError(f"工具缺少能力说明: {stable_id}")
329
+ zh_name, en_name, en_description = TOOL_DISPLAY_TEXT[stable_id]
330
+ if any(not isinstance(value, str) or not value.strip() for value in (zh_name, en_name, en_description)):
331
+ raise ValueError(f"工具缺少多语言文案: {stable_id}")
332
+ tools.append({
333
+ "id": stable_id,
334
+ "name": stable_id.split(":", 1)[1],
335
+ "description": description,
336
+ "displayName": zh_name,
337
+ "i18n": {
338
+ "zh-CN": {"displayName": zh_name, "description": description},
339
+ "en-US": {"displayName": en_name, "description": en_description},
340
+ },
341
+ "exempt": tool_is_exempt(stable_id),
342
+ "entrypoints": entrypoints[stable_id],
343
+ })
344
+ return {
345
+ "catalogVersion": CATALOG_VERSION,
346
+ "policyVersion": POLICY_VERSION,
347
+ "provider": {"name": "qingflow-mcp", "version": __version__},
348
+ "defaultLocale": DEFAULT_LOCALE,
349
+ "locales": list(SUPPORTED_LOCALES),
350
+ "tools": tools,
351
+ }
352
+
353
+
354
+ def user_server_bindings(tool_names: Iterable[str]) -> dict[str, str]:
355
+ return {name: tool_id("user", name) for name in tool_names}
356
+
357
+
358
+ def builder_server_bindings(tool_names: Iterable[str]) -> dict[str, str]:
359
+ return {name: tool_id("builder", name) for name in tool_names}
360
+
361
+
362
+ def stdio_server_bindings(
363
+ legacy_tool_names: Iterable[str],
364
+ final_tool_names: Iterable[str],
365
+ ) -> dict[str, str]:
366
+ legacy = set(legacy_tool_names)
367
+ final = set(final_tool_names)
368
+ return {
369
+ name: tool_id("user" if name in legacy else "builder", name)
370
+ for name in final
371
+ }
372
+
373
+
374
+ def combined_server_bindings(
375
+ user_tool_names: Iterable[str],
376
+ builder_tool_names: Iterable[str],
377
+ *,
378
+ builder_prefix: str,
379
+ ) -> dict[str, str]:
380
+ bindings = user_server_bindings(user_tool_names)
381
+ bindings.update(
382
+ {
383
+ f"{builder_prefix}{name}": tool_id("builder", name)
384
+ for name in builder_tool_names
385
+ }
386
+ )
387
+ return bindings
@@ -0,0 +1,185 @@
1
+ from __future__ import annotations
2
+
3
+
4
+ DEFAULT_LOCALE = "zh-CN"
5
+ SUPPORTED_LOCALES = ("zh-CN", "en-US")
6
+
7
+ # 每项为(中文显示名称、英文显示名称、英文能力说明);中文能力说明沿用 tool_catalog.py。
8
+ # 这里只维护工具本身的文案,不包含 Wingent-X 的产品分类、排序或分类标签。
9
+ TOOL_DISPLAY_TEXT: dict[str, tuple[str, str, str]] = {
10
+ "builder:app_associated_resources_apply": ("配置关联资源", "Configure associated resources", "Configure associated views, reports, and their display rules for each view."),
11
+ "builder:app_charts_apply": ("配置应用图表", "Configure application charts", "Create, update, delete, or reorder charts and reports using Qingflow application data sources."),
12
+ "builder:app_custom_buttons_apply": ("配置自定义按钮", "Configure custom buttons", "Maintain standalone button definitions, styles, bindings across views, and ordering."),
13
+ "builder:app_delete": ("删除应用", "Delete application", "Delete an application and its configuration, retaining existing permission and confirmation checks."),
14
+ "builder:app_flow_apply": ("配置工作流", "Configure workflow", "Replace workflow declarations or modify nodes; deleting existing nodes retains destructive change confirmation."),
15
+ "builder:app_flow_get": ("读取工作流声明", "Read workflow declaration", "Read the current draft or a specified historical workflow declaration."),
16
+ "builder:app_flow_get_schema": ("读取工作流结构", "Read workflow schema", "Read the versioned schema for workflow declarations."),
17
+ "builder:app_flow_list_versions": ("列出工作流版本", "List workflow versions", "List historical workflow versions available for restoration."),
18
+ "builder:app_flow_restore_version": ("恢复工作流版本", "Restore workflow version", "Restore a specified historical workflow version to the draft; this is a write operation."),
19
+ "builder:app_flow_validate": ("校验工作流", "Validate workflow", "Validate workflow declarations with existing maintenance and contract checks."),
20
+ "builder:app_form_apply": ("配置应用表单", "Configure application form", "Create or update applications, fields, layouts, and related configuration from a complete form declaration."),
21
+ "builder:app_form_get": ("读取表单声明", "Read form declaration", "Read the application's canonical form declaration."),
22
+ "builder:app_form_schema": ("读取表单结构", "Read form schema", "Read versioned schemas for form declarations, fields, or formulas."),
23
+ "builder:app_form_validate": ("校验表单声明", "Validate form declaration", "Validate form declarations locally without accessing the business backend."),
24
+ "builder:app_form_validate_code_block": ("校验表单代码块", "Validate form code block", "Perform static code checks and, when applicable, execute a test run on the backend."),
25
+ "builder:app_form_validate_formula": ("校验表单公式", "Validate form formula", "Validate formula syntax and evaluate the formula on the backend."),
26
+ "builder:app_get": ("读取应用配置概览", "Read application configuration overview", "Read the application configuration overview and references to form, view, and workflow resources."),
27
+ "builder:app_get_associated_resources": ("读取关联资源", "Read associated resources", "Read associated views, reports, and their display configuration."),
28
+ "builder:app_get_buttons": ("读取应用按钮", "Read application buttons", "Read application button definitions and binding configuration."),
29
+ "builder:app_get_charts": ("读取应用图表配置", "Read application chart configuration", "Read application chart and report configuration."),
30
+ "builder:app_get_fields": ("读取应用字段", "Read application fields", "Read application fields and the field capabilities available for chart configuration."),
31
+ "builder:app_get_flow": ("读取工作流概览", "Read workflow overview", "Read an overview of the application's workflow configuration."),
32
+ "builder:app_get_layout": ("读取表单布局", "Read form layout", "Read the application's form layout configuration."),
33
+ "builder:app_get_views": ("读取视图配置概览", "Read view configuration overview", "Read an overview of application view configuration."),
34
+ "builder:app_publish_verify": ("发布并核验应用", "Publish and verify application", "Verify the application's current publication state; when needed, publish, finish editing, and verify the published result."),
35
+ "builder:app_release_edit_lock_if_mine": ("释放本人编辑锁", "Release own edit lock", "Release an application edit lock only when it belongs to the current user."),
36
+ "builder:app_repair_code_blocks": ("检查并修复代码块", "Inspect and repair code blocks", "Inspect and optionally repair code blocks with output bindings; apply=false/true share the same full tool permission."),
37
+ "builder:app_resolve": ("定位应用", "Resolve application", "Resolve the target application by name or reference."),
38
+ "builder:app_views_apply": ("配置应用视图", "Configure application views", "Create or modify views, filters, and query panels; may also create and bind view buttons."),
39
+ "builder:app_views_get": ("读取视图声明", "Read view declaration", "Read canonical view declarations and related configuration."),
40
+ "builder:app_views_schema": ("读取视图结构", "Read view schema", "Read the versioned schema for view declarations."),
41
+ "builder:app_views_validate": ("校验视图声明", "Validate view declaration", "Validate view declarations."),
42
+ "builder:auth_logout": ("退出认证", "Log out", "Leave the current authentication context and optionally clear saved credentials."),
43
+ "builder:auth_use_credential": ("使用凭据认证", "Authenticate with credential", "Establish an authentication context with the supplied credential and save it when requested."),
44
+ "builder:auth_whoami": ("查看当前身份", "Read current identity", "Read the current authenticated identity."),
45
+ "builder:builder_tool_contract": ("读取配置工具合同", "Read builder tool contract", "Read configuration tool contracts covering forms, views, workflows, charts, application packages, and members."),
46
+ "builder:button_style_catalog_get": ("读取按钮样式目录", "Read button style catalog", "Read available button styles, colors, and icons."),
47
+ "builder:chart_get": ("读取图表配置", "Read chart configuration", "Read the target chart's configuration."),
48
+ "builder:feedback_submit": ("提交产品反馈", "Submit product feedback", "Submit product feedback with existing user confirmation requirements."),
49
+ "builder:file_upload_local": ("上传本地文件", "Upload local file", "Upload a local file to Qingflow."),
50
+ "builder:get_login_link": ("生成免登录链接", "Generate login link", "Generate a short lived login link for a specified Qingflow page."),
51
+ "builder:member_search": ("搜索工作区成员", "Search workspace members", "Search workspace members."),
52
+ "builder:package_apply": ("配置应用包", "Configure application package", "Create or update application package metadata, visibility, groups, and ordering."),
53
+ "builder:package_get": ("读取应用包详情", "Read application package", "Read application package details."),
54
+ "builder:package_list": ("列出应用包", "List application packages", "List accessible application packages."),
55
+ "builder:portal_apply": ("配置门户", "Configure portal", "Create or update a portal and optionally create its embedded charts."),
56
+ "builder:portal_delete": ("删除门户", "Delete portal", "Delete a portal with existing destructive operation confirmation requirements."),
57
+ "builder:portal_get": ("读取门户配置", "Read portal configuration", "Read portal configuration."),
58
+ "builder:portal_list": ("列出门户", "List portals", "List accessible portals."),
59
+ "builder:role_create": ("创建工作区角色", "Create workspace role", "Create a workspace role."),
60
+ "builder:role_search": ("搜索工作区角色", "Search workspace roles", "Search workspace roles."),
61
+ "builder:solution_install": ("安装完整方案", "Install complete solution", "Install a complete solution; may create application packages, applications, fields, views, workflows, charts, portals, and roles, and copy business data when requested."),
62
+ "builder:view_get": ("读取视图配置", "Read view configuration", "Read the target view's configuration."),
63
+ "builder:workspace_get": ("读取工作区信息", "Read workspace information", "Read workspace information."),
64
+ "builder:workspace_icon_catalog_get": ("读取工作区图标目录", "Read workspace icon catalog", "Read workspace icons and colors available for application configuration."),
65
+ "builder:workspace_list": ("列出工作区", "List workspaces", "List accessible workspaces."),
66
+ "user:app_get": ("读取应用业务信息", "Read application business information", "Read application information, data access scope, and accessible views."),
67
+ "user:app_list": ("列出应用", "List applications", "List accessible applications or search them by name."),
68
+ "user:auth_login": ("登录轻流", "Log in to Qingflow", "Log in and establish a Qingflow authentication context."),
69
+ "user:auth_logout": ("退出认证", "Log out", "Leave the current authentication context and optionally clear saved credentials."),
70
+ "user:auth_use_credential": ("使用凭据认证", "Authenticate with credential", "Establish an authentication context with the supplied credential and save it when requested."),
71
+ "user:auth_whoami": ("查看当前身份", "Read current identity", "Read the current authenticated identity."),
72
+ "user:chart_get": ("读取图表", "Read chart", "Read the target chart."),
73
+ "user:data_delete": ("删除应用数据", "Delete application data", "Delete application records in batches with existing data scope and permission checks."),
74
+ "user:data_get": ("读取应用数据", "Read application data", "Read application data by record ID, with optional field information."),
75
+ "user:data_insert": ("新增应用数据", "Insert application data", "Insert application records in batches."),
76
+ "user:data_query": ("查询应用数据", "Query application data", "Query application data by field ID, with filtering, sorting, pagination, and complete CSV export."),
77
+ "user:data_update": ("更新应用数据", "Update application data", "Update selected fields in application records in batches."),
78
+ "user:directory_list_all_departments": ("读取全部可访问部门", "Read all accessible departments", "Read all accessible departments."),
79
+ "user:directory_list_all_internal_users": ("读取全部可访问内部成员", "Read all accessible internal members", "Read all accessible internal members."),
80
+ "user:directory_list_external_members": ("列出外部成员", "List external members", "List external members."),
81
+ "user:directory_list_internal_departments": ("列出内部部门", "List internal departments", "List internal departments."),
82
+ "user:directory_list_internal_users": ("列出内部成员", "List internal members", "List internal members."),
83
+ "user:directory_list_sub_departments": ("列出子部门", "List subdepartments", "List subdepartments of a specified department."),
84
+ "user:directory_search": ("搜索通讯录", "Search directory", "Search directory members or departments."),
85
+ "user:feedback_submit": ("提交产品反馈", "Submit product feedback", "Submit product feedback with existing user confirmation requirements."),
86
+ "user:file_get_upload_info": ("获取文件上传信息", "Read file upload information", "Read the information required for a file upload."),
87
+ "user:file_upload_local": ("上传本地文件", "Upload local file", "Upload a local file to Qingflow."),
88
+ "user:get_login_link": ("生成免登录链接", "Generate login link", "Generate a short lived login link for a specified Qingflow page."),
89
+ "user:navigation_create": ("创建导航", "Create navigation", "Create navigation configuration."),
90
+ "user:navigation_delete": ("删除导航", "Delete navigation", "Delete navigation configuration."),
91
+ "user:navigation_get_detail": ("读取导航详情", "Read navigation details", "Read navigation details."),
92
+ "user:navigation_get_status": ("读取导航状态", "Read navigation status", "Read navigation status."),
93
+ "user:navigation_list_draft_all": ("读取全部导航草稿", "Read all navigation drafts", "Read all navigation drafts."),
94
+ "user:navigation_list_draft_page": ("分页读取导航草稿", "Read navigation draft page", "Read a page of navigation drafts."),
95
+ "user:navigation_list_published": ("读取已发布导航", "Read published navigation", "Read published navigation."),
96
+ "user:navigation_publish": ("发布导航", "Publish navigation", "Publish navigation configuration."),
97
+ "user:navigation_reorder": ("调整导航排序", "Reorder navigation", "Change navigation ordering."),
98
+ "user:navigation_set_visible": ("调整导航可见性", "Set navigation visibility", "Change navigation visibility."),
99
+ "user:navigation_update": ("更新导航", "Update navigation", "Update navigation configuration."),
100
+ "user:package_create": ("创建应用包", "Create application package", "Create an application package."),
101
+ "user:package_delete": ("删除应用包", "Delete application package", "Delete an application package; deleted_all_data may also delete business data and associated application configuration."),
102
+ "user:package_get": ("读取应用包详情", "Read application package", "Read application package details."),
103
+ "user:package_get_base": ("读取应用包基础信息", "Read application package base information", "Read application package base information."),
104
+ "user:package_list": ("列出应用包", "List application packages", "List application packages."),
105
+ "user:package_update": ("更新应用包", "Update application package", "Update application package configuration."),
106
+ "user:portal_create": ("创建门户", "Create portal", "Create a portal."),
107
+ "user:portal_delete": ("删除门户", "Delete portal", "Delete a portal."),
108
+ "user:portal_get": ("读取门户详情", "Read portal details", "Read portal details."),
109
+ "user:portal_get_base_info": ("读取门户基础信息", "Read portal base information", "Read portal base information."),
110
+ "user:portal_list": ("列出门户", "List portals", "List portals."),
111
+ "user:portal_publish": ("发布门户", "Publish portal", "Publish a portal."),
112
+ "user:portal_update": ("更新门户内容", "Update portal content", "Update portal content configuration."),
113
+ "user:portal_update_base_info": ("更新门户基础信息", "Update portal base information", "Update portal base information."),
114
+ "user:qingbi_report_delete": ("删除轻析报表", "Delete Qingbi report", "Delete a Qingbi report."),
115
+ "user:qingbi_report_get_base": ("读取轻析报表基础信息", "Read Qingbi report base information", "Read Qingbi report base information."),
116
+ "user:qingbi_report_get_config": ("读取轻析报表配置", "Read Qingbi report configuration", "Read Qingbi report configuration."),
117
+ "user:qingbi_report_get_data": ("读取轻析报表数据", "Read Qingbi report data", "Read Qingbi report data."),
118
+ "user:qingbi_report_list": ("列出轻析报表", "List Qingbi reports", "List Qingbi reports."),
119
+ "user:qingbi_report_list_field_options": ("读取报表字段配置项", "Read report field options", "Read available configuration options for Qingbi report fields."),
120
+ "user:qingbi_report_list_fields": ("读取报表字段", "Read report fields", "Read Qingbi report fields."),
121
+ "user:qingbi_report_reorder": ("调整轻析报表排序", "Reorder Qingbi reports", "Change Qingbi report ordering."),
122
+ "user:record_access": ("解析记录访问入口", "Resolve record access", "Resolve application and view data access entrypoints with existing permission scopes."),
123
+ "user:record_analyze": ("分析记录数据", "Analyze records", "Analyze records in a specified application or view."),
124
+ "user:record_browse_schema_get": ("读取记录浏览结构", "Read record browsing schema", "Read the field contract for browsing records by view."),
125
+ "user:record_code_block_run": ("执行记录代码块", "Run record code block", "Execute a code block related to record data."),
126
+ "user:record_code_block_schema_get": ("读取记录代码块结构", "Read record code block schema", "Read the input and output contract for a record code block."),
127
+ "user:record_delete": ("删除记录", "Delete record", "Delete records through the existing record API."),
128
+ "user:record_department_candidates": ("读取字段可选部门", "Read field department candidates", "Read department candidates for record fields."),
129
+ "user:record_export_direct": ("直接导出记录", "Export records directly", "Export record data directly."),
130
+ "user:record_export_get": ("获取记录导出结果", "Read record export result", "Read a record export result."),
131
+ "user:record_export_start": ("启动记录导出", "Start record export", "Start a record export task."),
132
+ "user:record_export_status_get": ("读取记录导出状态", "Read record export status", "Read the status of a record export task."),
133
+ "user:record_get": ("读取单条记录", "Read record", "Read a single record."),
134
+ "user:record_import_repair_local": ("修复本地导入文件", "Repair local import file", "Repair a local record import file."),
135
+ "user:record_import_schema_get": ("读取记录导入结构", "Read record import schema", "Read the field contract for importing records."),
136
+ "user:record_import_start": ("启动记录导入", "Start record import", "Start a record import task."),
137
+ "user:record_import_status_get": ("读取记录导入状态", "Read record import status", "Read the status of a record import task."),
138
+ "user:record_import_template_get": ("获取记录导入模板", "Read record import template", "Read a record import template."),
139
+ "user:record_import_verify": ("校验记录导入结果", "Verify record import", "Verify record import results."),
140
+ "user:record_insert": ("新增记录", "Insert record", "Insert records through the existing record API."),
141
+ "user:record_insert_schema_get": ("读取记录新增结构", "Read record insertion schema", "Read the field contract for inserting records."),
142
+ "user:record_list": ("按视图列出记录", "List records by view", "Read records by view."),
143
+ "user:record_logs_get": ("读取记录操作日志", "Read record operation logs", "Read record operation logs."),
144
+ "user:record_member_candidates": ("读取字段可选成员", "Read field member candidates", "Read member candidates for record fields."),
145
+ "user:record_schema_get": ("读取申请表单结构", "Read applicant form schema", "Read the field contract for the applicant form."),
146
+ "user:record_update": ("更新记录", "Update record", "Update records through the existing record API."),
147
+ "user:record_update_schema_get": ("读取记录更新结构", "Read record update schema", "Read the field contract for updating records."),
148
+ "user:role_create": ("创建工作区角色", "Create workspace role", "Create a workspace role."),
149
+ "user:role_delete": ("删除工作区角色", "Delete workspace role", "Delete a workspace role."),
150
+ "user:role_search": ("搜索工作区角色", "Search workspace roles", "Search workspace roles."),
151
+ "user:role_update": ("更新工作区角色", "Update workspace role", "Update a workspace role."),
152
+ "user:solution_build_all": ("搭建完整方案", "Build complete solution", "Plan, apply, or repair a complete solution; may create application packages, roles, applications, fields, workflows, views, charts, portals, navigation, and initial business data."),
153
+ "user:solution_build_analytics_portal": ("搭建图表与门户", "Build charts and portals", "Plan, apply, or repair charts and portals; may enable the corresponding workspace plugins."),
154
+ "user:solution_build_app": ("搭建应用", "Build application", "Plan, apply, or repair an application; may create application packages, roles, fields, and initial business data."),
155
+ "user:solution_build_app_flow": ("搭建应用与流程", "Build application and workflow", "Plan, apply, or repair applications and workflows; may create application packages, roles, fields, and initial business data."),
156
+ "user:solution_build_app_from_requirements": ("按需求搭建应用", "Build application from requirements", "Build an application from requirements; may create application packages, roles, fields, and initial business data."),
157
+ "user:solution_build_flow": ("搭建流程", "Build workflow", "Plan, apply, or repair workflows; may create workspace roles referenced by the workflow."),
158
+ "user:solution_build_navigation": ("搭建导航", "Build navigation", "Plan, apply, or repair navigation; may enable the corresponding workspace plugins."),
159
+ "user:solution_build_status": ("读取方案搭建状态", "Read solution build status", "Read the progress and results of a solution build task."),
160
+ "user:solution_build_views": ("搭建视图", "Build views", "Plan, apply, or repair view configuration in a solution."),
161
+ "user:solution_design_session": ("管理本地方案设计会话", "Manage local solution design session", "Create, read, or update a local solution design session."),
162
+ "user:solution_schema_example": ("读取方案结构与示例", "Read solution schema and examples", "Read solution declaration schemas and examples."),
163
+ "user:task_action_execute": ("执行待办动作", "Execute task action", "Execute a task action with existing approval permissions and confirmation requirements."),
164
+ "user:task_associated_report_detail_get": ("读取待办关联报表", "Read task associated report", "Read details of a report associated with a task."),
165
+ "user:task_get": ("读取待办详情", "Read task details", "Read task details."),
166
+ "user:task_list": ("列出待办", "List tasks", "List tasks."),
167
+ "user:task_workbench": ("使用交互式待办工作台", "Use interactive task workbench", "Open the interactive task workbench to read tasks and execute their existing approval actions."),
168
+ "user:task_workflow_log_get": ("读取待办流程日志", "Read task workflow logs", "Read workflow logs for a task."),
169
+ "user:view_board_get_lane_base_info": ("读取看板泳道信息", "Read board lane information", "Read lane information for a board view."),
170
+ "user:view_get": ("读取视图业务信息", "Read view business information", "Read an accessible view's business information and export capabilities."),
171
+ "user:view_get_base_info": ("读取视图基础信息", "Read view base information", "Read view base information."),
172
+ "user:view_get_config": ("读取视图配置", "Read view configuration", "Read view configuration."),
173
+ "user:view_get_future_nodes": ("读取视图后续流程节点", "Read future view workflow nodes", "Read future workflow nodes for records in a view."),
174
+ "user:view_get_workflow_status": ("读取视图记录流程状态", "Read view record workflow status", "Read workflow status for records in a view."),
175
+ "user:view_list": ("列出视图", "List views", "List views."),
176
+ "user:view_list_associations": ("读取视图关联资源", "Read view associations", "Read resources associated with a view."),
177
+ "user:view_list_flat": ("读取扁平视图列表", "Read flat view list", "Read a flat list of views."),
178
+ "user:view_list_questions": ("读取视图字段", "Read view fields", "Read view fields."),
179
+ "user:workflow_get_future_nodes": ("读取记录后续流程节点", "Read future record workflow nodes", "Read future workflow nodes for a record."),
180
+ "user:workflow_get_future_nodes_app": ("读取应用后续流程节点", "Read future application workflow nodes", "Read future nodes in an application's workflow."),
181
+ "user:workspace_get": ("读取工作区信息", "Read workspace information", "Read workspace information."),
182
+ "user:workspace_list": ("列出工作区", "List workspaces", "List accessible workspaces."),
183
+ "user:workspace_select": ("切换工作区", "Select workspace", "Switch the current workspace context."),
184
+ "user:workspace_set_plugin_status": ("启停工作区插件", "Enable or disable workspace plugins", "Enable or disable workspace business plugins; this is a controlled business write operation."),
185
+ }