@stalfh233/omc-cli 0.6.68 → 0.6.69
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 +4 -1
- package/dist/cli.js +8 -0
- package/dist/discovery.js +3 -0
- package/dist/goal-routes.js +7 -2
- package/dist/graph.js +17 -3
- package/dist/lanes/businessrule.js +30 -6
- package/dist/lanes/list-view-contract.js +1 -1
- package/dist/lanes/list-view-shapes.js +28 -19
- package/dist/lanes/list-view.js +10 -4
- package/dist/tool-types.js +2 -0
- package/package.json +3 -3
|
@@ -314,7 +314,10 @@ export const CAPABILITY_CUES = Object.freeze({
|
|
|
314
314
|
"oauth", "openapi", "client_credentials", "第三方", "外部调用", "外部系统", "invoke", "调用自定义规则", "返回值"],
|
|
315
315
|
bizservice: ["集成", "接口", "服务", "回调", "对接", "外部系统", "datasql", "restful"],
|
|
316
316
|
report: ["报表", "图表", "看板", "bi", "dashboard"],
|
|
317
|
-
|
|
317
|
+
// r73 #3(2026-11-17 复验观察):「列表数据 / 数据列表」是运行面取数的真实说法,
|
|
318
|
+
// 此前只命中 listview 的「列表」→ 路由给视图配置面(用户想查数据却拿到视图读写工具)。
|
|
319
|
+
// 复合词(不裸配「列表/数据」)避免抢「列表视图/视图列」;评分按 cue 长度,长词胜出。
|
|
320
|
+
data: ["运行数据", "提交数据", "保存记录", "查记录", "造数据", "测试数据", "测试单据", "造单据", "造单", "录数据", "填数据", "模拟数据", "业务数据", "造几条", "造两张", "造几张", "验数据", "批量导入", "批量写入", "批量删除", "导入数据", "列表数据", "数据列表", "查数据", "数据查询", "拉数据", "拉一份数据", "看看数据", "查一下数据", "数据明细", "取数据", "数据的列表", "数据列表页", "数据记录"],
|
|
318
321
|
// r18 (2026-10-26): "造数据 / 造测试单据 / 录数据" is the RUN-DATA capability, but
|
|
319
322
|
// the goal usually also says 子表/明细 (field cues) — without these compound
|
|
320
323
|
// cues the router sent the probe to `field` in read mode (write:false), so it
|
package/dist/cli.js
CHANGED
|
@@ -1413,6 +1413,14 @@ function cmdDiscovery(kind, transport, value, options = {}) {
|
|
|
1413
1413
|
// Zero hits: minimal envelope + up to three nearest candidates with an
|
|
1414
1414
|
// exact next command — NOT the full catalogue to re-read (r18: the empty
|
|
1415
1415
|
// match plus governance prose pushed the agent back to the 20 KB face).
|
|
1416
|
+
// r73 探针01-P2(2026-11-17):`--lane read` 这类不存在的 lane 回
|
|
1417
|
+
// tools:[] 且没有任何下一步——列合法 lane 清单,别让调用方全量拉再自己汇总。
|
|
1418
|
+
if (matched.length === 0 && options.lane !== undefined && semantic === undefined) {
|
|
1419
|
+
const availableLanes = [...new Set(registry.map((tool) => tool.lane).filter((lane) => typeof lane === "string").map((lane) => String(lane)))].sort();
|
|
1420
|
+
inventory.filtered.availableLanes = availableLanes;
|
|
1421
|
+
inventory.note = `--lane "${options.lane}" 没有工具(lane 名不区分大小写但必须是完整 id,形如 B1-businessrule / W1-list-view / M2-runtime-data)。合法 lane:${availableLanes.join("、")};能力→lane 映射用 omc capabilities(或 --filter <能力词> 按语义找)`;
|
|
1422
|
+
inventory.nextCommand = "omc capabilities";
|
|
1423
|
+
}
|
|
1416
1424
|
if (matched.length === 0 && semantic !== undefined) {
|
|
1417
1425
|
delete inventory.governance;
|
|
1418
1426
|
// r59 Step 1: candidates are CAPABILITIES, not tool names. The old
|
package/dist/discovery.js
CHANGED
|
@@ -53,6 +53,9 @@ export function commandInventory(registry, options = {}) {
|
|
|
53
53
|
// now a strict subset of the full catalogue.
|
|
54
54
|
return {
|
|
55
55
|
discovery: { authoritative: DISCOVERY_AUTHORITY.authoritative, route: DISCOVERY_AUTHORITY.route },
|
|
56
|
+
// r73 探针01-P2:compact 信封与完整面同形(total 恒在)——自写解析脚本
|
|
57
|
+
// 不该因为「紧凑面少一个计数键」而 KeyError 重试。
|
|
58
|
+
total: rows.length,
|
|
56
59
|
tools: rows,
|
|
57
60
|
};
|
|
58
61
|
}
|
package/dist/goal-routes.js
CHANGED
|
@@ -1241,7 +1241,12 @@ function goalRouteInner(registry, goal) {
|
|
|
1241
1241
|
// one exists) gives the arg SHAPE in ~1–2 KB; the lane bundle remains the
|
|
1242
1242
|
// fallback for tools with no recipe. In read/scout mode the steps list the
|
|
1243
1243
|
// READ tools instead — a read-back ask must not be answered with field.create.
|
|
1244
|
-
|
|
1244
|
+
// r73 #3(2026-11-17 复验观察):「查合同台账的列表数据」命中 listview(列表)+data
|
|
1245
|
+
// (列表数据),但读面阶梯按注册/依赖顺序排 → listview 抢到首步,用户想取数却先看到
|
|
1246
|
+
// 视图配置工具。读意图下各能力之间没有写依赖,按问句相关度(cue 得分)排首步;
|
|
1247
|
+
// 写意图仍按依赖顺序(model→field→form→…)不动。
|
|
1248
|
+
const routeOrder = readish ? [...ordered].sort((a, b) => (scoreMap.get(b) ?? 0) - (scoreMap.get(a) ?? 0)) : ordered;
|
|
1249
|
+
const ladder = routeOrder.map((id) => {
|
|
1245
1250
|
const capability = routeById.get(id);
|
|
1246
1251
|
if (readish) {
|
|
1247
1252
|
return { capability: id, lane: capability.lane, readTools: readToolsInLane(registry, capability.lane), firstCommand: `omc capability ${id}` };
|
|
@@ -1281,7 +1286,7 @@ function goalRouteInner(registry, goal) {
|
|
|
1281
1286
|
goal,
|
|
1282
1287
|
confident: true,
|
|
1283
1288
|
mode: whole ? "whole-package" : mode,
|
|
1284
|
-
match: { kind: readish ? "read-ladder" : "ladder", ref: `${
|
|
1289
|
+
match: { kind: readish ? "read-ladder" : "ladder", ref: `${routeOrder.join("→")}${routeOrder.includes("businessrule") && /累加|联动|审计|规则触发|自动累加|自动回写/.test(goal) ? "(规则面不在本阶梯)" : ""}`, capabilities: routeOrder },
|
|
1285
1290
|
route: {
|
|
1286
1291
|
...(whole ? (intentCoveredOf(ordered)
|
|
1287
1292
|
? { primary: "intent", atomicSupplement }
|
package/dist/graph.js
CHANGED
|
@@ -1013,8 +1013,8 @@ export const GRAPH_COVERAGE = Object.freeze({
|
|
|
1013
1013
|
answerable: Object.freeze(["businessrule", "datarule", "listview"]),
|
|
1014
1014
|
mustCheckManually: Object.freeze([
|
|
1015
1015
|
{ surface: "form", why: "表单控件关联未扫描,可能仍引用目标字段", how: "omc call form.get --args '{\"schemaCode\":\"<x>\"}'" },
|
|
1016
|
-
{ surface: "workflow.permissions", why: "
|
|
1017
|
-
{ surface: "workflow.bindings", why: "
|
|
1016
|
+
{ surface: "workflow.permissions", why: "流程权限未扫描,无法判断谁能发起/操作(workflow.get 不存在:读已发布面用 get_published)", how: "omc call workflow.get_published --args '{\"workflowCode\":\"<x>\"}'" },
|
|
1017
|
+
{ surface: "workflow.bindings", why: "流程规则绑定未扫描,规则删除可能留下绑定(workflow.get 不存在:草稿/已发布分别用 get_draft/get_published)", how: "omc call workflow.get_published --args '{\"workflowCode\":\"<x>\"}'" },
|
|
1018
1018
|
{ surface: "onlinejs", why: "在线 JS 可能通过字符串引用字段", how: "omc call onlinejs.get --args '{\"schemaCode\":\"<x>\"}'" },
|
|
1019
1019
|
]),
|
|
1020
1020
|
note: "零命中/全零 totals 只代表 scanned 面没有命中;notScanned 面(尤其 form 与 workflow.permissions)未扫描,不可据此判定可安全删除或无影响",
|
|
@@ -1181,7 +1181,21 @@ export function queryGraphReferencesBatch(kind, codes, selector = {}) {
|
|
|
1181
1181
|
try {
|
|
1182
1182
|
const wanted = [...new Set(codes.filter(Boolean))];
|
|
1183
1183
|
const rows = wanted.length === 0 ? [] : db.prepare(`SELECT code, schema_code, rule_code, node_code, node_type, via FROM edges WHERE kind = ? AND code IN (${wanted.map(() => "?").join(",")}) ORDER BY code, schema_code, rule_code, node_code, via`).all(kind, ...wanted);
|
|
1184
|
-
|
|
1184
|
+
// r73 探针03-P2:裸码批量查询不告诉调用方「这个 code 解析到了哪些宿主模型」,
|
|
1185
|
+
// 同名跨模型时要额外抽查才能确认。resolved 汇总每个 code 的宿主 schema 集合,
|
|
1186
|
+
// 跨模型同名直接标 sameCodeAcrossSchemas(消歧用 schemaCode.field 写法)。
|
|
1187
|
+
const resolved = wanted.map((code) => {
|
|
1188
|
+
const schemaCodes = [...new Set(rows.filter((row) => row.code === code).map((row) => row.schema_code))];
|
|
1189
|
+
return { code, schemaCodes, ...(schemaCodes.length > 1 ? { sameCodeAcrossSchemas: true } : {}) };
|
|
1190
|
+
});
|
|
1191
|
+
return {
|
|
1192
|
+
kind,
|
|
1193
|
+
codes: wanted,
|
|
1194
|
+
resolved,
|
|
1195
|
+
matches: rows.map((row) => ({ targetCode: row.code, schemaCode: row.schema_code, ruleCode: row.rule_code, nodeCode: row.node_code ?? "", nodeType: row.node_type ?? "", via: row.via, referrer: { schemaCode: row.schema_code, ruleCode: row.rule_code }, isSelf: row.schema_code === row.code })),
|
|
1196
|
+
index: summary,
|
|
1197
|
+
coverage: GRAPH_COVERAGE,
|
|
1198
|
+
};
|
|
1185
1199
|
}
|
|
1186
1200
|
finally {
|
|
1187
1201
|
db.close();
|
|
@@ -235,7 +235,7 @@ export function registerBusinessRuleLane(tools) {
|
|
|
235
235
|
inputSchema: {
|
|
236
236
|
environment: environmentArg,
|
|
237
237
|
kind: z.enum(["service", "model", "field"]).describe("按什么找引用:service=BIZ_ACTION methodMapping.serviceCode;model=CREATE/UPDATE/DELETE targetObjectCode 与 methodMapping.schemaCode;field=dataActions.targetDataItem 与映射 bizCode"),
|
|
238
|
-
code: z.string().min(1).describe("
|
|
238
|
+
code: z.string().min(1).describe("要查引用的编码(服务/模型/字段 code);kind=field 可用 schemaCode.field 消歧"),
|
|
239
239
|
schemaCodes: z.union([z.array(z.string().min(1)), z.string()]).optional().describe("只扫这些模型(省 wire 读);省略=全平台模型"),
|
|
240
240
|
capability: capabilityArg,
|
|
241
241
|
},
|
|
@@ -301,7 +301,22 @@ export function registerBusinessRuleLane(tools) {
|
|
|
301
301
|
nextCommand: `omc call rule.references --args '{"kind":"${args.kind}","code":"${args.code}","schemaCodes":["<模型code>",...]}'(显式指定扫描范围)`,
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
|
-
|
|
304
|
+
// r73 探针02-P1(2026-11-17):kind=field 支持 `schemaCode.field` 限定写法
|
|
305
|
+
// (与 graph references 一致)。裸 code 会把别的模型的同名字段并进来(实证:
|
|
306
|
+
// 查 crm_contract.amount 命中 crm_receipt.Create 的自身 amount)——消歧此前
|
|
307
|
+
// 只能靠逐条 rule.get 人工核对。前缀不在本次扫描范围时按原样查(code 可能真含点)。
|
|
308
|
+
const rawCode = args.code;
|
|
309
|
+
let wanted = rawCode;
|
|
310
|
+
let fieldScope;
|
|
311
|
+
if (args.kind === "field" && rawCode.includes(".")) {
|
|
312
|
+
const cut = rawCode.lastIndexOf(".");
|
|
313
|
+
const prefix = rawCode.slice(0, cut);
|
|
314
|
+
const bare = rawCode.slice(cut + 1);
|
|
315
|
+
if (bare !== "" && scoped.includes(prefix)) {
|
|
316
|
+
wanted = bare;
|
|
317
|
+
fieldScope = prefix;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
305
320
|
const matches = [];
|
|
306
321
|
let scannedRules = 0;
|
|
307
322
|
let parseFailures = 0;
|
|
@@ -348,13 +363,17 @@ export function registerBusinessRuleLane(tools) {
|
|
|
348
363
|
matches.push({ schemaCode, ruleCode, nodeCode, nodeType, via: "methodMapping.schemaCode" });
|
|
349
364
|
}
|
|
350
365
|
else {
|
|
366
|
+
// dataActions 的 targetDataItem 宿主是 targetObjectCode(跨模型写回),
|
|
367
|
+
// mapping.bizCode 宿主是承载模型——dot 限定按宿主过滤,与 graph 边归属一致。
|
|
368
|
+
const actionHost = String(rawNode.targetObjectCode ?? "") || schemaCode;
|
|
351
369
|
if (["CREATE", "UPDATE", "DELETE"].includes(nodeType) && Array.isArray(rawNode.dataActions)
|
|
370
|
+
&& (fieldScope === undefined || actionHost === fieldScope)
|
|
352
371
|
&& rawNode.dataActions.some((action) => String(action.targetDataItem ?? "") === wanted))
|
|
353
|
-
matches.push({ schemaCode, ruleCode, nodeCode, nodeType, via: "dataActions.targetDataItem", ...(String(rawNode.targetObjectCode ?? "") !== "" ? { targetObjectCode: String(rawNode.targetObjectCode) } : {}) });
|
|
354
|
-
if (mapping) {
|
|
372
|
+
matches.push({ schemaCode, ruleCode, nodeCode, nodeType, via: "dataActions.targetDataItem", hostSchemaCode: actionHost, ...(String(rawNode.targetObjectCode ?? "") !== "" ? { targetObjectCode: String(rawNode.targetObjectCode) } : {}) });
|
|
373
|
+
if (mapping && (fieldScope === undefined || schemaCode === fieldScope)) {
|
|
355
374
|
for (const [key, label] of [["inputMappings", "inputMappings.bizCode"], ["outputMappings", "outputMappings.bizCode"]]) {
|
|
356
375
|
if (Array.isArray(mapping[key]) && mapping[key].some((row2) => String(row2.bizCode ?? "") === wanted && (row2.codeType === undefined || row2.codeType === 1)))
|
|
357
|
-
matches.push({ schemaCode, ruleCode, nodeCode, nodeType, via: label });
|
|
376
|
+
matches.push({ schemaCode, ruleCode, nodeCode, nodeType, via: label, hostSchemaCode: schemaCode });
|
|
358
377
|
}
|
|
359
378
|
}
|
|
360
379
|
}
|
|
@@ -364,6 +383,7 @@ export function registerBusinessRuleLane(tools) {
|
|
|
364
383
|
return {
|
|
365
384
|
kind: args.kind,
|
|
366
385
|
code: wanted,
|
|
386
|
+
...(fieldScope !== undefined ? { requestedCode: rawCode, resolvedScope: { schemaCode: fieldScope, code: wanted } } : {}),
|
|
367
387
|
scanned: { models: scoped.length, rules: scannedRules, ...(parseFailures > 0 ? { parseFailures } : {}) },
|
|
368
388
|
matches,
|
|
369
389
|
// r35a-F4(真机 2026-11-06):matches:[] 曾被当成「可安全删除」的依据,
|
|
@@ -382,7 +402,11 @@ export function registerBusinessRuleLane(tools) {
|
|
|
382
402
|
: {}),
|
|
383
403
|
...(matches.length === 0
|
|
384
404
|
? {
|
|
385
|
-
|
|
405
|
+
// r73 探针01-P1(2026-11-17):旧首句「零命中=全平台没有规则引用它」与
|
|
406
|
+
// 同一载荷的 notScanned(不含条件叶子/datarule/listview)自相矛盾——快读
|
|
407
|
+
// 者会直接答「没有规则用它」,而 daily_expiry_scan 的条件正引用该字段。
|
|
408
|
+
// 首句先声明「本面」盲区,再给范围与离线替代。
|
|
409
|
+
note: "零命中(本在线面仅 businessrule 的 methodMapping/targetObjectCode/dataActions;**不含规则条件叶子/datarule/listview**——条件里的引用用 `graph references field <code>`)= " +
|
|
386
410
|
(args.schemaCodes !== undefined
|
|
387
411
|
? `仅扫描了 schemaCodes 收窄的 ${scoped.length} 个模型(${scoped.slice(0, 5).join(", ")}${scoped.length > 5 ? "…" : ""})——引用常发生在**其他**模型上;要全平台结论请去掉 schemaCodes`
|
|
388
412
|
: "全平台没有规则引用它") +
|
|
@@ -17,7 +17,7 @@ export const LIST_VIEW_WIRE = Object.freeze({
|
|
|
17
17
|
configureActions: "actions -> queryActions [{actionCode,name,icon,queryActionType,systemAction,serviceCode,serviceMethod,customService,associationCode,associationType,sortKey}]; queryActionType QueryActionType numeric QUERY(1)/ADD(2)/.../BATCH_SUBMIT(23); associationType QueryActionRelativeType numeric BIZSHEET(0)/WORKFLOW(1); associationCode/associationType are the JSON names of the DTO fields relativeCode/queryActionRelativeType (@JsonProperty); omitted leaves the existing actions untouched, provided MERGES into the effective set by actionCode (live 2026-09-17: query/update replaces-then-re-adds the submitted list, so a merge keeps the platform's built-in 新增/删除/导入/导出 and updates a matching actionCode — replaceActions:true restores the authoritative full set, defaultActions:true re-seeds the platform default set); query/get auto-injects default actions (qr_code/batch_print/batch_update/import_attachment/export_attachment/batch_submit) and query/update resets sortKey to i+1",
|
|
18
18
|
configurePresentation: "presentation -> queryPresentation {clientType,htmlJson,actionsJson,columnsJson,queryViewDataSource,schemaRelations,options}; htmlJson/actionsJson/columnsJson JSON strings are decoded once before render-shape validation (html element tagName+attrs, action actionCode/name/icon, column propertyCode/propertyType); invalid input refuses with listview-presentation-render-invalid before wire and is never double-encoded; clientType is forced to PC by query/update; schemaRelations is platform-derived from the queryColumns tree (resolveRelations) and overwrites your input; a non-empty htmlJson updates the environment record, which query/delete cleans up; omitted leaves the existing presentation untouched (the read-face object must be echoed, because saveBizQueryDetail removes every presentation whose clientType matches before re-adding), provided replaces it",
|
|
19
19
|
configureButtons: "buttons -> customButtons [{code,name,useLocation,bindAction,operateType,showPermCode,showPermType,hint,targetCode,targetObjCode,description,actionConfig}]; actionConfig is fail-closed for rendering: SCRIPT requires scriptData, BUSINESS_RULE/FLOW requires targetCode, ADD_DATA/FORM requires expanded schemaCodeVal/formListData/configureList; invalid input refuses before wire; readback includes buttonsRenderCompat; sent as the query/update body customButtonJson JSON array string; BizButtonFacadeImpl.addBizButtonList(String,...) runs only when customButtonJson is a JSON array, then batchDeleteByTrigger over the schema and its published child-table codes and re-adds (so provided replaces every button under the QUERY trigger, while omitted/absent customButtonJson changes nothing); triggerType is forced to QUERY, triggerCode to the view code, schemaCode backfilled, sortKey reset to the array index; name/code/useLocation/bindAction/operateType are required; bindAction ButtonBindAction name LIST(1)/FORM(2)/ADD_DATA(3)/FLOW(4)/BUSINESS_RULE(5)/SCRIPT(6)/CUSTOM_PAGE(7)/WORKFLOW_CENTER_PAGE(8)/FRONT_EVENT(9)/AGENT(10); useLocation ButtonUseLocation name LIST(1)/FORM(2)/ROW(3); operateType ButtonOperateType name WITH_VIEW(1)/WITH_OUT_VIEW(2); showPermType ButtonShowPermType name BIND_SYS_BUTTON(1)/BIND_BUSINESS_RULE(2)/BIND_FRONT_EVENT_BUTTON(3); duplicate code fails BIZ_QUERY_ACTION_CODE_EXIST; query/get returns customButtons[] (non-admin users are filtered by the permission combination); ModelManagementFacadeImpl.removeBizQuery deletes QUERY buttons for the schema and its child tables on query/delete",
|
|
20
|
-
buttonsActionConfig: "ticket 75: an ADD_DATA/FORM button's model/form target binding lives in actionConfig — schemaCodeVal (target model object {code,id:<app-tree node id>,name,type:'BizModel',appCode,appName,published}) + formListData[] (target forms, sheetType 0 默认表单 only evidenced) + configureList[] (data assignments; isConst is STRING 'true'/'false', operator key is OptionType capital O,
|
|
20
|
+
buttonsActionConfig: "ticket 75: an ADD_DATA/FORM button's model/form target binding lives in actionConfig — schemaCodeVal (target model object {code,id:<app-tree node id>,name,type:'BizModel',appCode,appName,published}) + formListData[] (target forms, sheetType 0 默认表单 only evidenced) + configureList[] (data assignments; isConst is STRING 'true'/'false'; constant assignment uses isConst:'true' + currentDataInput:<value> — r73 live 8.6.41 evidence, dynamic row reads currentDataInput:null; operator key is OptionType capital O, 'Eq' evidences both kinds; currentDataItem/targetDataItem are array-wrapped inline field copies and may be passed back as-is on round-trip) — while targetCode/targetObjCode are measured always-null and NOT consumed for these bind actions (refused as listview-button-target-ineffective; FLOW keeps them); high-level button params targetModel/targetForm/configureList expand into that shape from authoritative readback (app tree node, bizsheet/get, published field rows) and fail closed (listview-button-target-unresolved) before any query/update",
|
|
21
21
|
configureOptions: "options -> the query header BizQueryModel.options String column (h_biz_query.options TEXT), parsed by the platform as BizQueryOption {pagingSetting:{pageSize,showTotal}, listViewModeSetting:{mode,canSwitch}} (8.6.26 defaultOption = pageSize 20 / showTotal true / mode \"spreadsheet\" / canSwitch false); a raw JSON string is sent verbatim, an object is JSON-stringified; rowColorSetting has no 8.6.26 class so the object form refuses unknown keys; BizQueryController.update sets publish=TRUE before updateBizQuery, so after the first configure only the name/options-diff branch (ModelManagementFacadeImpl:1966-1973) persists options: an omitted body key (null) would overwrite a non-null stored value, so omitted must echo the read-face options (the tool spreads query/get) while provided replaces the whole string; BizQueryFacadeImpl.getBizQuery copies options from the entity on readback (no controller parse); BizObjectFacadeImpl.getShowTotal reads pagingSetting.showTotal (so pagingSetting must not be null)",
|
|
22
22
|
configurePresentationType: "presentationType -> the query header BizQueryHeaderModel.queryPresentationType QueryPresentationType enum; sent as the name LIST/BOARD/CALENDAR/GANTT (@JsonValue getIndex() whose index equals the name, @JsonCreator get(String) parses); updateBizQuery always assigns it (:1955, not gated by publish or any diff), so an omitted body key (null) would overwrite a stored type and the tool must echo the read-face value (query/get inherits it via BeanUtils.copyProperties at BizQueryFacadeImpl:346); gantt -> queryGanttModel BizQueryGanttModel {queryId,schemaCode,startTimePropertyCode,endTimePropertyCode,progressPropertyCode,titlePropertyCode,preDependencyPropertyCode,endDependencyPropertyCode,levelPropertyCode,milepostCode,sortKey,configJson,liableManCode,statusCode,defaultPrecision}; saveBizQueryDetail only swaps the gantt when the submitted model is non-null (:178-183), so an omitted gantt leaves the stored one untouched; when presentationType is GANTT the controller requires the gantt with non-null startTimePropertyCode/endTimePropertyCode/titlePropertyCode (validateNotEmptyGantt :1121-1136); updateBizQuery forces levelPropertyCode=parentId for TREE models (:1999-2001) and saveBizQueryDetail backfills queryId (:179-181); addBizQuery allows at most one GANTT view per schema (BIZ_QUERY_GANTT_EXIST :1787)",
|
|
23
23
|
configureLayer: "queryLayer -> BizQueryModel.queryLayer List<BizQueryLayer> (name,layerType,fieldCode,displayField[],layerFieldList[{schemaCode,schemaName,fieldCode,fieldName,displayField[],children[]}]); a real JSON array (not a String column), sent as an array; multiTableHeaderConfig -> BizQueryModel.multiTableHeaderConfig String (HeaderConfig[] JSON {type,name,field,propertyType,children[]} parsed by EasyExcelUtils/DefaultDataIEFileOperateServiceImpl via JSONObject.parseArray); a raw JSON string is sent verbatim, an array is JSON-stringified; saveBizQueryDetail assigns both unconditionally (:184-186, unlike the gantt non-null guard), so an omitted key would overwrite the stored value and the tool must echo the read-face values (BizQueryFacadeImpl.getBizQuery always carries them: queryLayer from the detail config or null, multiTableHeaderConfig from the config or \"\", :283-293/344-345); provided replaces the whole value. NOTE: \"按字段分组\" (field grouping) is NOT a proven capability on this surface — queryLayer is a passthrough (no schema/enum validation) and every real 8.6.26 view read back an empty queryLayer, so layerType semantics/grouping behavior are UNVERIFIED; do not guess-write queryLayer to satisfy a grouping requirement (2026-10-06 sandbox: agent correctly refused to fabricate it).",
|
|
@@ -208,10 +208,16 @@ const buttonConfigureListArg = z
|
|
|
208
208
|
.object({
|
|
209
209
|
currentDataItemId: z.string().min(1).optional().describe("源字段 code(当前视图模型上的字段);缺失由 dry-lint 拒绝(listview-buttons-invalid)"),
|
|
210
210
|
targetDataItemId: z.string().min(1).optional().describe("目标字段 code(targetModel 上的字段);缺失由 dry-lint 拒绝(listview-buttons-invalid)"),
|
|
211
|
-
isConst: z.string().optional().describe('
|
|
212
|
-
OptionType: z.string().optional().describe("赋值算子(注意大写 O
|
|
211
|
+
isConst: z.string().optional().describe('常量开关(字符串 "true"/"false"):"true" 表示常量赋值,必须同时给 currentDataInput'),
|
|
212
|
+
OptionType: z.string().optional().describe("赋值算子(注意大写 O);缺省 Eq"),
|
|
213
|
+
currentDataInput: z.string().optional().describe('常量赋值的值(isConst:"true" 时必填;读面同名字段,r73 真机取证)'),
|
|
214
|
+
// 读→写回灌(线上 #40 #5):listview.get 的条目带 targetDataItem/currentDataItem
|
|
215
|
+
// 内联副本。原样回传时这两个键在此显式声明(工具不消费,只避免 schema 面把
|
|
216
|
+
// 它们标成 additionalProperties:false 诱导调用方手工裁剪丢掉 currentDataInput)。
|
|
217
|
+
targetDataItem: z.unknown().optional().describe("读面内联副本;回灌原样带回即可"),
|
|
218
|
+
currentDataItem: z.unknown().optional().describe("读面内联副本;回灌原样带回即可"),
|
|
213
219
|
})
|
|
214
|
-
.describe("actionConfig.configureList[]
|
|
220
|
+
.describe("actionConfig.configureList[] 数据赋值条目。读→写映射:currentDataItemId/targetDataItemId(字段 code,必填)、isConst(\"true\"=常量赋值)、currentDataInput(常量值,isConst=true 必填)、OptionType(缺省 Eq);targetDataItem/currentDataItem 是读面内联副本,回灌时原样带回即可");
|
|
215
221
|
export const listViewButtonArg = z
|
|
216
222
|
.object({
|
|
217
223
|
code: z.string().min(1),
|
|
@@ -219,12 +225,12 @@ export const listViewButtonArg = z
|
|
|
219
225
|
useLocation: buttonUseLocationArg,
|
|
220
226
|
bindAction: buttonBindActionArg,
|
|
221
227
|
operateType: buttonOperateTypeArg,
|
|
222
|
-
showPermCode: z.string().optional(),
|
|
223
|
-
showPermType: buttonShowPermTypeArg.optional(),
|
|
224
|
-
hint: z.string().optional(),
|
|
225
|
-
targetCode: z.string().optional(),
|
|
226
|
-
targetObjCode: z.string().optional(),
|
|
227
|
-
description: z.string().optional(),
|
|
228
|
+
showPermCode: z.string().nullable().optional().describe("读面 null 可回灌"),
|
|
229
|
+
showPermType: buttonShowPermTypeArg.nullable().optional(),
|
|
230
|
+
hint: z.string().nullable().optional(),
|
|
231
|
+
targetCode: z.string().nullable().optional().describe("FLOW=流程 code;ADD_DATA/FORM 读面 null(可回灌)"),
|
|
232
|
+
targetObjCode: z.string().nullable().optional(),
|
|
233
|
+
description: z.string().nullable().optional(),
|
|
228
234
|
targetModel: z.string().min(1).optional().describe("ADD_DATA/FORM 目标模型 code;工具读回应用树节点内联展开成 actionConfig.schemaCodeVal(targetCode/targetObjCode 对这两类按钮无效——实测恒 null 不参与)"),
|
|
229
235
|
targetForm: z.string().min(1).optional().describe("ADD_DATA/FORM 目标表单 code;缺省用目标模型的默认表单;展开成 actionConfig.formListData"),
|
|
230
236
|
configureList: z.array(buttonConfigureListArg).optional().describe("ADD_DATA 数据赋值;展开成 actionConfig.configureList(含 isConst:\"false\"、OptionType:\"Eq\" 与字段内联副本)"),
|
|
@@ -564,7 +570,7 @@ export function assertListViewConfigureShape(args) {
|
|
|
564
570
|
if (typeof entry.operateType !== "string" || !(entry.operateType in BUTTON_OPERATE_TYPE.index)) {
|
|
565
571
|
throw new ToolRefusalError({ status: "refused", blocker: "listview-buttons-invalid", message: `buttons operateType must be WITH_VIEW or WITH_OUT_VIEW (got ${String(entry.operateType)})` });
|
|
566
572
|
}
|
|
567
|
-
if (entry.showPermType !== undefined && (typeof entry.showPermType !== "string" || !(entry.showPermType in BUTTON_SHOW_PERM_TYPE.index))) {
|
|
573
|
+
if (entry.showPermType !== undefined && entry.showPermType !== null && (typeof entry.showPermType !== "string" || !(entry.showPermType in BUTTON_SHOW_PERM_TYPE.index))) {
|
|
568
574
|
throw new ToolRefusalError({ status: "refused", blocker: "listview-buttons-invalid", message: `buttons showPermType must be a ButtonShowPermType name (got ${String(entry.showPermType)})` });
|
|
569
575
|
}
|
|
570
576
|
if (entry.actionConfig !== undefined && typeof entry.actionConfig !== "string" && (typeof entry.actionConfig !== "object" || entry.actionConfig === null || Array.isArray(entry.actionConfig))) {
|
|
@@ -574,7 +580,7 @@ export function assertListViewConfigureShape(args) {
|
|
|
574
580
|
// (schemaCodeVal + formListData + configureList); targetCode/targetObjCode
|
|
575
581
|
// are measured always-null and NOT consumed for these bind actions.
|
|
576
582
|
if (entry.bindAction === "ADD_DATA" || entry.bindAction === "FORM") {
|
|
577
|
-
if (entry.targetCode !== undefined || entry.targetObjCode !== undefined) {
|
|
583
|
+
if ((entry.targetCode !== undefined && entry.targetCode !== null) || (entry.targetObjCode !== undefined && entry.targetObjCode !== null)) {
|
|
578
584
|
throw new ToolRefusalError({
|
|
579
585
|
status: "refused",
|
|
580
586
|
blocker: "listview-button-target-ineffective",
|
|
@@ -630,8 +636,11 @@ export function assertListViewConfigureShape(args) {
|
|
|
630
636
|
if (typeof assignment.currentDataItemId !== "string" || assignment.currentDataItemId.length === 0 || typeof assignment.targetDataItemId !== "string" || assignment.targetDataItemId.length === 0) {
|
|
631
637
|
throw new ToolRefusalError({ status: "refused", blocker: "listview-buttons-invalid", message: `buttons ${String(entry.code)}:configureList 每条需要 currentDataItemId + targetDataItemId(字段 code)` });
|
|
632
638
|
}
|
|
633
|
-
if (assignment.isConst !== undefined && assignment.isConst !== "false") {
|
|
634
|
-
throw new ToolRefusalError({ status: "refused", blocker: "listview-buttons-invalid", message: `buttons ${String(entry.code)}:configureList.isConst
|
|
639
|
+
if (assignment.isConst !== undefined && assignment.isConst !== "true" && assignment.isConst !== "false") {
|
|
640
|
+
throw new ToolRefusalError({ status: "refused", blocker: "listview-buttons-invalid", message: `buttons ${String(entry.code)}:configureList.isConst 只接受字符串 "true"/"false"` });
|
|
641
|
+
}
|
|
642
|
+
if (assignment.isConst === "true" && (typeof assignment.currentDataInput !== "string" || assignment.currentDataInput === "")) {
|
|
643
|
+
throw new ToolRefusalError({ status: "refused", blocker: "listview-buttons-invalid", message: `buttons ${String(entry.code)}:configureList 常量赋值(isConst:"true")必须给 currentDataInput(常量值)` });
|
|
635
644
|
}
|
|
636
645
|
if (assignment.OptionType !== undefined && assignment.OptionType !== "Eq") {
|
|
637
646
|
throw new ToolRefusalError({ status: "refused", blocker: "listview-buttons-invalid", message: `buttons ${String(entry.code)}:configureList.OptionType(注意大写 O)仅 "Eq" 已取证` });
|
|
@@ -989,17 +998,17 @@ export function normalizeButtons(buttons, schemaCode, triggerCode) {
|
|
|
989
998
|
operateType: button.operateType,
|
|
990
999
|
sortKey: index,
|
|
991
1000
|
};
|
|
992
|
-
if (button.showPermCode !== undefined)
|
|
1001
|
+
if (button.showPermCode !== undefined && button.showPermCode !== null)
|
|
993
1002
|
row.showPermCode = button.showPermCode;
|
|
994
|
-
if (button.showPermType !== undefined)
|
|
1003
|
+
if (button.showPermType !== undefined && button.showPermType !== null)
|
|
995
1004
|
row.showPermType = button.showPermType;
|
|
996
|
-
if (button.hint !== undefined)
|
|
1005
|
+
if (button.hint !== undefined && button.hint !== null)
|
|
997
1006
|
row.hint = button.hint;
|
|
998
|
-
if (button.targetCode !== undefined)
|
|
1007
|
+
if (button.targetCode !== undefined && button.targetCode !== null)
|
|
999
1008
|
row.targetCode = button.targetCode;
|
|
1000
|
-
if (button.targetObjCode !== undefined)
|
|
1009
|
+
if (button.targetObjCode !== undefined && button.targetObjCode !== null)
|
|
1001
1010
|
row.targetObjCode = button.targetObjCode;
|
|
1002
|
-
if (button.description !== undefined)
|
|
1011
|
+
if (button.description !== undefined && button.description !== null)
|
|
1003
1012
|
row.description = button.description;
|
|
1004
1013
|
// BizButtonModel.actionConfig is a non-null String on the render path. The
|
|
1005
1014
|
// list runtime does `"string"==typeof a ? JSON.parse(a) : a`, then for
|
package/dist/lanes/list-view.js
CHANGED
|
@@ -234,14 +234,20 @@ async function expandButtonActionConfigs(session, viewSchemaCode, buttons) {
|
|
|
234
234
|
const targetRow = targetFieldRows.find((row) => String(row.code ?? row.propertyCode ?? "") === assignment.targetDataItemId);
|
|
235
235
|
if (!targetRow)
|
|
236
236
|
unresolved(`赋值目标字段 ${targetModel}.${assignment.targetDataItemId} 不在发布面上`);
|
|
237
|
-
|
|
237
|
+
const entry = {
|
|
238
238
|
currentDataItemId: assignment.currentDataItemId,
|
|
239
239
|
targetDataItemId: assignment.targetDataItemId,
|
|
240
240
|
targetDataItem: [{ ...targetRow, schemaCode: targetModel }],
|
|
241
241
|
currentDataItem: [{ ...sourceRow, schemaCode: viewSchemaCode }],
|
|
242
|
-
isConst: "false",
|
|
243
|
-
OptionType: "Eq",
|
|
244
|
-
}
|
|
242
|
+
isConst: assignment.isConst === "true" ? "true" : "false",
|
|
243
|
+
OptionType: typeof assignment.OptionType === "string" && assignment.OptionType ? assignment.OptionType : "Eq",
|
|
244
|
+
};
|
|
245
|
+
// r73 #5 后半(线上 #40):常量赋值(isConst:"true")→ 平台读面对的键名是
|
|
246
|
+
// currentDataInput(issue 8.6.41 实测读回该键);写面此前硬编码 isConst:"false"
|
|
247
|
+
// 并把该参数丢掉,导致「读面有常量值、写面表达不了」。现在原样透传。
|
|
248
|
+
if (entry.isConst === "true")
|
|
249
|
+
entry.currentDataInput = assignment.currentDataInput;
|
|
250
|
+
configureList.push(entry);
|
|
245
251
|
}
|
|
246
252
|
}
|
|
247
253
|
const { targetModel: _tm, targetForm: _tf, configureList: _cl, ...rest } = button;
|
package/dist/tool-types.js
CHANGED
|
@@ -125,6 +125,8 @@ const TOOL_INPUT_ALIASES = Object.freeze({
|
|
|
125
125
|
// 注意 schemaCode→schemaCodes 是「扫描范围」语义(不是被查对象)——只在
|
|
126
126
|
// 调用方没给 code 时生效;kind=model 想按模型查请显式用 code。
|
|
127
127
|
"rule.references": Object.freeze({ code: ["ruleCode"], schemaCodes: ["schemaCode"] }),
|
|
128
|
+
// r73 探针02-P2:分页条数在 data.list 叫 size,调用方习惯 limit(SQL/REST 肌肉记忆)。
|
|
129
|
+
"data.list": Object.freeze({ size: ["limit"] }),
|
|
128
130
|
});
|
|
129
131
|
/**
|
|
130
132
|
* r54 C② F2:该工具在 TOOL_INPUT_ALIASES 里声明的**同义词键**(调用方可能拿来
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.69",
|
|
4
4
|
"description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"commander": "14.0.3",
|
|
59
|
-
"omc-core": "0.6.
|
|
59
|
+
"omc-core": "0.6.69",
|
|
60
60
|
"proper-lockfile": "4.1.2",
|
|
61
61
|
"write-file-atomic": "6.0.0",
|
|
62
62
|
"zod": "^3.23.8",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"directory": "packages/omc-cli"
|
|
75
75
|
},
|
|
76
76
|
"optionalDependencies": {
|
|
77
|
-
"@stalfh233/omc-fake-platform": "0.6.
|
|
77
|
+
"@stalfh233/omc-fake-platform": "0.6.69"
|
|
78
78
|
}
|
|
79
79
|
}
|