@stalfh233/omc-cli 0.6.99 → 0.7.0
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/conformance/README.md +267 -0
- package/conformance/frontend-behavior-probe.mjs +1986 -0
- package/conformance/frontend-scenarios/calc-visibility.json +22 -0
- package/conformance/frontend-scenarios/form-buttons.json +19 -0
- package/conformance/frontend-scenarios/list-buttons.json +28 -0
- package/conformance/frontend-scenarios/onlinejs.json +19 -0
- package/dist/cli-stdout.js +4 -0
- package/dist/cli.js +178 -2
- package/dist/endpoints.js +2 -0
- package/dist/field-tree-options.js +165 -0
- package/dist/form-support.js +59 -2
- package/dist/formula-lint.js +5 -1
- package/dist/intent/capabilities/datarule.js +20 -2
- package/dist/lanes/datarule.js +34 -3
- package/dist/lanes/field.js +40 -6
- package/dist/lanes/form.js +1 -1
- package/dist/lanes/list-view-shapes.js +78 -1
- package/dist/lanes/list-view.js +147 -1
- package/dist/lanes/model.js +23 -2
- package/dist/lanes/online-js.js +18 -2
- package/dist/lanes/perm.js +1 -1
- package/dist/lanes/workflow.js +16 -2
- package/dist/online-js-source.js +7 -0
- package/dist/recipes/datarule.js +2 -1
- package/dist/recipes/field.js +1 -1
- package/dist/refusal-guidance.js +1 -1
- package/dist/wire.js +46 -2
- package/dist/write.js +78 -1
- package/package.json +6 -4
package/dist/lanes/workflow.js
CHANGED
|
@@ -795,12 +795,26 @@ export function rejectToStartCancelWarnings(template) {
|
|
|
795
795
|
function participantReferenceWarnings(template) {
|
|
796
796
|
const activities = Array.isArray(template.activities) ? template.activities : [];
|
|
797
797
|
const warnings = [];
|
|
798
|
+
// 第一个 PARTICIPANT 是「填写」节点(发起人),平台允许 participant 为空并自动补
|
|
799
|
+
// {Originator};之后的空 participant 才是危险信号。t248 1.1.25/1.1.30 实测:
|
|
800
|
+
// workflow.create 自动草稿的审批节点 participant 恒为空,平台把待办静默派给
|
|
801
|
+
// 发起人(自审自批),而旧实现直接 continue,publish 不告警。
|
|
802
|
+
const firstParticipantCode = String(activities.find((activity) => String(activity.activityType ?? "") === "PARTICIPANT")?.activityCode ?? "");
|
|
798
803
|
for (const activity of activities) {
|
|
799
804
|
if (String(activity.activityType ?? "") !== "PARTICIPANT")
|
|
800
805
|
continue;
|
|
801
806
|
const raw = activity.participant;
|
|
802
|
-
|
|
803
|
-
|
|
807
|
+
const activityCode = String(activity.activityCode ?? "");
|
|
808
|
+
if (raw === undefined || raw === null || String(raw).trim().length === 0) {
|
|
809
|
+
if (activityCode === firstParticipantCode)
|
|
810
|
+
continue; // 填写节点:平台补 {Originator}
|
|
811
|
+
warnings.push({
|
|
812
|
+
activityCode,
|
|
813
|
+
participant: "",
|
|
814
|
+
warning: `节点 ${activityCode} 的 participant 为空:平台会按发起人处理(待办派给发起人,形成自审自批),不是「稍后由平台填写」。用 workflow.setButtons/update 给该节点填真实参与者({Originator}、角色对象数组或 FindUserByRole(...));确认自审自批符合业务意图则显式写 {Originator}。`,
|
|
815
|
+
});
|
|
816
|
+
continue;
|
|
817
|
+
}
|
|
804
818
|
const participant = String(raw).trim();
|
|
805
819
|
// r4-training 2026-10-20: two function names that show up in read-back /
|
|
806
820
|
// seeded templates are NOT registered at runtime in AI-Platform v1.1.25 —
|
package/dist/online-js-source.js
CHANGED
|
@@ -54,6 +54,13 @@ export const ONLINE_JS_EVENTS = new Set([
|
|
|
54
54
|
"onActionDone",
|
|
55
55
|
"onPrintFormDataHandle",
|
|
56
56
|
"onPrintWorkflowLogDataHandle",
|
|
57
|
+
// 平台 `LifecycleHookNames`(cloudpivot-form runtime/lifecycle.ts,8.6 与 2.1.5 一致)
|
|
58
|
+
// 还有这 4 个:新建 / 编辑 / 模型级校验 / 保存。此前白名单只有 8 个,写这些事件
|
|
59
|
+
// 会被本工具判「未知事件」——用户侧表现就是「在线 JS 语法变了、写不进去」。
|
|
60
|
+
"onAdd",
|
|
61
|
+
"onEdit",
|
|
62
|
+
"onModelValidate",
|
|
63
|
+
"onSubmit",
|
|
57
64
|
]);
|
|
58
65
|
const WRAPPER_OPEN = /\(\s*function\s*\(\s*form\s*\)/;
|
|
59
66
|
const WRAPPER_CLOSE = "})";
|
package/dist/recipes/datarule.js
CHANGED
|
@@ -24,6 +24,7 @@ const submitCrossFieldCheck = Object.freeze({
|
|
|
24
24
|
`**右值必须用结构值** {"valueType":"currentModel","value":"<字段code>"}——裸 {字段code} 右值平台存储成功但**永不解析、规则静默不生效**(2026-09-24 真机;工具 fail-closed 拦截 + 读回 shapeWarning 标记存量雷)。`,
|
|
25
25
|
"**prompt 存纯文本**:门户对顶层 options.prompt 原样显示,URL 编码会弹 %E5.. 乱码(真机 equipmaint_workorder 案)。",
|
|
26
26
|
"单字段正则/长度类校验用 checkType:1/4/5(REGEX/MAX_LENGTH/EMPTY_ROW)+ 对应 options 键。",
|
|
27
|
+
"**`options.validateHiddenProperties`(2.1.5 隐藏字段也参与校验)**:可选数组;update 未显式给时自动保留当前行值,显式 `[]` 才清空。",
|
|
27
28
|
],
|
|
28
29
|
priorToolReferences: [{ tool: "field.list", args: { environment, schemaCode: "<模型>" }, purpose: "确认两个比较字段已发布" }],
|
|
29
30
|
dryRun: { supported: true, command: `omc call datarule.create --env ${environment} --dry-run --args '<recipe.args>'`, notes: "dry-run 过协议校验(裸右值/prompt 编码当场拒),零 wire" },
|
|
@@ -62,7 +63,7 @@ const dataruleCalcRule = Object.freeze({
|
|
|
62
63
|
"`options.shortTextStitch` 的值必须是 JSON 对象字符串,**三个键都要给全**:`{\"formula\":\"{a}+{b}\",\"editorText\":\"<field-omc0001>a</field-omc0001>+<field-omc0001>b</field-omc0001>\",\"editorMark\":\"field-omc0001\"}`。",
|
|
63
64
|
"**`editorText`/`editorMark` 不是可选**(真机 2026-10-08):设计器「计算规则」弹窗按 `editorText` 里的 `<field-{editorMark}>…</field-{editorMark}>` 标记解析;`editorMark:\"\"` 或 `editorText` 不带标记 → 弹窗**标红/判非法**。约定:`editorMark` = `field-<任意一致 id>`(如 `field-omc0001`),`editorText` 里**每个字段引用**都包成 `<field-omc0001>ref</field-omc0001>`——**标签内只放裸 token,不要带花括号**(前端 `parseFormulaFromEditorText` 会自己给标签内容套上 `{}`:写 `<field-omc0001>{a}</field-omc0001>` 会被反解成 `{{a}}` ≠ `formula`,该规则显示「已失效」;真机 2026-10-08 SCM 沙盒已复现,OMC 现已 fail closed `datarule-stitch-editor-mismatch`)。",
|
|
64
65
|
"**`formula` 引用语法**(真机 production + 设计器核验):同类字段裸 `{字段code}`(`{a}+{b}`);**子表列用 `{子表字段code.子列code}` 点号全限定**(`{prop_repair_detail.qty}*{prop_repair_detail.unit_price}`);子表聚合 `SUM({子表.子列})`;支持 `IF/CASE/VALUE/AND/=、字符串字面量、运算符空格`。",
|
|
65
|
-
"**公式函数面
|
|
66
|
+
"**公式函数面 65 个(2026-11-12 反编译 `BizDataRuleFacadeImpl`;2.1.5 新增 `PRODUCT` 累乘,8.6 无)**:日期族 `NOW()`(当前时刻 DATE)/`TODAY()`(当天 TEXT,**不能当 DATE 参数**)/`DATE()/ADDDAY/ADDHOUR/ADDMINUTE/ADDMONTH/ADDYEAR/DATEDIF/DAY/MONTH/YEAR/HOUR/MINUTE/SECOND/QUARTER/WEEKDAY/WEEKNUM`;数学族 `SUM/SUMIF/AVG/COUNT/COUNTIF/MAX/MIN/LARGE/SMALL/ROUND/VALUE/ABS/CEILING/FLOOR/INTDOWN/INTUP/FIXED/LOG/MOD/PI/POWER/RAND/SIN/COS/SQRT/PRODUCT`;文本族 `CONTAINS/STARTSWITH/SEARCH/LEFT/RIGHT/LEN/LOWER/UPPER/TRIM/SUBSTITUTE/REPLACE/SUBSTRING/STRING/TEXT/UNION/GETADDRESS/GETUNITNAME/UPPERMONEY`;逻辑 `ISNULL/IF/CASE`。",
|
|
66
67
|
"**日期运算写法**:加法**日期在前、增量在后、负数为减**——`ADDHOUR(NOW(), 4)`(当前 +4 小时)、`ADDDAY(某日期, -3)`(前 3 天)、`ADDMONTH(开始, 6)`;`DATEDIF(结束时间, 开始时间, 单位)` 回数值,单位区分大小写 `y/M/d/h/m/s`(**`M`=月、`m`=分钟**,易错)。例:时限「重大 4 小时」= `ADDHOUR(NOW(), 4)`;「还剩几小时」= `DATEDIF(承诺截止, NOW(), \"h\")`。",
|
|
67
68
|
"**计算由门户前端执行、API 不回填**:写测试数据带预算值;正确性由门户表单填表确认。设计器「计算规则」弹窗读取 `bizdatarule/list`(本规则即写入该表)。",
|
|
68
69
|
],
|
package/dist/recipes/field.js
CHANGED
|
@@ -308,7 +308,7 @@ const formulaAggregationCrossModel = Object.freeze({
|
|
|
308
308
|
conditionalRequirements: [
|
|
309
309
|
"**DYNAMIC 条件的两个 code 分属两侧,写反了就静默 0**:`propertyCode` = **来源模型**的字段(这里是 r17_c.nm),`currentPropertyCode` = **目标模型**的字段(这里是 r17_d.srcNo)。语义 = 「来源行的 nm 等于本目标行的 srcNo」。",
|
|
310
310
|
"`propertyType`/`currentPropertyType` 是 BizPropertyType 的**整数码**(0=SHORT_TEXT 2=NUMERICAL 9=WORK_SHEET…),`operatorType` 是 OperatorType 的**整数码**(1=EQ 6=ITEQ 9=IS_NULL 10=IS_NOT_NULL…)。写名字会被 ObjectMapperUtils 抛 json processing exception 并掩码成 305003;工具会自动转码。",
|
|
311
|
-
"`calculateType` 是**字符串**(SUM/COUNT/COUNTIF/SUMIF/AVG/MAX/MIN/**LARGE/SMALL/UNION**),不是枚举 code。r18b 真机三种特殊算法:LARGE/SMALL **必须带位置参数** `LARGE({<来源>.<列>},2)`(缺 k → 平台 NumberFormatException → 目标写入 50000);**UNION 是文本拼接**,顶层 `resultType` 必须是 0/LONG_TEXT=1(写 2 会 50000,读回是去重串,如单号本身);SUM/AVG/MAX/MIN/COUNT 用 resultType:2。",
|
|
311
|
+
"`calculateType` 是**字符串**(SUM/COUNT/COUNTIF/SUMIF/AVG/MAX/MIN/**LARGE/SMALL/UNION/PRODUCT**),不是枚举 code。2.1.5 新增 `PRODUCT`(累乘;8.6 无)。r18b 真机三种特殊算法:LARGE/SMALL **必须带位置参数** `LARGE({<来源>.<列>},2)`(缺 k → 平台 NumberFormatException → 目标写入 50000);**UNION 是文本拼接**,顶层 `resultType` 必须是 0/LONG_TEXT=1(写 2 会 50000,读回是去重串,如单号本身);SUM/AVG/MAX/MIN/COUNT 用 resultType:2。",
|
|
312
312
|
"发布后平台会**自动生成一条 t100 CALCULATE_RULE 镜像行**(h_biz_data_rule,propertyCode=字段 code),它是回算触发的前置条件,别手动删。",
|
|
313
313
|
"**回算时机(r17b 2026-10-26 真机完整行为图谱)**:① 目标行**自己 submit** 时镜像规则一定算(最可靠,不依赖事件);② 来源行 submit/update/delete 触发 `RollUpEventListener`→`FormulaPropertySupport` 事件回算——FIXED+DYNAMIC 混用、多组 OR、COUNTIF/MAX、子表行级条件(propertyCode 带 `.`)都验证过,DELETE 也会回算;③ ⚠️ 事件回算**只在目标模型发布后的几分钟内可靠**,之后静默停止(源端数据变了目标字段不更新、无报错)——重新 `field.publish --force` 目标模型即可恢复。定时巡检/对账场景务必重发或依赖目标行写入路径。",
|
|
314
314
|
],
|
package/dist/refusal-guidance.js
CHANGED
|
@@ -11,7 +11,7 @@ const SHAPE_GATES = Object.freeze({
|
|
|
11
11
|
},
|
|
12
12
|
"submit-date-shape": {
|
|
13
13
|
whatWentWrong: "日期字段的值形状不对(毫秒时间戳会落库 NULL)",
|
|
14
|
-
correctShape: "
|
|
14
|
+
correctShape: "字符串且逐位匹配字段 format:日期 \"YYYY-MM-DD\";日期时间 \"YYYY-MM-DD HH:mm:ss\"(DATE 支持到秒,不支持毫秒/ISO8601 带时区)",
|
|
15
15
|
recipeCommand: { tool: "data.submit", recipe: "plain-data-submit" },
|
|
16
16
|
doNot: "不要传毫秒数(如 1790000000000)——不报错但落库 NULL,读回才发现",
|
|
17
17
|
},
|
package/dist/wire.js
CHANGED
|
@@ -11,6 +11,7 @@ export class WireError extends Error {
|
|
|
11
11
|
errcode;
|
|
12
12
|
diagnostic;
|
|
13
13
|
hint;
|
|
14
|
+
payload;
|
|
14
15
|
constructor(kind, message, errcode,
|
|
15
16
|
/** Round-2 T-06: diagnosable context for malformed/http-status envelopes. */
|
|
16
17
|
diagnostic,
|
|
@@ -19,13 +20,56 @@ export class WireError extends Error {
|
|
|
19
20
|
* (例如「同一 schemaCode 去掉 filter 能读 → 是过滤形状问题」)。信封照实
|
|
20
21
|
* 保留 wire-business/errcode,只多一行可执行线索。
|
|
21
22
|
*/
|
|
22
|
-
hint
|
|
23
|
+
hint,
|
|
24
|
+
/**
|
|
25
|
+
* T20(2.1.5 发布门,2026-11-24):业务错误信封的 `data` 原样保留。平台把
|
|
26
|
+
* 「树形自定义选项非法」整个模型发布失败包成外层 300004「数据模型不存在!」
|
|
27
|
+
* + data 里的逐项 301013「…数据项的选项设置有误」;只留 errmsg 会把真正
|
|
28
|
+
* 原因丢掉,调用方永远查不到「模型不存在」(BizSchemaCheckServiceImpl
|
|
29
|
+
* :60-66 抛 BIZ_SCHEMA_MODEL_NOT_EXIST,明细在 data)。
|
|
30
|
+
*/
|
|
31
|
+
payload) {
|
|
23
32
|
super(message);
|
|
24
33
|
this.kind = kind;
|
|
25
34
|
this.errcode = errcode;
|
|
26
35
|
this.diagnostic = diagnostic;
|
|
27
36
|
this.hint = hint;
|
|
37
|
+
this.payload = payload;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 从 300004 业务错误的 `data` 里提取「选项设置有误」明细(T20 兜底)。
|
|
42
|
+
*
|
|
43
|
+
* 兼容两种载荷:裸数组 `[{statusCode:"301013",errMsg:"…"}]` 或
|
|
44
|
+
* `{data:[...]}`。命中条件与平台一致:`statusCode === 301013`(数字/字符串)
|
|
45
|
+
* 或 `errMsg`/`errContent` 含「选项设置有误」。返回去重后的消息;没有明细时
|
|
46
|
+
* 返回 `[]`,调用方据此保持原有 300004 解释(不要把无关 300004 抢成选项问题)。
|
|
47
|
+
*/
|
|
48
|
+
export function optionPublishMessages(payload) {
|
|
49
|
+
const items = Array.isArray(payload)
|
|
50
|
+
? payload
|
|
51
|
+
: payload !== null && typeof payload === "object" && Array.isArray(payload.data)
|
|
52
|
+
? (payload.data)
|
|
53
|
+
: undefined;
|
|
54
|
+
if (!items)
|
|
55
|
+
return [];
|
|
56
|
+
const messages = [];
|
|
57
|
+
for (const item of items) {
|
|
58
|
+
if (item === null || typeof item !== "object" || Array.isArray(item))
|
|
59
|
+
continue;
|
|
60
|
+
const row = item;
|
|
61
|
+
const status = row.statusCode;
|
|
62
|
+
const statusHit = status !== undefined && status !== null && String(status).trim() === "301013";
|
|
63
|
+
const message = typeof row.errMsg === "string" ? row.errMsg : typeof row.errContent === "string" ? row.errContent : undefined;
|
|
64
|
+
const textHit = message !== undefined && message.includes("选项设置有误");
|
|
65
|
+
if (!statusHit && !textHit)
|
|
66
|
+
continue;
|
|
67
|
+
if (message === undefined || !message.trim())
|
|
68
|
+
continue;
|
|
69
|
+
if (!messages.includes(message))
|
|
70
|
+
messages.push(message);
|
|
28
71
|
}
|
|
72
|
+
return messages;
|
|
29
73
|
}
|
|
30
74
|
/** Redact common secret keys and truncate — the malformed-envelope preview must be safe to log. */
|
|
31
75
|
function redactedBodyPreview(body, limit = 200) {
|
|
@@ -232,7 +276,7 @@ export async function wireCall(session, call) {
|
|
|
232
276
|
throw new WireError("malformed-envelope", `envelope for ${call.path} (${call.method ?? "GET"}) has no numeric errcode; body: ${redactedBodyPreview(body)}`, undefined, { httpStatus: response.status, bodyPreview: redactedBodyPreview(body) });
|
|
233
277
|
if (envelope.errcode !== 0) {
|
|
234
278
|
const message = typeof envelope.errmsg === "string" ? envelope.errmsg : "CloudPivot rejected the request";
|
|
235
|
-
throw new WireError("business", `errcode ${envelope.errcode} for ${call.path}: ${message}`, envelope.errcode);
|
|
279
|
+
throw new WireError("business", `errcode ${envelope.errcode} for ${call.path}: ${message}`, envelope.errcode, undefined, undefined, envelope.data);
|
|
236
280
|
}
|
|
237
281
|
const result = {
|
|
238
282
|
path: call.path,
|
package/dist/write.js
CHANGED
|
@@ -26,7 +26,7 @@ import { validateBusinessCode } from "./code-rules.js";
|
|
|
26
26
|
import { hardLayoutViolations, validateFormLayout } from "./form-layout.js";
|
|
27
27
|
import { prepareRuleGraph, validateRuleNodeGraph } from "./lanes/rule-graph.js";
|
|
28
28
|
import { assertRuleNamePlatformAcceptable } from "./rule-support.js";
|
|
29
|
-
import { WireError } from "./wire.js";
|
|
29
|
+
import { WireError, optionPublishMessages } from "./wire.js";
|
|
30
30
|
/**
|
|
31
31
|
* The shared governed write pipeline and the low-level write registration
|
|
32
32
|
* factory every lane adapter uses.
|
|
@@ -141,6 +141,25 @@ lintDeclaration = { lintScope: "partial", lintUnchecked: [] }) {
|
|
|
141
141
|
if (error instanceof WireError) {
|
|
142
142
|
// F3: rule-node runtime failures are masked by the platform as 300004.
|
|
143
143
|
if (error.errcode === 300004) {
|
|
144
|
+
// T20(2026-11-24):2.1.5 的树形自定义下拉发布门把「选项非法」包成
|
|
145
|
+
// 外层 300004「数据模型不存在!」+ data 里的逐项 301013「…数据项的
|
|
146
|
+
// 选项设置有误」(BizSchemaCheckServiceImpl :60-66)。payload 命中时
|
|
147
|
+
// 必须比业务规则运行时异常的解释更优先,否则用户会去查 rulelog。
|
|
148
|
+
const platformMessages = optionPublishMessages(error.payload);
|
|
149
|
+
if (platformMessages.length > 0) {
|
|
150
|
+
return {
|
|
151
|
+
status: "refused",
|
|
152
|
+
blocker: "field-options-publish-invalid",
|
|
153
|
+
errcode: 300004,
|
|
154
|
+
platformMessages,
|
|
155
|
+
message: `平台在发布时拒绝了字段选项(外层 300004「数据模型不存在!」只是外壳,明细 301013):${platformMessages.join(";")}。` +
|
|
156
|
+
"这是 2.1.5+ 的树形自定义下拉发布门,不是模型缺失或业务规则运行时异常:optionsSet.optionsType=\"custom\" + optionStructure=\"tree\" 时," +
|
|
157
|
+
"每个节点的 code(平台内部叫选项编码,口语叫 key)与 value(显示值)必须非空,且 code 全树唯一(RadioOptionsModel.validateCustomTreeOptions,launcher-2.1.5 .../bizmodel/RadioOptionsModel.java:130-142)。" +
|
|
158
|
+
"8.6/8.7 不查;平铺自定义/字典/业务模型下拉也不查。",
|
|
159
|
+
nextCommand: "omc call field.list --args '{\"schemaCode\":\"<model>\",\"published\":false}'",
|
|
160
|
+
nextAction: "核对报错字段的 optionsSet.custom 树,用 field.update 补非空 code/value;不需要层级就把 optionStructure 改成 \"flat\" 后重发",
|
|
161
|
+
};
|
|
162
|
+
}
|
|
144
163
|
return {
|
|
145
164
|
status: "refused",
|
|
146
165
|
blocker: `wire-${error.kind}`,
|
|
@@ -194,6 +213,64 @@ lintDeclaration = { lintScope: "partial", lintUnchecked: [] }) {
|
|
|
194
213
|
nextAction: "先 data.load/form.get 读回该记录(隐藏字段有真值),把缺失字段补进 payload 再提交;不要靠删字段绕过——规则仍会命中",
|
|
195
214
|
nextCommand: "omc call data.load --args '{\"schemaCode\":\"<model>\",\"bizObjectId\":\"<id>\"}'",
|
|
196
215
|
};
|
|
216
|
+
// 2.1.5 起新增的「格式/长度/维护锁」错误码(8.6 这些场景回 10005/40000/50000,
|
|
217
|
+
// 没有可读码)。不改变判定,只把码翻成人话 + 下一步。
|
|
218
|
+
if (error.errcode === 309056 || error.errcode === 309057) {
|
|
219
|
+
const kind = error.errcode === 309056 ? "名称" : "code";
|
|
220
|
+
return {
|
|
221
|
+
status: "refused",
|
|
222
|
+
blocker: `wire-${error.kind}`,
|
|
223
|
+
errcode: error.errcode,
|
|
224
|
+
"platform-version": "2.1.5+",
|
|
225
|
+
message: `${error.message}——2.1.5 起平台统一用 309056/309057 校验${kind}格式(8.6 是零散的 10005):名称 1–60 字符且不能以空格开头;code 必须字母开头、≤60、只含 A-Za-z0-9_。`,
|
|
226
|
+
nextAction: `按上述规则改 ${kind}后重试;不要靠换中文/特殊字符绕过`,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
if (error.errcode === 601016 || error.errcode === 601019)
|
|
230
|
+
return {
|
|
231
|
+
status: "refused",
|
|
232
|
+
blocker: "schema-maintenance-locked",
|
|
233
|
+
errcode: error.errcode,
|
|
234
|
+
"platform-version": "2.1.5+",
|
|
235
|
+
message: `${error.message}——模型正在做表结构变更/层级路径维护(2.1.5 新增 601016/601019),期间不接收写入;这是**暂时锁**,不是参数错。`,
|
|
236
|
+
nextAction: "等维护结束(或联系平台管理员确认迁移任务)后重试同一请求;不要改参数硬重试",
|
|
237
|
+
};
|
|
238
|
+
if (error.errcode === 700000)
|
|
239
|
+
return {
|
|
240
|
+
status: "refused",
|
|
241
|
+
blocker: "value-length-out-of-bounds",
|
|
242
|
+
errcode: 700000,
|
|
243
|
+
"platform-version": "2.1.5+",
|
|
244
|
+
message: `${error.message}——列长度溢出首次被翻译成 700000(8.6 只会回 40000/50000);先核对该字段的库列长度或 options 限制。`,
|
|
245
|
+
nextAction: "缩短该字段值,或改字段长度(field.update → field.publish)后重试",
|
|
246
|
+
};
|
|
247
|
+
if (error.errcode === 550038)
|
|
248
|
+
return {
|
|
249
|
+
status: "refused",
|
|
250
|
+
blocker: "inherited-rule-readonly",
|
|
251
|
+
errcode: 550038,
|
|
252
|
+
"platform-version": "2.1.5+",
|
|
253
|
+
message: `${error.message}——该业务规则继承自父级(2.1.5 新增继承机制),不能直接改/删/发布/启停。`,
|
|
254
|
+
nextAction: "到父级模型改规则,或用 rule.references 确认继承来源后再决定",
|
|
255
|
+
};
|
|
256
|
+
if (error.errcode === 401085)
|
|
257
|
+
return {
|
|
258
|
+
status: "refused",
|
|
259
|
+
blocker: "workflow-activity-name-invalid",
|
|
260
|
+
errcode: 401085,
|
|
261
|
+
"platform-version": "2.1.5+",
|
|
262
|
+
message: `${error.message}——2.1.5 的流程发布新增节点名校验:非空且 ≤80 字符单位(中文按 2 计),ERROR 级会让 publish 整体不发布。`,
|
|
263
|
+
nextAction: "workflow.get_draft 读回 activities[].name,缩短超长/补齐空名后重新 publish",
|
|
264
|
+
};
|
|
265
|
+
if (error.errcode === 480000)
|
|
266
|
+
return {
|
|
267
|
+
status: "refused",
|
|
268
|
+
blocker: "current-task-suspended",
|
|
269
|
+
errcode: 480000,
|
|
270
|
+
"platform-version": "2.1.5+",
|
|
271
|
+
message: `${error.message}——当前任务被挂起(2.1.5 新增:前置/串行任务未完成),不是提交参数错。`,
|
|
272
|
+
nextAction: "workitem.list 看同一实例的前置任务状态;前置完成后重试提交",
|
|
273
|
+
};
|
|
197
274
|
// 子表超限:8.6 = 36102,8.7/2.1.5 = 36104(同义)。
|
|
198
275
|
if (error.errcode === 36102 || error.errcode === 36104)
|
|
199
276
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
"README.md",
|
|
16
16
|
"!dist/**/*.js.map",
|
|
17
17
|
"!dist/**/*.d.ts",
|
|
18
|
-
"!dist/**/*.d.ts.map"
|
|
18
|
+
"!dist/**/*.d.ts.map",
|
|
19
|
+
"conformance/frontend-behavior-probe.mjs",
|
|
20
|
+
"conformance/frontend-scenarios"
|
|
19
21
|
],
|
|
20
22
|
"exports": {
|
|
21
23
|
"./package.json": "./package.json"
|
|
@@ -56,7 +58,7 @@
|
|
|
56
58
|
},
|
|
57
59
|
"dependencies": {
|
|
58
60
|
"commander": "14.0.3",
|
|
59
|
-
"omc-core": "0.
|
|
61
|
+
"omc-core": "0.7.0",
|
|
60
62
|
"proper-lockfile": "4.1.2",
|
|
61
63
|
"write-file-atomic": "6.0.0",
|
|
62
64
|
"zod": "^3.23.8",
|
|
@@ -74,6 +76,6 @@
|
|
|
74
76
|
"directory": "packages/omc-cli"
|
|
75
77
|
},
|
|
76
78
|
"optionalDependencies": {
|
|
77
|
-
"@stalfh233/omc-fake-platform": "0.
|
|
79
|
+
"@stalfh233/omc-fake-platform": "0.7.0"
|
|
78
80
|
}
|
|
79
81
|
}
|