@stalfh233/omc-cli 0.4.99 → 0.4.101
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/call.js +8 -3
- package/dist/capability-overview.js +12 -0
- package/dist/cli-contract.js +5 -1
- package/dist/cli.js +238 -12
- package/dist/closest-match.js +34 -0
- package/dist/compound-writes.js +310 -0
- package/dist/discovery.js +230 -9
- package/dist/goal-routes.js +159 -57
- 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/field.js +10 -1
- package/dist/lanes/form.js +2 -2
- package/dist/lanes/report.js +21 -5
- package/dist/lanes/workflow.js +38 -3
- package/dist/recipes/b2-registration.js +8 -7
- package/dist/recipes/businessrule.js +58 -1
- package/dist/refusal-guidance.js +207 -0
- package/dist/rule-support.js +96 -0
- package/dist/skills.js +89 -21
- package/dist/tools.js +35 -0
- package/dist/usage-log.js +21 -2
- package/dist/write.js +2 -2
- package/docs/images/omc-nixi/README.md +41 -0
- package/docs/omc-introduction.md +851 -0
- package/package.json +3 -3
- package/skills/omc-capabilities.md +3 -3
- package/skills/omc-refusals.md +1 -1
- package/skills/omc-start-here.md +2 -1
- package/skills/omc-tool-selection.md +1 -1
- package/skills/omc-write-hazards.md +5 -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.101",
|
|
4
4
|
"description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -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.101",
|
|
54
54
|
"commander": "14.0.3",
|
|
55
|
-
"omc-core": "0.4.
|
|
55
|
+
"omc-core": "0.4.101",
|
|
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`
|
package/skills/omc-start-here.md
CHANGED
|
@@ -26,7 +26,7 @@ be treated as a second source. Read this, then follow the topics it names.
|
|
|
26
26
|
- `build`/`modify` → 按阶梯内联的**写工具 + 必填参数**执行。
|
|
27
27
|
- `scout`(能不能/怎么写/是否支持)→ 先探边界(`omc-capability-scouting`),别直接写。若 `next` 返回 **`boundary`**(`match.kind:"boundary"`,如 `ocr-e-signature`/`release-prod`/`inline-coding`),说明需求**不在覆盖内**(`write:false`):如实报告、用 `omc capabilities` 核对,**不要**用相近能力伪造实现。
|
|
28
28
|
阶梯步骤已内联工具必填参数(`route.ladder[].tools`/`readTools`)与命中 recipe 的 `describe <tool> --example <id>`;据此直接执行——**不要再逐能力 `commands --lane`**,也不要先扫 `commands --json`/全部 `contract`/全部 `describe --full`。
|
|
29
|
-
方法论按 `route.readSections` 逐节读:对每条 `{topic, section}` 执行 `omc help <topic> --section "<section>"`(单节 0.4–3.4KB)。`omc help <topic>` 默认只回节索引(约 1KB,含每节字节数);**不要 `--all` 读整篇**(5–14KB
|
|
29
|
+
方法论按 `route.readSections` 逐节读:对每条 `{topic, section}` 执行 `omc help <topic> --section "<section>"`(单节 0.4–3.4KB)。`omc help <topic>` 默认只回节索引(约 1KB,含每节字节数);**不要 `--all` 读整篇**(5–14KB,读一次就留在后续每一轮窗口)。**带着具体问题(错误码/跨能力语义/某个词)直接 `omc help --search "<词>"`**——跨全部 topic 全文检索,命中节的正文随结果内联返回,一次调用就是答案;**严禁自己写 `for t in …; do omc help $t --all | grep …` 循环**(r18 实测 12 调用/176KB,检索一次 8KB 搞定)。
|
|
30
30
|
2. 写前只需读 `omc-config-draft-review`(人审门)与 `omc-five-piece-flow`(发现→草稿→权限→执行→回读);`omc-business-configuration` 按命中的能力分节读(见 `next` 的 `readSections`),不要整篇预取。
|
|
31
31
|
3. 环境名以 `omc doctor` 的「环境=」或 `.omc-env` 为准;工具不确定先用默认 `describe`/`--example`,只有单个工具缺形状才用 `--full`;`describe` 带 `exampleHint`/`recipeHint` 时优先 `--example`。
|
|
32
32
|
4. 只有工具不在 `next` 命中能力内、或要看 purpose/枚举时,才补一次 `commands --json --compact --lane <lane>`。非显然形状(规则图、流程模板、表单布局、RESTFUL)才单独 `describe --example`。
|
|
@@ -50,6 +50,7 @@ omc script - --env <env> <<< '{"tool":"model.list"}' # 多调链:NDJSON 每
|
|
|
50
50
|
omc capability <selected-id> # only the selected capability
|
|
51
51
|
omc describe <tool> --example <recipe-id> # recipe first; default describe otherwise
|
|
52
52
|
omc help <topic> --section "<heading>" # one methodology section, not all
|
|
53
|
+
omc help --search "40000" # full-text search across all topics (answer in one call)
|
|
53
54
|
```
|
|
54
55
|
|
|
55
56
|
Discovery precedes every write. 预算档位见 `omc-tool-selection` 的「Discovery 成本档位」;裸 `omc commands` 是有界索引,全量目录须显式 `commands --json`。
|
|
@@ -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,9 @@ 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 实证):多部门会签只能建成顺序节点链;需求里的「并行会签」按顺序节点落地并在交付说明里披露。
|
|
23
26
|
|
|
24
27
|
## 模型字段与关联
|
|
25
28
|
|
|
@@ -78,6 +81,8 @@ omc help omc-write-hazards
|
|
|
78
81
|
## 子表
|
|
79
82
|
|
|
80
83
|
- 一个主表可以有多个 `CHILD_TABLE`,子表不能嵌套 `CHILD_TABLE`。
|
|
84
|
+
- **子表控件(type 201)的显示/只读条件(displayFormula/readonlyFormula)不在字段面**:`field.update` 对子表父控件必拒(只管子表**列**)。可行路径是表单 attributes:`form.get --controls` 读 `draftAttributesJson` 定位控件 → `form.draft` 改该控件条件 → `form.publish`(`omc next "子表控件显示条件"` 已路由到该链)。
|
|
85
|
+
- **直调 `runtime/form/save` 更新既有记录时主键放 `data.id`**:`bizObject.bizObjectId` 不被保存逻辑识别——接口仍回 `errcode:0` 但 `objectId` 是**新 id**(静默新增孤儿数据,券商 issue 2026-10-27 实证 2 条)。用 `omc call data.update` 则无此坑(`bizObjectId` 在顶层参数位)。
|
|
81
86
|
- 子列是子表字段 code 对应 schema 上的普通字段:
|
|
82
87
|
|
|
83
88
|
```bash
|