@stalfh233/omc-cli 0.6.47 → 0.6.50
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/dist/capability-overview.js +114 -1
- package/dist/cli-stdout.js +3 -0
- package/dist/cli.js +318 -62
- package/dist/closest-match.js +22 -3
- package/dist/command-transport.js +5 -1
- package/dist/discovery.js +193 -75
- package/dist/goal-plan.js +1296 -0
- package/dist/goal-routes.js +87 -5
- package/dist/graph.js +223 -34
- package/dist/intent/capabilities/field.js +24 -0
- package/dist/intent/plan-apply.js +10 -3
- package/dist/intent/schema.js +24 -1
- package/dist/lanes/app.js +4 -0
- package/dist/lanes/apply-changes.js +1 -0
- package/dist/lanes/b2-registration.js +24 -0
- package/dist/lanes/businessrule.js +14 -0
- package/dist/lanes/custom-page.js +8 -0
- package/dist/lanes/datarule.js +4 -0
- package/dist/lanes/dictionary.js +13 -0
- package/dist/lanes/environment.js +2 -0
- package/dist/lanes/field.js +5 -0
- package/dist/lanes/folder.js +4 -0
- package/dist/lanes/form.js +5 -0
- package/dist/lanes/list-view-contract.js +1 -1
- package/dist/lanes/list-view.js +5 -0
- package/dist/lanes/meta.js +5 -0
- package/dist/lanes/model.js +9 -0
- package/dist/lanes/online-js.js +2 -0
- package/dist/lanes/organization.js +20 -0
- package/dist/lanes/perm.js +5 -5
- package/dist/lanes/programming.js +6 -0
- package/dist/lanes/report.js +9 -0
- package/dist/lanes/rule-lifecycle.js +6 -0
- package/dist/lanes/rulelog.js +1 -0
- package/dist/lanes/runtime-data.js +39 -1
- package/dist/lanes/workflow.js +18 -0
- package/dist/mcp-graph.js +180 -41
- package/dist/package-tool.js +1 -0
- package/dist/recipes/workflow.js +1 -1
- package/dist/search-index.js +137 -0
- package/dist/tool-search.js +647 -0
- package/dist/tool-types.js +6 -0
- package/dist/tools.js +1 -0
- package/dist/write.js +2 -1
- package/docs/omc-introduction.md +5 -7
- package/package.json +6 -5
- package/skills/omc-business-configuration.md +2 -1
- package/skills/omc-capabilities.md +4 -2
- package/skills/omc-start-here.md +21 -7
- package/skills/omc-tool-selection.md +7 -15
- package/skills/omc-write-hazards.md +1 -1
|
@@ -126,7 +126,7 @@ export const LIST_VIEW_LANE_CONTRACT = Object.freeze({
|
|
|
126
126
|
}),
|
|
127
127
|
"listview.configure": Object.freeze({
|
|
128
128
|
scope: LIST_VIEW_SCOPE,
|
|
129
|
-
description: "(**列汇总**:数值列 `sumType` wire 为整数——0=不统计/1=求和/2=平均/3=最小/4=最大/5=计数,写进 presentation.columnsJson 的列对象,8.6.26 反编译 SumType
|
|
129
|
+
description: "(**列汇总**:数值列 `sumType` wire 为整数——0=不统计/1=求和/2=平均/3=最小/4=最大/5=计数,写进 presentation.columnsJson 的列对象,8.6.26 反编译 SumType 实证)配置列表视图。**code 语义(与配方 configure-default-list 同口径,r60a-F13 真机对齐 2026-11-13)**:省略 `code`(或 code=schemaCode)= 配置**默认视图**——默认视图在 model.create 时由平台自动生成、是正规的配置对象,日常配列/排序就用它,**不要先 listview.create**(那会多出一个自定义视图);`listview.create` 只在确实需要**第二个**视图时使用,此时 listview.configure 带 code 指向它。在既有(默认)列表视图上配置列、排序、查询条件、行/列表按钮、呈现、自定义按钮、视图头扩展选项与视图类型:读回 query,按 `fieldCodes` 追加缺失列或**原地修正**已存在列的 name/propertyType/displayFormat/visible(不再跳过既有列),置为可见;数值列 displayFormat 由字段 0 基 `options.scale` 推导(0=整数,1=1位,2=2位,3=3位…8=8位;实测 scale 2 → displayFormat 3 = 两位小数)、日期列由 `options.format` 推导(1/2/3/4),回显 `columns` 为完整列对象并给出 `added`/`updated`;`sorts`→querySorts(direction ASC/DESC)、`conditions`→queryConditions(**比较符是 `filterType`(QueryFilterType 字符串枚举 Eq/NotEq/…;别名 operator/op;省略时按 propertyType 取平台默认)**、displayType/choiceType/options 字符串解码;写后条件回读等价校验给出 conditionReadback)、`actions`→queryActions(queryActionType QUERY(1)…BATCH_SUBMIT(23)、associationType BIZSHEET(0)/WORKFLOW(1))、`presentation`→queryPresentation(htmlJson/actionsJson/columnsJson/queryViewDataSource/schemaRelations/options 均为 JSON 字符串,合法 JSON 读回解码)、`buttons`→customButtons(写面 customButtonJson JSON 数组字符串;bindAction/useLocation/operateType/showPermType 以枚举名发送;triggerType 强制 QUERY、triggerCode=视图 code、sortKey 按数组位,缺省回传读面 customButtons 有效集;ADD_DATA/FORM 目标绑定走 actionConfig——schemaCodeVal+formListData+configureList,targetCode/targetObjCode 对其无效会被拒;高层参数 targetModel/targetForm/configureList 从读回元数据展开,未解析即 listview-button-target-unresolved 零副作用拒)、`options`→视图头 BizQueryOption(`pagingSetting`{pageSize,showTotal} 分页、`listViewModeSetting`{mode,canSwitch} 列表模式,缺省回传读面有效 options、提供时整体替换,rowColorSetting 无 8.6.26 类证据故对象形态拒绝)与 `presentationType`→QueryPresentationType(LIST/BOARD/CALENDAR/GANTT,缺省回传读面有效值;GANTT 必须同时提供 `gantt`→queryGanttModel 且 startTimePropertyCode/endTimePropertyCode/titlePropertyCode 非空,缺省不触碰既有 gantt)与 `queryLayer`→层级展示(BizQueryLayer[] 数组原样发送)及 `multiTableHeaderConfig`→多级表头(HeaderConfig[] JSON 字符串;缺省回传读面有效值、提供时整体替换)省略时不触碰既有值,提供时整体替换并经出门前 dry-lint;`query/update` 后回读(`query/get` 自动注入的默认动作、平台 sortKey 重排与 schemaRelations 派生需还原)。`code` 省略时用默认视图(=schemaCode)。`queryConditionMap` 为只读派生(query/get 带 formCode 子表条件时才出现),非配置输入。**发布语义**:`query/update` 自动置 publish=TRUE——视图无草稿/发布两态、无需独立发布步骤(与表单/规则的 draft→publish 不同)。**依赖顺序**:视图与表单脚手架都依赖**已发布字段**,规范顺序 model.create → field.create → field.publish(模型级)→ form.draft → form.publish →(需要第二视图时 listview.create)→ listview.configure → rule.save → rule.enable → workflow。",
|
|
130
130
|
}),
|
|
131
131
|
"listview.delete": Object.freeze({
|
|
132
132
|
scope: LIST_VIEW_SCOPE,
|
package/dist/lanes/list-view.js
CHANGED
|
@@ -261,6 +261,7 @@ export function decodeButtonScript(input) {
|
|
|
261
261
|
export function registerListViewLane(tools) {
|
|
262
262
|
tools.push(defineTool({
|
|
263
263
|
name: "listview.get",
|
|
264
|
+
search: { intents: ["看视图配置", "读视图列", "视图详情"] },
|
|
264
265
|
layer: "low",
|
|
265
266
|
kind: "read",
|
|
266
267
|
lane: LIST_VIEW_LANE,
|
|
@@ -450,6 +451,7 @@ export function registerListViewLane(tools) {
|
|
|
450
451
|
});
|
|
451
452
|
tools.push(defineTool({
|
|
452
453
|
name: "listview.list",
|
|
454
|
+
search: { intents: ["有哪些视图", "视图清单", "列出列表视图"] },
|
|
453
455
|
layer: "low",
|
|
454
456
|
kind: "read",
|
|
455
457
|
lane: LIST_VIEW_LANE,
|
|
@@ -496,6 +498,7 @@ export function registerListViewLane(tools) {
|
|
|
496
498
|
writeTool({
|
|
497
499
|
tools,
|
|
498
500
|
name: "listview.create",
|
|
501
|
+
search: { intents: ["新建视图", "加一个列表视图", "创建视图"] },
|
|
499
502
|
lane: LIST_VIEW_LANE,
|
|
500
503
|
scope: LIST_VIEW_TOOLS["listview.create"].scope,
|
|
501
504
|
description: LIST_VIEW_TOOLS["listview.create"].description,
|
|
@@ -542,6 +545,7 @@ export function registerListViewLane(tools) {
|
|
|
542
545
|
writeTool({
|
|
543
546
|
tools,
|
|
544
547
|
name: "listview.configure",
|
|
548
|
+
search: { intents: ["配置列表列", "配列表", "列表列"] },
|
|
545
549
|
lane: LIST_VIEW_LANE,
|
|
546
550
|
scope: LIST_VIEW_TOOLS["listview.configure"].scope,
|
|
547
551
|
description: LIST_VIEW_TOOLS["listview.configure"].description,
|
|
@@ -962,6 +966,7 @@ export function registerListViewLane(tools) {
|
|
|
962
966
|
writeTool({
|
|
963
967
|
tools,
|
|
964
968
|
name: "listview.delete",
|
|
969
|
+
search: { intents: ["删除列表视图", "删掉这个视图"] },
|
|
965
970
|
lane: LIST_VIEW_LANE,
|
|
966
971
|
scope: LIST_VIEW_TOOLS["listview.delete"].scope,
|
|
967
972
|
description: LIST_VIEW_TOOLS["listview.delete"].description,
|
package/dist/lanes/meta.js
CHANGED
|
@@ -10,6 +10,7 @@ const META_TOOLS = META_LANE_CONTRACT.tools;
|
|
|
10
10
|
export function registerMetaLane(tools) {
|
|
11
11
|
tools.push(defineTool({
|
|
12
12
|
name: "coverage.manifest",
|
|
13
|
+
search: { intents: ["覆盖了哪些", "能力覆盖", "覆盖面", "覆盖清单", "覆盖面清单"] },
|
|
13
14
|
layer: "meta",
|
|
14
15
|
kind: "meta",
|
|
15
16
|
// r28k F5:manifest 是 lane 粒度,不是 capability id(放首句,避免 summary 截断吞掉)。
|
|
@@ -105,6 +106,7 @@ export function registerMetaLane(tools) {
|
|
|
105
106
|
}));
|
|
106
107
|
tools.push(defineTool({
|
|
107
108
|
name: "get_status",
|
|
109
|
+
search: { intents: ["查状态", "看状态", "服务状态"] },
|
|
108
110
|
layer: "high",
|
|
109
111
|
kind: "meta",
|
|
110
112
|
// r28k F4:doctor vs get_status 分流(放首句,避免 summary 截断吞掉)。
|
|
@@ -160,6 +162,7 @@ export function registerMetaLane(tools) {
|
|
|
160
162
|
}));
|
|
161
163
|
tools.push(defineTool({
|
|
162
164
|
name: "setup.start",
|
|
165
|
+
search: { intents: ["帮我初始化", "初始化这套", "开始配置环境", "环境还没配置", "配置引导", "初始化配置", "带我一步步配置"] },
|
|
163
166
|
layer: "meta",
|
|
164
167
|
kind: "meta",
|
|
165
168
|
description: META_TOOLS["setup.start"].description,
|
|
@@ -195,6 +198,7 @@ export function registerMetaLane(tools) {
|
|
|
195
198
|
}));
|
|
196
199
|
tools.push(defineTool({
|
|
197
200
|
name: "setup.commit",
|
|
201
|
+
search: { intents: ["提交配置", "把配置写进去", "保存环境配置", "提交环境配置", "保存配置"] },
|
|
198
202
|
layer: "meta",
|
|
199
203
|
kind: "meta",
|
|
200
204
|
description: META_TOOLS["setup.commit"].description,
|
|
@@ -251,6 +255,7 @@ export function registerMetaLane(tools) {
|
|
|
251
255
|
}));
|
|
252
256
|
tools.push(defineTool({
|
|
253
257
|
name: "doctor",
|
|
258
|
+
search: { intents: ["环境健康检查", "健康检查", "体检环境", "环境有没有问题", "体检", "诊断"] },
|
|
254
259
|
layer: "meta",
|
|
255
260
|
kind: "meta",
|
|
256
261
|
// r28k F4:与 get_status 分流(放首句)。
|
package/dist/lanes/model.js
CHANGED
|
@@ -237,6 +237,7 @@ export function registerModelLane(tools) {
|
|
|
237
237
|
// call instead of a 9–16 call crawl across field.form.listview.rule.datarule.
|
|
238
238
|
tools.push(defineTool({
|
|
239
239
|
name: "model.list",
|
|
240
|
+
search: { intents: ["有哪些模型", "模型清单", "列出模型", "模型列表"] },
|
|
240
241
|
layer: "low",
|
|
241
242
|
kind: "read",
|
|
242
243
|
lane: MODEL_LANE,
|
|
@@ -295,6 +296,7 @@ export function registerModelLane(tools) {
|
|
|
295
296
|
const siblings = tools;
|
|
296
297
|
tools.push(defineTool({
|
|
297
298
|
name: "model.inspect",
|
|
299
|
+
search: { intents: ["模型全貌", "全部读出来", "一次读全", "综合看模型", "模型完整配置"] },
|
|
298
300
|
layer: "high",
|
|
299
301
|
kind: "read",
|
|
300
302
|
lane: MODEL_LANE,
|
|
@@ -528,6 +530,7 @@ export function registerModelLane(tools) {
|
|
|
528
530
|
writeTool({
|
|
529
531
|
tools,
|
|
530
532
|
name: "model.create",
|
|
533
|
+
search: { intents: ["新建模型", "建模型", "创建模型", "建模"] },
|
|
531
534
|
lane: MODEL_LANE,
|
|
532
535
|
scope: MODEL_TOOLS["model.create"].scope,
|
|
533
536
|
description: MODEL_TOOLS["model.create"].description,
|
|
@@ -753,6 +756,7 @@ export function registerModelLane(tools) {
|
|
|
753
756
|
writeTool({
|
|
754
757
|
tools,
|
|
755
758
|
name: "model.delete",
|
|
759
|
+
search: { intents: ["删除模型", "删模型"] },
|
|
756
760
|
lane: MODEL_LANE,
|
|
757
761
|
scope: MODEL_TOOLS["model.delete"].scope,
|
|
758
762
|
description: MODEL_TOOLS["model.delete"].description,
|
|
@@ -920,6 +924,7 @@ export function registerModelLane(tools) {
|
|
|
920
924
|
writeTool({
|
|
921
925
|
tools,
|
|
922
926
|
name: "model.deleteMany",
|
|
927
|
+
search: { intents: ["批量删除模型", "一次删掉多个模型", "清掉这些模型"] },
|
|
923
928
|
lane: MODEL_LANE,
|
|
924
929
|
scope: MODEL_TOOLS["model.deleteMany"].scope,
|
|
925
930
|
description: MODEL_TOOLS["model.deleteMany"].description,
|
|
@@ -1064,6 +1069,7 @@ export function registerModelLane(tools) {
|
|
|
1064
1069
|
writeTool({
|
|
1065
1070
|
tools,
|
|
1066
1071
|
name: "model.setSummary",
|
|
1072
|
+
search: { intents: ["设置数据标题", "改数据标题", "配置模型的数据标题"] },
|
|
1067
1073
|
lane: MODEL_LANE,
|
|
1068
1074
|
scope: MODEL_TOOLS["model.setSummary"].scope,
|
|
1069
1075
|
description: MODEL_TOOLS["model.setSummary"].description,
|
|
@@ -1104,6 +1110,7 @@ export function registerModelLane(tools) {
|
|
|
1104
1110
|
writeTool({
|
|
1105
1111
|
tools,
|
|
1106
1112
|
name: "model.update",
|
|
1113
|
+
search: { intents: ["模型改名", "改模型名称", "重命名模型", "更新模型信息"] },
|
|
1107
1114
|
lane: MODEL_LANE,
|
|
1108
1115
|
scope: MODEL_TOOLS["model.update"].scope,
|
|
1109
1116
|
description: MODEL_TOOLS["model.update"].description,
|
|
@@ -1193,6 +1200,7 @@ export function registerModelLane(tools) {
|
|
|
1193
1200
|
writeTool({
|
|
1194
1201
|
tools,
|
|
1195
1202
|
name: "model.move",
|
|
1203
|
+
search: { intents: ["挪到另一个分组", "换分组", "移到别的目录", "模型挪位置"] },
|
|
1196
1204
|
lane: MODEL_LANE,
|
|
1197
1205
|
scope: "move a model's app-tree node to another folder (bizmodels/update parentId)",
|
|
1198
1206
|
description: "把模型在**同一应用内**移动到指定目录(分组):`POST bizmodels/update` 的 `parentId`(与 model.update 同一端点,AppFunctionController 补丁语义:bizSchemaCode/id/name/parentId 全量必填,工具从应用树解析)。" +
|
|
@@ -1281,6 +1289,7 @@ export function registerModelLane(tools) {
|
|
|
1281
1289
|
});
|
|
1282
1290
|
registerPackageTool(tools, {
|
|
1283
1291
|
name: "configure_model",
|
|
1292
|
+
search: { intents: ["配置模型"] },
|
|
1284
1293
|
lane: MODEL_LANE,
|
|
1285
1294
|
scope: MODEL_TOOLS["configure_model"].scope,
|
|
1286
1295
|
description: MODEL_TOOLS["configure_model"].description,
|
package/dist/lanes/online-js.js
CHANGED
|
@@ -58,6 +58,7 @@ function readCustomScriptSource(rawHtml) {
|
|
|
58
58
|
export function registerOnlineJsLane(tools) {
|
|
59
59
|
tools.push(defineTool({
|
|
60
60
|
name: "onlinejs.get",
|
|
61
|
+
search: { intents: ["查在线JS", "看脚本"] },
|
|
61
62
|
layer: "low",
|
|
62
63
|
kind: "read",
|
|
63
64
|
lane: ONLINE_JS_LANE,
|
|
@@ -101,6 +102,7 @@ export function registerOnlineJsLane(tools) {
|
|
|
101
102
|
writeTool({
|
|
102
103
|
tools,
|
|
103
104
|
name: "onlinejs.compose",
|
|
105
|
+
search: { intents: ["写在线JS", "配表单脚本", "在线JS脚本", "表单脚本"] },
|
|
104
106
|
lane: ONLINE_JS_LANE,
|
|
105
107
|
scope: ONLINE_JS_TOOLS["onlinejs.compose"].scope,
|
|
106
108
|
description: ONLINE_JS_TOOLS["onlinejs.compose"].description,
|
|
@@ -354,6 +354,7 @@ async function rolesInGroup(session, roleGroupId) {
|
|
|
354
354
|
export function registerOrganizationLane(tools) {
|
|
355
355
|
tools.push(defineTool({
|
|
356
356
|
name: "org.role.users",
|
|
357
|
+
search: { intents: ["角色下有哪些人", "看角色成员", "查角色里的人"] },
|
|
357
358
|
layer: "low",
|
|
358
359
|
kind: "read",
|
|
359
360
|
lane: LANE,
|
|
@@ -434,6 +435,7 @@ export function registerOrganizationLane(tools) {
|
|
|
434
435
|
}));
|
|
435
436
|
tools.push(defineTool({
|
|
436
437
|
name: "org.role.userScope",
|
|
438
|
+
search: { intents: ["看角色管理范围", "角色能管哪些部门", "查成员管理范围"] },
|
|
437
439
|
layer: "low",
|
|
438
440
|
kind: "read",
|
|
439
441
|
lane: LANE,
|
|
@@ -470,6 +472,7 @@ export function registerOrganizationLane(tools) {
|
|
|
470
472
|
writeTool({
|
|
471
473
|
tools,
|
|
472
474
|
name: "org.roleGroup.create",
|
|
475
|
+
search: { intents: ["新建角色组", "建一个角色组", "创建角色分组"] },
|
|
473
476
|
lane: LANE,
|
|
474
477
|
scope: SCOPES.groupCreate,
|
|
475
478
|
description: "创建角色组(`POST organization/role/add_role_group`)。返回 roleGroupId,角色挂在它下面。**corpId 默认写当前企业**(`session.enterpriseId()`):平台的 `corpId` 只从 body 取,body 缺省时才按 parentId 反查企业设置,查不到就 NPE(被吞成 errcode 0);`corpId=\"other\"` 是平台合法的「非组织分组」语义,只有明确要建非组织分组时才传。**parentId 必填**:空值会 50000;根级组请传 `\"0\"`(真机 1.1.25 实测可建根级,path=组名、不挂在既有组下);挂到既有组下则传该组 id(`org.role.list` 的 groups[].id)。创建回执会再读一次 role/list,补上真实 `code`/`parentId`/`path`(平台 add 瞬间 code 常为 null)。",
|
|
@@ -518,6 +521,7 @@ export function registerOrganizationLane(tools) {
|
|
|
518
521
|
writeTool({
|
|
519
522
|
tools,
|
|
520
523
|
name: "org.role.create",
|
|
524
|
+
search: { intents: ["建角色", "新建角色", "创建角色"] },
|
|
521
525
|
lane: LANE,
|
|
522
526
|
scope: SCOPES.roleCreate,
|
|
523
527
|
description: "创建角色(界面「分组」;`POST organization/role/add_role`)。返回 roleId;code 创建时 null、随后补 SYS<时间戳>,要稳定编码就传 code。**所属角色组推荐用 `roleGroupCode`(如 SYS_1000000)**:`org.role.list` 的紧凑码表只给 `code|name`、不显示组 id,而平台对错的 roleGroupId **静默接受**——存进去的值不是真实组 id 时角色会变成看不见的孤儿(r70 实测:在库里、role/users 查得到,role/list 永不返回、role/get 50000)。工具会把 code 归一成真实 id,并在创建后回读可见性。",
|
|
@@ -614,6 +618,7 @@ export function registerOrganizationLane(tools) {
|
|
|
614
618
|
writeTool({
|
|
615
619
|
tools,
|
|
616
620
|
name: "org.department.create",
|
|
621
|
+
search: { intents: ["新建部门", "建一个部门", "加部门"] },
|
|
617
622
|
lane: LANE,
|
|
618
623
|
scope: SCOPES.deptCreate,
|
|
619
624
|
description: "新建部门(`POST organization/department/add`)。**1.1.25 平台强制 parentId**(省略会 200007「部门parentId不能为空!」)——省略时工具自动取部门树的第一个根部门作父级;deptType 传名字或 0..3(平台按 int 枚举反序列化,写 \"dept\" 会 10009)。返回 deptId。",
|
|
@@ -665,6 +670,7 @@ export function registerOrganizationLane(tools) {
|
|
|
665
670
|
writeTool({
|
|
666
671
|
tools,
|
|
667
672
|
name: "org.department.update",
|
|
673
|
+
search: { intents: ["改部门", "重命名部门", "调整部门信息", "换部门主管"] },
|
|
668
674
|
lane: LANE,
|
|
669
675
|
scope: SCOPES.deptUpdate,
|
|
670
676
|
description: "改部门(`POST organization/department/modefied`)。先 get_dept_info 读现状再合并提交,只传要改的字段(名称/上级/主管/排序/备注/启用)。",
|
|
@@ -698,6 +704,7 @@ export function registerOrganizationLane(tools) {
|
|
|
698
704
|
writeTool({
|
|
699
705
|
tools,
|
|
700
706
|
name: "org.department.delete",
|
|
707
|
+
search: { intents: ["删除部门", "删掉部门"] },
|
|
701
708
|
lane: LANE,
|
|
702
709
|
scope: SCOPES.deptDelete,
|
|
703
710
|
description: "删除部门(`GET organization/department/strike_out?id=`)。平台会拒绝:有子部门 → 200009「部门下面存在子部门,不能删除!」;有用户 → 200002「部门下面存在用户,不能删除!」。工具先计数并在回读里给出,仍由平台裁决。",
|
|
@@ -843,6 +850,7 @@ export function registerOrganizationLane(tools) {
|
|
|
843
850
|
});
|
|
844
851
|
tools.push(defineTool({
|
|
845
852
|
name: "org.department.users",
|
|
853
|
+
search: { intents: ["部门下有哪些人", "看部门成员", "查部门员工"] },
|
|
846
854
|
layer: "low", kind: "read", lane: LANE, scope: SCOPES.deptUsers,
|
|
847
855
|
description: "列出部门下的员工(`GET organization/department/list_user?deptId=`)。返回 members[{id(recId),name,username,mobile}]。",
|
|
848
856
|
inputSchema: { environment: environmentArg, deptId: z.string().min(1), capability: capabilityArg },
|
|
@@ -856,6 +864,7 @@ export function registerOrganizationLane(tools) {
|
|
|
856
864
|
writeTool({
|
|
857
865
|
tools,
|
|
858
866
|
name: "org.user.create",
|
|
867
|
+
search: { intents: ["新建员工", "加一个用户", "创建员工账号", "加人"] },
|
|
859
868
|
lane: LANE,
|
|
860
869
|
scope: SCOPES.userCreate,
|
|
861
870
|
description: "新建员工账号(`POST organization/user/add`)。必填 name/username/departmentId;工具自动补 `userLabelIds:[]`、`userManagerConfigList:[]`、`roleIds:[]` —— 平台 dealUserLabel 对 null 直接 NPE(50000,真机 1.1.25)。返回 userId(recId);初始密码由平台默认策略生成。",
|
|
@@ -911,6 +920,7 @@ export function registerOrganizationLane(tools) {
|
|
|
911
920
|
writeTool({
|
|
912
921
|
tools,
|
|
913
922
|
name: "org.user.update",
|
|
923
|
+
search: { intents: ["改员工信息", "修改用户资料", "更新员工"] },
|
|
914
924
|
lane: LANE,
|
|
915
925
|
scope: SCOPES.userUpdate,
|
|
916
926
|
description: "改员工(`POST organization/user/modify`)。先 user/info 读现状再合并;工具强制补 `deptIds:[]` 等四个数组——平台 modified 对 null 的 deptIds 直接 NPE(50000,真机 1.1.25)。可改姓名/部门/手机/邮箱/角色/启停。",
|
|
@@ -977,6 +987,7 @@ export function registerOrganizationLane(tools) {
|
|
|
977
987
|
writeTool({
|
|
978
988
|
tools,
|
|
979
989
|
name: "org.user.delete",
|
|
990
|
+
search: { intents: ["删除员工", "删掉这个用户", "移除账号"] },
|
|
980
991
|
lane: LANE,
|
|
981
992
|
scope: SCOPES.userDelete,
|
|
982
993
|
description: "删除员工(`GET organization/user/strike_out?id=`)。只传用户 id;返回 deleted。",
|
|
@@ -988,6 +999,7 @@ export function registerOrganizationLane(tools) {
|
|
|
988
999
|
});
|
|
989
1000
|
tools.push(defineTool({
|
|
990
1001
|
name: "org.user.info",
|
|
1002
|
+
search: { intents: ["看员工详情", "查用户信息", "读员工资料"] },
|
|
991
1003
|
layer: "low", kind: "read", lane: LANE, scope: SCOPES.userInfo,
|
|
992
1004
|
description: "读员工详情(`GET organization/user/info?id=`)。返回姓名/账号/部门/手机/邮箱/状态/角色 id 等。",
|
|
993
1005
|
inputSchema: { environment: environmentArg, userId: z.string().min(1), capability: capabilityArg },
|
|
@@ -1031,6 +1043,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1031
1043
|
}));
|
|
1032
1044
|
tools.push(defineTool({
|
|
1033
1045
|
name: "org.user.departments",
|
|
1046
|
+
search: { intents: ["员工在哪些部门", "查用户的部门", "看兼职部门"] },
|
|
1034
1047
|
layer: "low", kind: "read", lane: LANE, scope: SCOPES.userDepartments,
|
|
1035
1048
|
description: "读员工所属部门(含兼职,`GET organization/user/departments?id=`)。返回 departments[{deptId,deptName,isMain}]。",
|
|
1036
1049
|
inputSchema: { environment: environmentArg, userId: z.string().min(1), capability: capabilityArg },
|
|
@@ -1043,6 +1056,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1043
1056
|
writeTool({
|
|
1044
1057
|
tools,
|
|
1045
1058
|
name: "org.role.delete",
|
|
1059
|
+
search: { intents: ["删除角色", "删掉这个角色"] },
|
|
1046
1060
|
lane: LANE,
|
|
1047
1061
|
scope: SCOPES.roleDelete,
|
|
1048
1062
|
description: "删除角色(`GET organization/role/strike_out_role?ids=`)。平台**拒绝删除仍有成员的角色**(`-1 角色下已经包含用户数据!`,实测 1.1.25):默认先读成员并拒绝;拒绝回执带可直接粘贴的 `org.role.removeUsers` 命令。`force:true` 的语义是**先逐人移出全部成员,再删除角色**(不是强行绕过平台校验)。**可用 roleCode 代替 roleId**(org.role.list 的码表只有 code)。",
|
|
@@ -1069,6 +1083,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1069
1083
|
writeTool({
|
|
1070
1084
|
tools,
|
|
1071
1085
|
name: "org.roleGroup.delete",
|
|
1086
|
+
search: { intents: ["删除角色组", "删掉角色分组"] },
|
|
1072
1087
|
lane: LANE,
|
|
1073
1088
|
scope: SCOPES.roleGroupDelete,
|
|
1074
1089
|
description: "删除角色组(`GET organization/role/strike_out_role_group?ids=`)。平台**拒绝删除仍含角色的组**(`-1 角色组下已经包含角色数据!`):默认先数角色、非空即拒绝;`force:true` 会逐个删角色(含其成员)再删组。",
|
|
@@ -1097,6 +1112,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1097
1112
|
writeTool({
|
|
1098
1113
|
tools,
|
|
1099
1114
|
name: "org.user.transferDepartment",
|
|
1115
|
+
search: { intents: ["员工转到别的部门", "把人调走", "调岗", "转部门"] },
|
|
1100
1116
|
lane: LANE,
|
|
1101
1117
|
scope: SCOPES.userTransfer,
|
|
1102
1118
|
description: "把员工从一个部门移到另一个部门(`POST organization/user/dept_transfer`,body `{userIds,sourceDept,targetDept}`)。sourceDept 必填(缺它 50000);移动后原部门不再包含该员工,主部门保持。",
|
|
@@ -1119,6 +1135,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1119
1135
|
writeTool({
|
|
1120
1136
|
tools,
|
|
1121
1137
|
name: "org.role.update",
|
|
1138
|
+
search: { intents: ["改角色", "重命名角色", "修改角色信息", "换角色组"] },
|
|
1122
1139
|
lane: LANE,
|
|
1123
1140
|
scope: SCOPES.roleUpdate,
|
|
1124
1141
|
description: "改角色名称/编码/备注/所属角色组(`POST organization/role/modify_role`)。先读现状再提交,只传要改的字段。**平台要求 roleGroupId 必填**(缺则 202012「角色组主键Id不能为空」),工具默认回填当前组;**corpId 不可改**(RoleHelper.update 不读该字段),要换企业只能在目标企业下重建角色。",
|
|
@@ -1172,6 +1189,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1172
1189
|
writeTool({
|
|
1173
1190
|
tools,
|
|
1174
1191
|
name: "org.role.addUsers",
|
|
1192
|
+
search: { intents: ["给角色加用户", "角色加成员", "给角色加人"] },
|
|
1175
1193
|
lane: LANE,
|
|
1176
1194
|
scope: SCOPES.addUsers,
|
|
1177
1195
|
description: "加成员并(可选)一次设好管理范围(`add_role_user` + 逐人 `update_ouscope`,一个工具调用)。users[].id 必须是 recId(org.user.search 的 id);传 `scopes` 会应用到本次新增的每个人。**平台的 add_role_user 虽然收 `ouScope` 但会忽略它**(实测 1.1.25,回读仍为空),所以范围必须单独写——工具内部已按顺序完成。加完回读成员与范围。",
|
|
@@ -1254,6 +1272,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1254
1272
|
writeTool({
|
|
1255
1273
|
tools,
|
|
1256
1274
|
name: "org.role.removeUsers",
|
|
1275
|
+
search: { intents: ["把角色里的用户移掉", "角色移除用户"] },
|
|
1257
1276
|
lane: LANE,
|
|
1258
1277
|
scope: SCOPES.removeUsers,
|
|
1259
1278
|
description: "把成员移出角色(`POST organization/role/strike_out_role_user`)。**平台要求 JSON body `{roleId,userIds:[...]}`**——用 query 或 `ids` 会报 10009 `Required request body is missing`(实测 1.1.25)。只移出角色,不删用户。",
|
|
@@ -1282,6 +1301,7 @@ export function registerOrganizationLane(tools) {
|
|
|
1282
1301
|
writeTool({
|
|
1283
1302
|
tools,
|
|
1284
1303
|
name: "org.role.setUserScope",
|
|
1304
|
+
search: { intents: ["设置管理范围", "配角色管辖部门", "改成员管理范围"] },
|
|
1285
1305
|
lane: LANE,
|
|
1286
1306
|
scope: SCOPES.setScope,
|
|
1287
1307
|
description: "设置成员管理范围(`POST organization/role/update_ouscope`)。**不是枚举档位**(本人/本部门/本部门及下级/全部这类平台没有):scopes 是一组部门节点的自由列表。平台覆盖语义、无回滚:默认读旧值合并(mode:\"merge\"),mode:\"replace\" 才整体替换。**类型对照表**:setUserScope 的 unitType 传数字 3;addUsers 的 unitType 传字符串 \"3\";节点 type 传字符串 \"1\"(部门节点)。最小可跑示例:`{\"roleCode\":\"X\",\"userId\":\"<recId>\",\"scopes\":[{\"id\":\"<deptId>\",\"name\":\"<deptName>\",\"type\":\"1\"}]}`。",
|
package/dist/lanes/perm.js
CHANGED
|
@@ -192,7 +192,7 @@ export function authSummary(data) {
|
|
|
192
192
|
}
|
|
193
193
|
function scopesFor(data) { return rows(data); }
|
|
194
194
|
export function registerPermLane(tools) {
|
|
195
|
-
tools.push(defineTool({ name: "perm.groups", layer: "low", kind: "read", lane: PERM_LANE, scope: PERM_TOOLS["perm.groups"].scope, description: PERM_TOOLS["perm.groups"].description, inputSchema: { environment: environmentArg, capability: capabilityArg, appCode: z.string().min(1), groupId: z.string().optional(), schemaCode: z.string().optional(), unitId: z.string().optional(), unitType: z.number().int().min(1).max(3).optional() }, handler: async (ctx, args, self) => governedRead(ctx, self, args, async (session) => {
|
|
195
|
+
tools.push(defineTool({ name: "perm.groups", layer: "low", kind: "read", lane: PERM_LANE, scope: PERM_TOOLS["perm.groups"].scope, description: PERM_TOOLS["perm.groups"].description, search: { intents: ["有哪些权限组", "看应用权限包", "权限组清单"] }, inputSchema: { environment: environmentArg, capability: capabilityArg, appCode: z.string().min(1), groupId: z.string().optional(), schemaCode: z.string().optional(), unitId: z.string().optional(), unitType: z.number().int().min(1).max(3).optional() }, handler: async (ctx, args, self) => governedRead(ctx, self, args, async (session) => {
|
|
196
196
|
if (args.groupId || !args.unitId) {
|
|
197
197
|
const path = args.groupId ? ENDPOINTS.permissionGroup : ENDPOINTS.permissionAppPackage;
|
|
198
198
|
const query = args.groupId ? { id: args.groupId, appCode: args.appCode } : { appCode: args.appCode };
|
|
@@ -229,7 +229,7 @@ export function registerPermLane(tools) {
|
|
|
229
229
|
}
|
|
230
230
|
return { unitId: args.unitId, unitType: args.unitType, appCode: args.appCode, groups: permissionGroupRows(data).map(groupView) };
|
|
231
231
|
}) }));
|
|
232
|
-
writeTool({ tools, name: "perm.group", lane: PERM_LANE, scope: PERM_TOOLS["perm.group"].scope, description: PERM_TOOLS["perm.group"].description, inputSchema: { appCode: z.string().min(1), action: z.enum(["create", "update", "delete", "status"]), id: z.string().optional(), name: z.string().optional(), code: z.string().optional(), enabled: z.boolean().optional(), internalUser: z.boolean().optional(), externalUser: z.boolean().optional(), remarks: z.string().optional() }, execute: async (session, args) => {
|
|
232
|
+
writeTool({ tools, name: "perm.group", lane: PERM_LANE, scope: PERM_TOOLS["perm.group"].scope, description: PERM_TOOLS["perm.group"].description, search: { intents: ["新建权限组", "改权限组", "删除权限组", "启用/停用权限组"] }, inputSchema: { appCode: z.string().min(1), action: z.enum(["create", "update", "delete", "status"]), id: z.string().optional(), name: z.string().optional(), code: z.string().optional(), enabled: z.boolean().optional(), internalUser: z.boolean().optional(), externalUser: z.boolean().optional(), remarks: z.string().optional() }, execute: async (session, args) => {
|
|
233
233
|
const action = args.action;
|
|
234
234
|
const id = args.id;
|
|
235
235
|
const read = async (gid) => (await wireCall(session, { path: ENDPOINTS.permissionGroup, method: "GET", query: { id: gid, appCode: args.appCode } })).data;
|
|
@@ -274,7 +274,7 @@ export function registerPermLane(tools) {
|
|
|
274
274
|
const result = (performed.data && typeof performed.data === "object" ? performed.data : body);
|
|
275
275
|
return { performed: { errcode: performed.errcode, action }, readback: (await read(String(result.id ?? id ?? ""))) };
|
|
276
276
|
} });
|
|
277
|
-
tools.push(defineTool({ name: "perm.user", layer: "low", kind: "read", lane: PERM_LANE, scope: PERM_TOOLS["perm.user"].scope, description: PERM_TOOLS["perm.user"].description, inputSchema: { environment: environmentArg, capability: capabilityArg, userId: z.string().min(1), appCode: z.string().min(1), schemaCode: z.string().optional() }, handler: async (ctx, args, self) => governedRead(ctx, self, args, async (session) => {
|
|
277
|
+
tools.push(defineTool({ name: "perm.user", layer: "low", kind: "read", lane: PERM_LANE, scope: PERM_TOOLS["perm.user"].scope, description: PERM_TOOLS["perm.user"].description, search: { intents: ["某人有哪些权限", "查用户权限", "看这个人的权限"] }, inputSchema: { environment: environmentArg, capability: capabilityArg, userId: z.string().min(1), appCode: z.string().min(1), schemaCode: z.string().optional() }, handler: async (ctx, args, self) => governedRead(ctx, self, args, async (session) => {
|
|
278
278
|
let data;
|
|
279
279
|
try {
|
|
280
280
|
data = (await wireCall(session, { path: ENDPOINTS.permissionMergeGroups, method: "POST", body: { unitId: args.userId, unitType: 3, appCode: args.appCode, ...(args.schemaCode ? { schemaCode: args.schemaCode } : {}) } })).data;
|
|
@@ -288,8 +288,8 @@ export function registerPermLane(tools) {
|
|
|
288
288
|
const adminBypass = bool(first(data, "adminBypass", "administrator", "isAdmin", "isAdministrator"));
|
|
289
289
|
return { userId: args.userId, appCode: args.appCode, adminBypass, ...(adminBypass ? { adminNotice: "管理员会话恒通过,不代表普通用户;本回执是管理员旁路标记。" } : {}), app: { visible: bool(first(data, "visible", "appVisible")), administrator: bool(first(data, "administrator", "isAdministrator")), allVisible: bool(first(data, "allVisible")) }, models: authSummary(data).models, fields: args.schemaCode ? authSummary(data).fields : [], rowLevel: authSummary(data).rowLevel, layers: { configResolvable: true, runtimeSessionRequired: "真实 load/write 判定受对象权限/业务调用/临时流程授权影响——本工具拒绝单值 allow/deny;验证走目标用户会话或 data.load 双读" } };
|
|
290
290
|
}) }));
|
|
291
|
-
writeTool({ tools, name: "perm.assign", lane: PERM_LANE, scope: PERM_TOOLS["perm.assign"].scope, description: PERM_TOOLS["perm.assign"].description, inputSchema: { appCode: z.string().min(1), groupId: z.string().min(1), units: z.array(z.object({ type: z.enum(["DEPT", "ROLE", "USER"]), id: z.string().min(1), name: z.string().optional() })).min(1), mode: z.enum(["assign", "revoke"]) }, execute: async (session, args) => { const unitType = { DEPT: 1, ROLE: 2, USER: 3 }[args.units[0].type]; const units = args.units.map((u) => ({ unitId: u.id, unitType: { DEPT: 1, ROLE: 2, USER: 3 }[u.type], name: u.name ?? "", corpId: session.enterpriseId(), appCode: args.appCode, groupId: args.groupId })); const body = args.mode === "assign" ? { permissionGroupUnits: units, permGroupInfos: [{ appCode: args.appCode, permGroupId: args.groupId }] } : { permGroupIds: [args.groupId], unitIds: args.units.map((u) => u.id), permissionGroupUnits: units, permGroupInfos: [{ appCode: args.appCode, permGroupId: args.groupId }] }; const before = (await wireCall(session, { path: ENDPOINTS.permissionGroup, method: "GET", query: { id: args.groupId, appCode: args.appCode } })).data; const performed = await wireCall(session, { path: args.mode === "assign" ? ENDPOINTS.permissionAssign : ENDPOINTS.permissionRevoke, method: "POST", body }); const after = (await wireCall(session, { path: ENDPOINTS.permissionGroup, method: "GET", query: { id: args.groupId, appCode: args.appCode } })).data; const listAfter = (await wireCall(session, { path: ENDPOINTS.permissionGroupUnits, method: "POST", body: { ...units[0], unitType, appCode: args.appCode, corpId: session.enterpriseId() } })).data; return { performed: { errcode: performed.errcode, mode: args.mode }, readback: { groups: permissionGroupRows(listAfter).map(groupView), source: "post-write listPermissionGroups readback (not write echo)", diff: { before: projectMembers(before), after: projectMembers(after) } } }; } });
|
|
292
|
-
writeTool({ tools, name: "perm.auth", lane: PERM_LANE, scope: PERM_TOOLS["perm.auth"].scope, description: PERM_TOOLS["perm.auth"].description, inputSchema: { appCode: z.string().min(1), groupId: z.string().min(1), grants: z.array(z.object({ schemaCode: z.string().min(1), visible: z.object({ pc: z.boolean(), mobile: z.boolean() }).optional(), rowLevel: z.object({ type: z.number().int().min(1).max(6).describe("1=全部可见,2=本部门,3=仅自己,4=自定义(须 conditions),5=角色管理范围,6=均不可见"), conditions: z.array(z.array(z.unknown())).optional() }).optional(), properties: z.array(z.object({ propertyCode: z.string().optional(), schemaCode: z.string().optional().describe("可省略,继承 grants.schemaCode"), visible: z.boolean().optional(), writeAble: z.boolean().optional(), decryptAble: z.boolean().optional() })).optional(), actions: z.object({ view: z.array(z.string()).optional(), form: z.array(z.string()).optional() }).optional() })).min(1), mode: z.enum(["merge"]).default("merge") }, preflight: (args) => validateGrants(args.grants), execute: async (session, args) => { const group = (await wireCall(session, { path: ENDPOINTS.permissionGroup, method: "GET", query: { id: args.groupId, appCode: args.appCode } })).data; const existing = permissionRecords(group); const mergedRecords = []; const beforeRecords = []; for (const grant of args.grants) {
|
|
291
|
+
writeTool({ tools, name: "perm.assign", lane: PERM_LANE, scope: PERM_TOOLS["perm.assign"].scope, description: PERM_TOOLS["perm.assign"].description, search: { intents: ["把部门加到权限组", "授权权限组", "给权限组加成员"] }, inputSchema: { appCode: z.string().min(1), groupId: z.string().min(1), units: z.array(z.object({ type: z.enum(["DEPT", "ROLE", "USER"]), id: z.string().min(1), name: z.string().optional() })).min(1), mode: z.enum(["assign", "revoke"]) }, execute: async (session, args) => { const unitType = { DEPT: 1, ROLE: 2, USER: 3 }[args.units[0].type]; const units = args.units.map((u) => ({ unitId: u.id, unitType: { DEPT: 1, ROLE: 2, USER: 3 }[u.type], name: u.name ?? "", corpId: session.enterpriseId(), appCode: args.appCode, groupId: args.groupId })); const body = args.mode === "assign" ? { permissionGroupUnits: units, permGroupInfos: [{ appCode: args.appCode, permGroupId: args.groupId }] } : { permGroupIds: [args.groupId], unitIds: args.units.map((u) => u.id), permissionGroupUnits: units, permGroupInfos: [{ appCode: args.appCode, permGroupId: args.groupId }] }; const before = (await wireCall(session, { path: ENDPOINTS.permissionGroup, method: "GET", query: { id: args.groupId, appCode: args.appCode } })).data; const performed = await wireCall(session, { path: args.mode === "assign" ? ENDPOINTS.permissionAssign : ENDPOINTS.permissionRevoke, method: "POST", body }); const after = (await wireCall(session, { path: ENDPOINTS.permissionGroup, method: "GET", query: { id: args.groupId, appCode: args.appCode } })).data; const listAfter = (await wireCall(session, { path: ENDPOINTS.permissionGroupUnits, method: "POST", body: { ...units[0], unitType, appCode: args.appCode, corpId: session.enterpriseId() } })).data; return { performed: { errcode: performed.errcode, mode: args.mode }, readback: { groups: permissionGroupRows(listAfter).map(groupView), source: "post-write listPermissionGroups readback (not write echo)", diff: { before: projectMembers(before), after: projectMembers(after) } } }; } });
|
|
292
|
+
writeTool({ tools, name: "perm.auth", lane: PERM_LANE, scope: PERM_TOOLS["perm.auth"].scope, description: PERM_TOOLS["perm.auth"].description, search: { intents: ["配模型权限", "设行级权限", "配数据权限"] }, inputSchema: { appCode: z.string().min(1), groupId: z.string().min(1), grants: z.array(z.object({ schemaCode: z.string().min(1), visible: z.object({ pc: z.boolean(), mobile: z.boolean() }).optional(), rowLevel: z.object({ type: z.number().int().min(1).max(6).describe("1=全部可见,2=本部门,3=仅自己,4=自定义(须 conditions),5=角色管理范围,6=均不可见"), conditions: z.array(z.array(z.unknown())).optional() }).optional(), properties: z.array(z.object({ propertyCode: z.string().optional(), schemaCode: z.string().optional().describe("可省略,继承 grants.schemaCode"), visible: z.boolean().optional(), writeAble: z.boolean().optional(), decryptAble: z.boolean().optional() })).optional(), actions: z.object({ view: z.array(z.string()).optional(), form: z.array(z.string()).optional() }).optional() })).min(1), mode: z.enum(["merge"]).default("merge") }, preflight: (args) => validateGrants(args.grants), execute: async (session, args) => { const group = (await wireCall(session, { path: ENDPOINTS.permissionGroup, method: "GET", query: { id: args.groupId, appCode: args.appCode } })).data; const existing = permissionRecords(group); const mergedRecords = []; const beforeRecords = []; for (const grant of args.grants) {
|
|
293
293
|
const prior = existing.find((record) => String(first(record, "schemaCode", "functionCode") ?? "") === grant.schemaCode);
|
|
294
294
|
if (!prior)
|
|
295
295
|
throw new ToolRefusalError({ status: "refused", blocker: "permission-target-model-unknown", message: `权限组中不存在模型 ${grant.schemaCode};候选:${existing.map((record) => String(first(record, "schemaCode", "functionCode") ?? "")).filter(Boolean).join(", ")}` });
|
|
@@ -248,6 +248,7 @@ function publishRollback() {
|
|
|
248
248
|
export function registerProgrammingLane(tools) {
|
|
249
249
|
tools.push(defineTool({
|
|
250
250
|
name: "programming.schemas",
|
|
251
|
+
search: { intents: ["有哪些模型有在线源码", "模型有源码", "在线源码模型清单", "哪些模型写了在线代码", "有在线代码的模型"] },
|
|
251
252
|
layer: "low",
|
|
252
253
|
kind: "read",
|
|
253
254
|
lane: LANE,
|
|
@@ -273,6 +274,7 @@ export function registerProgrammingLane(tools) {
|
|
|
273
274
|
}));
|
|
274
275
|
tools.push(defineTool({
|
|
275
276
|
name: "programming.sources",
|
|
277
|
+
search: { intents: ["模型下在线源码", "在线源码清单", "源码列表"] },
|
|
276
278
|
layer: "low",
|
|
277
279
|
kind: "read",
|
|
278
280
|
lane: LANE,
|
|
@@ -316,6 +318,7 @@ export function registerProgrammingLane(tools) {
|
|
|
316
318
|
}));
|
|
317
319
|
tools.push(defineTool({
|
|
318
320
|
name: "programming.get",
|
|
321
|
+
search: { intents: ["在线开发", "后端在线开发", "写后端代码"] },
|
|
319
322
|
layer: "low",
|
|
320
323
|
kind: "read",
|
|
321
324
|
lane: LANE,
|
|
@@ -369,6 +372,7 @@ export function registerProgrammingLane(tools) {
|
|
|
369
372
|
}));
|
|
370
373
|
tools.push(defineTool({
|
|
371
374
|
name: "programming.compile",
|
|
375
|
+
search: { intents: ["编译检查", "编译源码", "检查源码能不能编译"] },
|
|
372
376
|
layer: "low",
|
|
373
377
|
kind: "read",
|
|
374
378
|
lane: LANE,
|
|
@@ -424,6 +428,7 @@ export function registerProgrammingLane(tools) {
|
|
|
424
428
|
writeTool({
|
|
425
429
|
tools,
|
|
426
430
|
name: "programming.save",
|
|
431
|
+
search: { intents: ["保存源码草稿", "存 Java 源码", "改后端源码"] },
|
|
427
432
|
lane: LANE,
|
|
428
433
|
scope: TOOLS["programming.save"].scope,
|
|
429
434
|
description: TOOLS["programming.save"].description,
|
|
@@ -510,6 +515,7 @@ export function registerProgrammingLane(tools) {
|
|
|
510
515
|
writeTool({
|
|
511
516
|
tools,
|
|
512
517
|
name: "programming.publish",
|
|
518
|
+
search: { intents: ["发布源码", "把后端代码发出去", "发布在线开发代码"] },
|
|
513
519
|
lane: LANE,
|
|
514
520
|
scope: TOOLS["programming.publish"].scope,
|
|
515
521
|
description: TOOLS["programming.publish"].description,
|
package/dist/lanes/report.js
CHANGED
|
@@ -265,6 +265,7 @@ function chartParamModel(chart) {
|
|
|
265
265
|
export function registerReportLane(tools) {
|
|
266
266
|
tools.push(defineTool({
|
|
267
267
|
name: "report.tree",
|
|
268
|
+
search: { intents: ["报表目录", "有哪些报表", "报表树", "列出报表页"] },
|
|
268
269
|
layer: "low",
|
|
269
270
|
kind: "read",
|
|
270
271
|
lane: LANE,
|
|
@@ -282,6 +283,7 @@ export function registerReportLane(tools) {
|
|
|
282
283
|
}));
|
|
283
284
|
tools.push(defineTool({
|
|
284
285
|
name: "report.get",
|
|
286
|
+
search: { intents: ["看报表详情", "查报表配置", "读报表元数据"] },
|
|
285
287
|
layer: "low",
|
|
286
288
|
kind: "read",
|
|
287
289
|
lane: LANE,
|
|
@@ -314,6 +316,7 @@ export function registerReportLane(tools) {
|
|
|
314
316
|
}));
|
|
315
317
|
tools.push(defineTool({
|
|
316
318
|
name: "report.chartdata",
|
|
319
|
+
search: { intents: ["查报表数据", "报表数据", "图表数据"] },
|
|
317
320
|
layer: "low",
|
|
318
321
|
kind: "read",
|
|
319
322
|
lane: LANE,
|
|
@@ -343,6 +346,7 @@ export function registerReportLane(tools) {
|
|
|
343
346
|
}));
|
|
344
347
|
tools.push(defineTool({
|
|
345
348
|
name: "report.datasource.list",
|
|
349
|
+
search: { intents: ["报表有哪些数据集", "查报表数据源", "看可用数据集"] },
|
|
346
350
|
layer: "low",
|
|
347
351
|
kind: "read",
|
|
348
352
|
lane: LANE,
|
|
@@ -375,6 +379,7 @@ export function registerReportLane(tools) {
|
|
|
375
379
|
writeTool({
|
|
376
380
|
tools,
|
|
377
381
|
name: "report.datasource.link",
|
|
382
|
+
search: { intents: ["给报表关联数据集", "把数据集挂到报表", "绑定报表数据源"] },
|
|
378
383
|
lane: LANE,
|
|
379
384
|
scope: TOOLS["report.datasource.link"].scope,
|
|
380
385
|
description: TOOLS["report.datasource.link"].description,
|
|
@@ -410,6 +415,7 @@ export function registerReportLane(tools) {
|
|
|
410
415
|
writeTool({
|
|
411
416
|
tools,
|
|
412
417
|
name: "report.create",
|
|
418
|
+
search: { intents: ["建报表", "新建报表", "创建报表", "建图表"] },
|
|
413
419
|
lane: LANE,
|
|
414
420
|
scope: TOOLS["report.create"].scope,
|
|
415
421
|
description: TOOLS["report.create"].description,
|
|
@@ -513,6 +519,7 @@ export function registerReportLane(tools) {
|
|
|
513
519
|
writeTool({
|
|
514
520
|
tools,
|
|
515
521
|
name: "report.update",
|
|
522
|
+
search: { intents: ["改报表", "重命名报表", "更新报表信息"] },
|
|
516
523
|
lane: LANE,
|
|
517
524
|
scope: TOOLS["report.update"].scope,
|
|
518
525
|
description: TOOLS["report.update"].description,
|
|
@@ -553,6 +560,7 @@ export function registerReportLane(tools) {
|
|
|
553
560
|
writeTool({
|
|
554
561
|
tools,
|
|
555
562
|
name: "report.delete",
|
|
563
|
+
search: { intents: ["删除报表", "删掉报表页"] },
|
|
556
564
|
lane: LANE,
|
|
557
565
|
scope: TOOLS["report.delete"].scope,
|
|
558
566
|
description: TOOLS["report.delete"].description,
|
|
@@ -623,6 +631,7 @@ export function registerReportLane(tools) {
|
|
|
623
631
|
writeTool({
|
|
624
632
|
tools,
|
|
625
633
|
name: "report.configure",
|
|
634
|
+
search: { intents: ["配置报表", "画图表", "设置报表图表"] },
|
|
626
635
|
lane: LANE,
|
|
627
636
|
scope: TOOLS["report.configure"].scope,
|
|
628
637
|
description: TOOLS["report.configure"].description,
|
|
@@ -189,6 +189,7 @@ export function registerRuleLifecycleLane(tools) {
|
|
|
189
189
|
writeTool({
|
|
190
190
|
tools,
|
|
191
191
|
name: "rule.enable",
|
|
192
|
+
search: { intents: ["启用规则"] },
|
|
192
193
|
lane: RULE_LIFECYCLE_LANE,
|
|
193
194
|
scope: RULE_LIFECYCLE_TOOLS["rule.enable"].scope,
|
|
194
195
|
description: RULE_LIFECYCLE_TOOLS["rule.enable"].description,
|
|
@@ -199,6 +200,7 @@ export function registerRuleLifecycleLane(tools) {
|
|
|
199
200
|
writeTool({
|
|
200
201
|
tools,
|
|
201
202
|
name: "rule.disable",
|
|
203
|
+
search: { intents: ["停用规则", "关掉这条规则", "禁用业务规则"] },
|
|
202
204
|
lane: RULE_LIFECYCLE_LANE,
|
|
203
205
|
scope: RULE_LIFECYCLE_TOOLS["rule.disable"].scope,
|
|
204
206
|
description: RULE_LIFECYCLE_TOOLS["rule.disable"].description,
|
|
@@ -274,6 +276,7 @@ export function registerRuleLifecycleLane(tools) {
|
|
|
274
276
|
writeTool({
|
|
275
277
|
tools,
|
|
276
278
|
name: "rule.delete",
|
|
279
|
+
search: { intents: ["删除规则", "删掉业务规则"] },
|
|
277
280
|
lane: RULE_LIFECYCLE_LANE,
|
|
278
281
|
scope: RULE_LIFECYCLE_TOOLS["rule.delete"].scope,
|
|
279
282
|
description: RULE_LIFECYCLE_TOOLS["rule.delete"].description,
|
|
@@ -307,6 +310,7 @@ export function registerRuleLifecycleLane(tools) {
|
|
|
307
310
|
writeTool({
|
|
308
311
|
tools,
|
|
309
312
|
name: "rule.run",
|
|
313
|
+
search: { intents: ["手动执行规则", "跑一下这条规则", "触发规则执行", "点按钮执行规则"] },
|
|
310
314
|
lane: RULE_LIFECYCLE_LANE,
|
|
311
315
|
scope: RULE_LIFECYCLE_TOOLS["rule.run"].scope,
|
|
312
316
|
description: RULE_LIFECYCLE_TOOLS["rule.run"].description,
|
|
@@ -413,6 +417,7 @@ export function registerRuleLifecycleLane(tools) {
|
|
|
413
417
|
writeTool({
|
|
414
418
|
tools,
|
|
415
419
|
name: "rule.disableMany",
|
|
420
|
+
search: { intents: ["批量停用规则", "把这个模型的规则都停掉", "一次关掉多条规则"] },
|
|
416
421
|
lane: RULE_LIFECYCLE_LANE,
|
|
417
422
|
scope: RULE_LIFECYCLE_TOOLS["rule.disableMany"].scope,
|
|
418
423
|
description: RULE_LIFECYCLE_TOOLS["rule.disableMany"].description,
|
|
@@ -455,6 +460,7 @@ export function registerRuleLifecycleLane(tools) {
|
|
|
455
460
|
});
|
|
456
461
|
registerPackageTool(tools, {
|
|
457
462
|
name: "configure_rule",
|
|
463
|
+
search: { intents: ["保存并启用规则", "建规则并直接启用", "一步建好规则"] },
|
|
458
464
|
lane: RULE_LIFECYCLE_LANE,
|
|
459
465
|
scope: RULE_LIFECYCLE_TOOLS.configure_rule.scope,
|
|
460
466
|
description: RULE_LIFECYCLE_TOOLS.configure_rule.description,
|
package/dist/lanes/rulelog.js
CHANGED
|
@@ -11,6 +11,7 @@ const notes = [codingNote, "日志异步落库约 5 秒,未见不等于未触
|
|
|
11
11
|
export function registerRuleLogLane(tools) {
|
|
12
12
|
tools.push(defineTool({
|
|
13
13
|
name: "rulelog.search", layer: "low", kind: "read", lane: RULELOG_LANE_CONTRACT.lane,
|
|
14
|
+
search: { intents: ["规则执行日志", "规则日志", "执行日志", "查规则日志", "触发日志", "规则跑过没有"] },
|
|
14
15
|
scope: RULELOG_LANE_CONTRACT.tools["rulelog.search"].scope,
|
|
15
16
|
description: RULELOG_LANE_CONTRACT.tools["rulelog.search"].description,
|
|
16
17
|
inputSchema: {
|