@stalfh233/omc-cli 0.4.100 → 0.4.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -1
- package/coverage/m1-coverage-manifest-v1.json +9 -3
- package/dist/cli-contract.js +5 -1
- package/dist/cli.js +1 -1
- package/dist/compound-writes.js +16 -5
- package/dist/discovery.js +7 -0
- package/dist/field-change.js +11 -6
- package/dist/field-families.js +60 -2
- package/dist/goal-routes.js +69 -0
- package/dist/governed-execution.js +1 -1
- package/dist/lanes/b2-registration.js +20 -3
- package/dist/lanes/businessrule-contract.js +4 -0
- package/dist/lanes/businessrule-coverage.js +1 -1
- package/dist/lanes/businessrule.js +93 -0
- package/dist/lanes/datarule-protocol.js +100 -0
- package/dist/lanes/field.js +29 -3
- package/dist/lanes/form-contract.js +1 -1
- package/dist/lanes/form.js +2 -2
- package/dist/lanes/online-js.js +19 -1
- package/dist/lanes/workflow.js +41 -6
- package/dist/online-js-source.js +7 -2
- package/dist/recipes/b2-registration.js +8 -7
- package/dist/recipes/businessrule.js +59 -1
- package/dist/rule-support.js +96 -0
- package/docs/images/omc-nixi/README.md +41 -0
- package/docs/omc-introduction.md +851 -0
- package/package.json +4 -4
- package/skills/omc-capabilities.md +3 -3
- package/skills/omc-refusals.md +1 -1
- package/skills/omc-tool-selection.md +1 -1
- package/skills/omc-write-hazards.md +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.102",
|
|
4
4
|
"description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "tsc --noEmit",
|
|
27
27
|
"coverage:manifest": "tsx scripts/coverage-manifest.ts --write",
|
|
28
28
|
"coverage:check": "tsx scripts/coverage-manifest.ts --check",
|
|
29
|
-
"test": "npm run build && node --test --import tsx test/*.test.ts",
|
|
29
|
+
"test": "npm run build && OMC_ASCII_STDOUT=0 node --test --import tsx test/*.test.ts",
|
|
30
30
|
"verify": "npm run typecheck && npm run coverage:check && npm test",
|
|
31
31
|
"eval:call-face": "node --import tsx scripts/run-call-face-eval.ts",
|
|
32
32
|
"eval:intent-face": "node --import tsx scripts/run-intent-face-eval.ts",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@stalfh233/omc-fake-platform": "0.4.
|
|
53
|
+
"@stalfh233/omc-fake-platform": "0.4.102",
|
|
54
54
|
"commander": "14.0.3",
|
|
55
|
-
"omc-core": "0.4.
|
|
55
|
+
"omc-core": "0.4.102",
|
|
56
56
|
"proper-lockfile": "4.1.2",
|
|
57
57
|
"write-file-atomic": "6.0.0",
|
|
58
58
|
"zod": "^3.23.8",
|
|
@@ -95,7 +95,7 @@ only the section for the capability you need —
|
|
|
95
95
|
- **跨模型汇总可以用 FORMULA(100) + AGGREGATION,REST 能回算**(r17 真机 100→105):`omc describe field.create --example formula-aggregation-cross-model`;`queryConditions` 必须给 DYNAMIC 条件(propertyCode=来源字段、currentPropertyCode=目标字段),空条件静默得 0。
|
|
96
96
|
- **同模型(含自己的子表)聚合不可用**:`field.publish` 必抛 305003(`aggregation-self-schema-cycle`,平台 `checkCycleOfAggregation:1032` 逻辑成环)。
|
|
97
97
|
- 只有 `FORMULA`(计算公式,`propertyType:100`)字段是**门户前端**计算、API 不回填(旧证据 2026-09-25/10-07,仅覆盖该字段类型)。
|
|
98
|
-
- 子表列支持标量族 + WORK_SHEET 关联列(需 `relativeCode`+options
|
|
98
|
+
- 子表列支持标量族 + WORK_SHEET 关联列(需 `relativeCode`+options);**子表套子表平台本身不存在**(一级子表就是上限),`MULT_WORK_SHEET` / `RELEVANCE_DATA` 不覆盖。
|
|
99
99
|
|
|
100
100
|
## 默认表单 `form`
|
|
101
101
|
|
|
@@ -130,7 +130,7 @@ only the section for the capability you need —
|
|
|
130
130
|
## 业务规则 `businessrule`
|
|
131
131
|
|
|
132
132
|
- **能做哪些事**:图形规则图(nodeGraph)——数据事件(Create/Update/Delete)触发、按钮/流程触发、动作节点(UPDATE/CREATE/DELETE/QUERY/ASSIGN/MESSAGE/BIZ_ACTION/GET_LIST…)、BRANCH 条件分支、**定时任务 TIMING_TASK**(每天/周期,SCHEDULER 节点)。
|
|
133
|
-
- **工具**:`rule.list`、`rule.get`、`rule.save`、`rule.node.update`
|
|
133
|
+
- **工具**:`rule.list`、`rule.get`、`rule.references`(跨规则引用检索:谁引用了服务/模型/字段)、`rule.save`、`rule.node.update`
|
|
134
134
|
- **recipe**:
|
|
135
135
|
- `omc describe rule.save --example standard-business-rule-graph`
|
|
136
136
|
- `omc describe rule.save --example business-rule-branch-conditional`
|
|
@@ -199,7 +199,7 @@ only the section for the capability you need —
|
|
|
199
199
|
| 面 | 状态 | 说明 |
|
|
200
200
|
| --- | --- | --- |
|
|
201
201
|
| 权限 / 授权矩阵 | blocked | 授权矩阵不在配置面 |
|
|
202
|
-
| 嵌套子表(子表套子表) |
|
|
202
|
+
| 嵌套子表(子表套子表) | 平台不存在 | 平台本身就是一级子表:主表可多子表,子表不能再套子表;不是 CLI 缺口,不要按此设计 |
|
|
203
203
|
| OCR / 电子签章 / 发票识别 | unsupported | 不在平台配置覆盖内 |
|
|
204
204
|
| 应用发布 / 环境上线 / 生产发布 | unsupported | CLI 只做配置,不做环境发布 |
|
|
205
205
|
| 在线后端编码 / EXECUTE_CODE / ONLINE_DEVELOP | unsupported | 用二开扩展包,不用在线 JS 伪造 |
|
package/skills/omc-refusals.md
CHANGED
|
@@ -40,7 +40,7 @@ usually carries `validation` entries to fix one by one.
|
|
|
40
40
|
- `business-code-invalid`, `duplicate-field`, `duplicate-service`,
|
|
41
41
|
`dictionary-create-duplicate`, `app-create-duplicate`, `model-create-duplicate`
|
|
42
42
|
- `field-*` family gates (unaccepted family, missing relation `relativeCode`,
|
|
43
|
-
|
|
43
|
+
child-table column that is itself a child table, OCR/ELECTRONIC_SIGN)
|
|
44
44
|
- `form-layout-invalid`, `form-fieldcodes-unknown`, `form-html-render-invalid`
|
|
45
45
|
- `rule-graph-validation-failed`, `rule-graph-*` (node-graph dry lint)
|
|
46
46
|
- `datarule-options-invalid`, `datarule-property-not-published`, `datarule-duplicate-property-type`
|
|
@@ -85,7 +85,7 @@ Writes:
|
|
|
85
85
|
1. Default to the high layer; drop to atoms only to compose what the orchestration doesn't cover.
|
|
86
86
|
2. Preview any write with `dryRun:true`; it returns the plan and executes nothing.
|
|
87
87
|
3. `writable:false` refuses before any wire. A production write additionally requires `confirmProduction:true`.
|
|
88
|
-
4. Out-of-coverage desire (permissions,
|
|
88
|
+
4. Out-of-coverage desire (permissions, cross-model child linkage, OCR, app publish)? The refusal cites the manifest entry — that is the answer. Check `coverage.manifest`. Note: nested child tables are not a coverage gap — the platform itself only supports one level of child table.
|
|
89
89
|
5. If any call returns `uncertain`, stop writing and re-run discovery before the next write.
|
|
90
90
|
|
|
91
91
|
## Key-name table (同一对象在不同工具里的键名)
|
|
@@ -20,6 +20,12 @@ omc help omc-write-hazards
|
|
|
20
20
|
- 调用方显式传 `draftAttributesJson`/`draftViewJson` 时,CLI 会在写前拒绝字符串 options、非字符串 viewJson 单元、子列混入 viewJson。
|
|
21
21
|
- `form.draft rebuild:true` 会重建布局,但会保留已存在的非结构性控件 options;Sheet201 columns 以最新 subSchema 为准。
|
|
22
22
|
- 空布局 `[]`/`{}` 默认拒绝;只有显式 `allowEmptyLayout:true` 才能清空。
|
|
23
|
+
- **列数由 viewJson 行分组决定,不是 span**(2026-10-27 r24 真机实证):`viewJson` 是行的数组,一行内 N 个 code 即 N 列;`span` 只是 24 栅格下的控件宽度。只把字段 `span` 改 8 而不动行分组 → 控件变窄但每行仍两个,不是三列。改列数必须同时改行分组(三列=每行 3 个 code,字段 span=8)→ `form.publish` → `form.get` 回读 viewJson 核对。系统字段行与业务字段行分开调整。
|
|
24
|
+
- **模型不支持跨应用迁移**(1.1.25 真机实证:`folder-other-application` 拒绝):模型建错应用时走「新应用重建 + 关联引用改指 + 旧模型删除」,不存在物理迁移命令。
|
|
25
|
+
- **流程编排器是线性的,无并行会签**(1.1.25 实证):多部门会签只能建成顺序节点链;需求里的「并行会签」按顺序节点落地并在交付说明里披露。
|
|
26
|
+
- **BIZ_ACTION 服务出参只认响应 JSON 根级平铺键**(p7/r26 双实证):嵌套在信封里(如 `{data:{level}}`)静默映射不上、目标字段全空——先把这类判断列进方案:接口形态要在「平铺 vs 信封」间做选择时,需要回写本平台的出参一律平铺。外部系统本身回信封的,扩展整形转发或放弃出参回写。
|
|
27
|
+
- **`{Originator.OU}` 参与人变量在 1.1.25 本环境不解析成部门**(r26 实证 4 轮误判):发起人部门参与人写法先小样本验证解析,失败改用显式部门/角色参与人,不要反复重配角色。
|
|
28
|
+
- **BRANCH 条件分支与运行时规则次序互斥**(r26 实证 3 轮):该版本 BRANCH 节点的工具校验与运行时执行规则冲突时,改用按钮触发或顺序节点路由条件,不硬调 BRANCH。
|
|
23
29
|
|
|
24
30
|
## 模型字段与关联
|
|
25
31
|
|
|
@@ -46,6 +52,12 @@ omc help omc-write-hazards
|
|
|
46
52
|
- **`Create` 的触发判定是「旧状态→新状态」**:旧 `DRAFT` 且新 `PROCESSING` 或 `COMPLETED`(`DomainServiceImpl#getDefaultRuleCode`)。所以无流程模型一调 `data.submit`(→COMPLETED)**和流程表单提交(DRAFT→PROCESSING)都触发 Create**;`data.save` 存草稿不触发。不要因为"目标表没变化"就断言规则没触发。
|
|
47
53
|
- **副作用缺失归因三步**:先查执行记录(`h_log_biz_service` 按服务/方法/时间,或容器日志)→ ①无调用=规则/触发问题 ②有调用但失败=参数/权限/业务异常 ③调用成功但不可见=视图投影/事务未提交/查询条件。禁止只看目标表。
|
|
48
54
|
- **BIZ_ACTION 判成功只看传输**:REST 适配器解析响应后直接返回,**不校验 `errcode`**。扩展接口回 `{"errcode":50000}` + HTTP 200 会被当成节点成功(日志 `biz action node execute successful`)。要阻断必须走表单 `onValidate` 或数据规则,不能靠业务返回码。
|
|
55
|
+
- **`rule.run`/自定义规则不回写出参**(r26 实证 2 轮):出参合并只发生在预置 Update 规则的执行上下文;`rule.run` 手动触发与自定义规则不把服务出参写回本模型——出参落表要走「BIZ_ACTION 节点 outputMappings + 数据事件触发」,验收用 data.load 看字段而非 rule.run 回执。
|
|
56
|
+
- **出参回写三前提(r28b 8 组实验定案,单点总纲)**:① 响应 JSON 根级平铺出参键 ② 预置 Create/Update 规则上下文 ③ data.submit/data.update 触发(data.save 不触发)。三者缺一出参恒 null 且节点日志仍 successful——外部接口回信封的(`{code,message,data:[...]}`),先落平铺整形端点(平台扩展)再配 outputMappings,不要反复换规则形状试。
|
|
57
|
+
- **布尔出参映射到文本字段 → ClassCastException 50000**(r28b 实证):服务出参 `bizPropertyType:LOGICAL` 的值映射到 SHORT_TEXT 字段会让规则执行炸 50000——布尔出参只能映射 LOGICAL 字段;要落文本先在扩展侧转字符串。
|
|
58
|
+
- **审批提交的 formData 带子表数组 = 追加行**(r28b 实证):approval submit 的 formData 里带子表数组会被平台当「追加行」处理,审批回执只回传主表字段——审批链路里要改子表行,用 data.update 单独写,不要塞进 formData。
|
|
59
|
+
- **workItemId 不在 instanceActivity 里**(r28b 实证):流程实例活动查询不返回 workItemId;办理待办要的 workItemId 从 `search_workitems?state=PENDING` 的 `content[].id` 取。
|
|
60
|
+
- **模型创建/删除非原子,会有半态残留**(r28b 实证 ~20min):model.create 在表单层撞错(如「表单已存在」)时 schema 可能已半落库——refused 后换名重试前先 model.list 核对半态并清理;同理模型删除后平台读面不可见但库里可能留僵尸行(引擎报 `appFunction not exist` 就是它在作祟),迁移/复用编码前先核对。
|
|
49
61
|
- **流程事件处理器吞异常**:`start`/`end`/`cancel`/`activate` 中的 BIZ_ACTION 抛异常时,`InstanceContext#processingBusiness` 只记 `processingBusiness error.` 并返回失败结果,**流程继续**。事件处理器不能做"提交前拦截"。
|
|
50
62
|
- **禁写当前单据**:BIZ_ACTION 是 HTTP 自调用,外层事务已持行锁;同事务更新当前单据会等到 15s 超时并整条回滚。副作用写独立表;需要留痕用独立事务/异步重建 `RequestContext`。
|
|
51
63
|
|
|
@@ -78,6 +90,8 @@ omc help omc-write-hazards
|
|
|
78
90
|
## 子表
|
|
79
91
|
|
|
80
92
|
- 一个主表可以有多个 `CHILD_TABLE`,子表不能嵌套 `CHILD_TABLE`。
|
|
93
|
+
- **子表控件(type 201)的显示/只读条件(displayFormula/readonlyFormula)不在字段面**:`field.update` 对子表父控件必拒(只管子表**列**)。可行路径是表单 attributes:`form.get --controls` 读 `draftAttributesJson` 定位控件 → `form.draft` 改该控件条件 → `form.publish`(`omc next "子表控件显示条件"` 已路由到该链)。
|
|
94
|
+
- **直调 `runtime/form/save` 更新既有记录时主键放 `data.id`**:`bizObject.bizObjectId` 不被保存逻辑识别——接口仍回 `errcode:0` 但 `objectId` 是**新 id**(静默新增孤儿数据,券商 issue 2026-10-27 实证 2 条)。用 `omc call data.update` 则无此坑(`bizObjectId` 在顶层参数位)。
|
|
81
95
|
- 子列是子表字段 code 对应 schema 上的普通字段:
|
|
82
96
|
|
|
83
97
|
```bash
|