@stalfh233/omc-cli 0.4.20 → 0.4.21

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.
@@ -51,7 +51,7 @@ export function registerBusinessRuleLane(tools) {
51
51
  inputSchema: {
52
52
  environment: environmentArg,
53
53
  schemaCode: z.string().min(1),
54
- full: z.boolean().optional().describe("行内联完整字段(id/createdTime/creator/…,并跳过 detailFile 外置);默认行只有 code/name/enabled/status/ruleVersion/defaultRule——平台预置触发行(defaultRule:true)客户端自滤"),
54
+ full: z.boolean().optional().describe("行内联完整字段(id/createdTime/creator/…,并跳过 detailFile 外置);默认行只有 code/name/enabled/status/ruleVersion/defaultRule/latestPublished——平台预置触发行(defaultRule:true)客户端自滤"),
55
55
  capability: capabilityArg,
56
56
  },
57
57
  handler: async (ctx, args, self) => governedRead(ctx, self, args, async (session) => {
@@ -71,6 +71,9 @@ export function registerBusinessRuleLane(tools) {
71
71
  status: row.status,
72
72
  ...(row.ruleVersion !== undefined ? { ruleVersion: row.ruleVersion } : {}),
73
73
  ...(row.defaultRule !== undefined ? { defaultRule: row.defaultRule } : {}),
74
+ // ticket-80's update-mode readback teaches following the same-code
75
+ // latestPublished row — keep the flag on the default face (5 B).
76
+ ...(row.latestPublished !== undefined ? { latestPublished: row.latestPublished } : {}),
74
77
  ...(fullRows
75
78
  ? {
76
79
  id: row.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.4.20",
3
+ "version": "0.4.21",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "commander": "14.0.3",
54
- "omc-core": "0.4.20",
54
+ "omc-core": "0.4.21",
55
55
  "proper-lockfile": "4.1.2",
56
56
  "write-file-atomic": "6.0.0",
57
57
  "zod": "^3.23.8",
@@ -24,7 +24,7 @@ omc help omc-write-hazards
24
24
  ## 模型字段与关联
25
25
 
26
26
  - **code 定位写前先核在册**:`field.update` / `rule.node.update` 等按 code 定位的精确写,先 `model.inspect` / `field.list` 确认 code 在册;缺码即停并报"目标不存在 + 当前字段清单"——**别凭用户措辞假定 code 正确**(用户可能记错字段名),**也别擅自替换成语义相近的字段**(改错对象比不改更糟)。缺码 `field.update` 本就拒 301001,但写前先核能省一轮失败往返,并在草稿阶段就把"字段不存在"与"需求理解偏差"分清。
27
- - **改名核对以字段读为准**:`field.update` 改名后,`model.inspect` 聚合面的 `fields[].name` 可能仍是旧值(发布态快照/聚合缓存);核对显示名、options 一律用 `field.list` / `field.get` 或 `form.publish` 回读——两处读数不一致时以字段读为准,别误判"写入没生效"而重复写。
27
+ - **改名核对以字段读为准**:`field.update` 改名后,`model.inspect` 聚合面的 `fields[].name` 可能仍是旧值(发布态快照/聚合缓存);核对显示名用 `field.list`(默认清单面有 name);核对 options 用 `field.list` 的 `code` 选择器 / `field.get` 或 `form.publish` 回读——两处读数不一致时以字段读为准,别误判"写入没生效"而重复写。
28
28
  - `propertyEmpty` 默认 `false`。模型层保持可空;必填、只读、可见性在表单和流程节点配置。
29
29
  - 无映射关联单选 `WORK_SHEET` 使用 `mappings: ""`,不要用 `"[]"`。`"[]"` 是非空字符串,设计器会显示“已设置”,但弹窗没有映射行。
30
30
  - 有映射时传非空 JSON 数组字符串,并在 draft/published 两面读回。