@stalfh233/omc-cli 0.6.79 → 0.6.81

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.
@@ -122,6 +122,10 @@ const READ_SHAPES = {
122
122
  // activities[] 只是投影;完整模板在 data(>8KB 外置 detailArtifactId,配合
123
123
  // artifact get --shape 先看骨架再 --jq)。published/draft 两面同形,仅 templateType
124
124
  // 与 published 键不同。
125
+ "workflow.list": {
126
+ keys: ["applicationResolution", "modelsCount", "scannedModels", "withWorkflow", "publishedCount", "absentCount", "workflows:array<{modelCode,workflowCode,exists,published,ruleBindingCount,readFailed?}>", "wire", "partial?", "omittedModels?", "nextCommand?", "indexNote", "environmentFingerprint"],
127
+ notes: ["无流程的模型 workflowCode:null + exists:false(不是错误);平台无流程清单端点,本面按模型索引(流程-模型一对一惯例,workflowCode 常为 <模型code>_flow)", "ruleBindingCount = flow 级 handler 绑定 + 节点级事件绑定的规则码总数(比 get_published 摘要里的同名键多算节点级)"],
128
+ },
125
129
  "workflow.get_published": {
126
130
  keys: ["status", "workflowCode", "exists", "published", "workflowSummary:{workflowCode,templateType,activities:array<{index,code,type,name,bizActions?:{<nodeEvent>:[ruleCode]}}>,edges:array<{from,to}>,ruleBindings:array<{...}>,ruleBindingCount,originateActivity:{code,type,name,participant}}", "activities:array<{code,name,type,bizActions?}>(投影)", "propertyPermissionsCount", "version", "summaryHint", "truncatedKeys?", "omittedKeys?", "truncated?", "data?(外置时 null,完整模板在 detailArtifactId)", "omittedShape?", "omittedNote?", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
127
131
  notes: ["节点绑定看 activities[].bizActions(默认 summary 已含,无绑定则键缺席);完整模板在 data(外置 detailArtifactId),要深层字段时投影写到叶子(如 --jq 'data.activities[].bizActions')——写整棵父节点会因总量超限再次被外置"],
@@ -131,11 +135,13 @@ const READ_SHAPES = {
131
135
  notes: ["与 workflow.get_published 同形(少了 published 键);节点绑定看 activities[].bizActions;templateType=DRAFT;深层字段投影写到叶子,完整模板在 data/detailArtifactId"],
132
136
  },
133
137
  "rule.list": {
134
- keys: ["rules:array<{code,name,enabled,status}>", "modelPresent", "source", "executableHint"],
138
+ keys: ["rules:array<{code,name,enabled,status,ruleVersion,defaultRule,preset,mappings?,mappingsUnavailable?}>", "rulesCount", "modelPresent", "source", "executableHint", "mappingsWireNote?", "schemaCodes?/modelsCount?/models?:array<每模型同单模型回执>/partial?/failed?:array<{schemaCode,code,message}>/absentModels?"],
135
139
  notes: [
136
140
  "入参/他面叫 ruleCode,本面返回 rules[].code",
137
141
  "source=published-list:enabled/status 来自 PUBLISH 投影;可执行性看 rule.get / rule.enable.verified",
138
142
  "modelPresent:false 时未发 list(避免幻影 schema 补建 7 条预置)",
143
+ "withMappings:true 时每行带 mappings[]={nodeCode,serviceCode,serviceMethodCode,inputCount,outputCount}(摘要,正文 inputMappings/outputMappings 用 rule.get);行里读不到图 → mappingsUnavailable:true(≠没有映射)",
144
+ "schemaCodes[] 跨模型清单:models[] 每元素与单模型回执同形(含 modelPresent:false/rulesCount;三句提示抬到顶层 crossModelNotes,逐模型相同不重复),失败汇总在 failed[](partial:true);上限 20 个模型",
139
145
  ],
140
146
  },
141
147
  // r72g(2026-11-17 探针):`rule.references`(在线,仅 businessrule)与
@@ -155,10 +161,10 @@ const READ_SHAPES = {
155
161
  // service.get,分插各自族附近);键集全部来自真机回执采样(非手写发明),
156
162
  // returnsFace 只显 notes[0],高频陷阱并进首条。
157
163
  "rule.get": {
158
- keys: ["status", "id", "absent", "code", "name", "schemaCode", "bizRuleType", "enabled", "executable", "executableBasis", "ruleStatus", "defaultRule", "developmentMode", "ruleVersion", "templateType", "nodes:array<{nodeCode,nodeName,nodeType,nodeCategory?,inputParam?,methodMapping:{schemaCode,serviceCode,serviceMethodCode,inputMappings[],outputMappings[],serviceName,serviceMethodName},serviceType?}>", "routes:array<{preNode,postNode,routeCondition,matchType}>", "schedulerSetting?", "renderCompat", "semanticFindings?", "roundTrip", "nodeDigests?:array<{nodeCode,nodeType,methodMapping:{serviceCode,serviceMethodCode}}>(summary)", "methodMappingCount?(summary)", "bytesOmitted?(summary)", "rules?:array<摘要体>(ruleCodes 批量)", "rulesCount?/requestedCount?/partial?/failed?:array<{code,reason}>(批量)", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
164
+ keys: ["status", "id", "absent", "code", "name", "schemaCode", "bizRuleType", "enabled", "executable", "executableBasis", "ruleStatus", "defaultRule", "developmentMode", "ruleVersion", "templateType", "nodes:array<{nodeCode,nodeName,nodeType,nodeCategory?,inputParam?,methodMapping:{schemaCode,serviceCode,serviceMethodCode,inputMappings[],outputMappings[],serviceName,serviceMethodName},serviceType?}>", "routes:array<{preNode,postNode,routeCondition,matchType}>", "schedulerSetting?", "renderCompat", "semanticFindings?", "roundTrip", "nodeDigests?:array<{nodeCode,nodeType,methodMapping:{serviceCode,serviceMethodCode}}>(summary)", "methodMappingCount?(summary)", "bytesOmitted?(summary)", "rules?:array<摘要体>(ruleCodes 批量)", "rulesCount?/requestedCount?/partial?/failed?:array<{code,reason}>(批量;跨模型 failed 每条带 schemaCode)", "models?:array<{schemaCode,modelPresent,rulesCount,failedCount}>(跨模型)", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
159
165
  notes: [
160
- "绑定方法:默认面看 nodes[].methodMapping.serviceCode/serviceMethodCode(三层深);扫多规则/多模型用 summary:true + ruleCodes[](同 schemaCode,1 次 list/wire 模型)——摘要键是 nodeDigests,不是 nodes(nodes 只在默认面)",
161
- "入参 ruleCode 对应本面返回的 code;enabled 是开关推断,可执行性看 executable/executableBasis;批量面的 failed 是**数组**,所以信封仍是 status:ok + partial:true(不是 partial 状态)",
166
+ "绑定方法:默认面看 nodes[].methodMapping.serviceCode/serviceMethodCode(三层深);扫多规则用 summary:true + ruleCodes[](同 schemaCode,1 次 list),扫多模型再配 schemaCodes[](≤20,逐模型 1 探针 + 1 list)——摘要键是 nodeDigests,不是 nodes(nodes 只在默认面)",
167
+ "入参 ruleCode 对应本面返回的 code;enabled 是开关推断,可执行性看 executable/executableBasis;批量面的 failed 是**数组**,所以信封仍是 status:ok + partial:true(不是 partial 状态);跨模型 failed[] 每条带 schemaCode(模型不存在 → modelPresent:false,不发规则面请求)",
162
168
  ],
163
169
  },
164
170
  "datarule.list": {
package/dist/read.js CHANGED
@@ -148,7 +148,33 @@ function compactReadback(result) {
148
148
  // 变成死代码——`models` 同时在 BULKY_READ_KEYS 里,而那个分支排在最前,于是
149
149
  // 永远只回 `modelsCount:30` + `models:[]`,调用方拿不到任何 schemaCode,被迫
150
150
  // 再花一次 `--jq`/artifact(997 B + 一整轮)。保形分支必须先于折叠分支。
151
- if (CODE_NAME_LIST_KEYS.has(key) && Array.isArray(value)) {
151
+ // r83:rule.list --schemaCodes[] 的 models[] 是**回执对象数组**(元素带
152
+ // modelPresent),不是码表——CODE_NAME_LIST_KEYS 会把它折成字符串数组,
153
+ // 跨模型回执不可用。保形:每元素留 schemaCode/modelPresent/rulesCount/
154
+ // customCount + rules 瘦身行(≤12,同顶层 rules 口径);三句提示已抬到
155
+ // crossModelNotes,不逐模型重复。
156
+ if (key === "models" && Array.isArray(value) && value.length > 0 &&
157
+ typeof value[0] === "object" && value[0] !== null &&
158
+ "modelPresent" in value[0]) {
159
+ compact[key] = value.map((model) => {
160
+ const rules = Array.isArray(model.rules) ? model.rules : [];
161
+ return {
162
+ schemaCode: model.schemaCode ?? null,
163
+ modelPresent: model.modelPresent ?? null,
164
+ rulesCount: typeof model.rulesCount === "number" ? model.rulesCount : rules.length,
165
+ ...(model.customCount !== undefined ? { customCount: model.customCount } : {}),
166
+ rules: rules.slice(0, 12).map((rule) => ({
167
+ code: typeof rule.code === "string" ? rule.code : null,
168
+ name: typeof rule.name === "string" ? rule.name : null,
169
+ ...(rule.enabled !== undefined ? { enabled: rule.enabled } : {}),
170
+ ...(Array.isArray(rule.mappings) ? { mappings: rule.mappings } : {}),
171
+ ...(rule.mappingsUnavailable === true ? { mappingsUnavailable: true } : {}),
172
+ })),
173
+ };
174
+ });
175
+ compact[`${key}Count`] = value.length;
176
+ }
177
+ else if (CODE_NAME_LIST_KEYS.has(key) && Array.isArray(value)) {
152
178
  const pairs = value.map(codeNameOfEntry).filter((entry) => entry !== undefined);
153
179
  // 40 对上限(~1-2KB):更大的清单回退 count+artifact,保冷启动可扫又不失控
154
180
  if (pairs.length <= 40)
@@ -158,6 +184,11 @@ function compactReadback(result) {
158
184
  if (!compact[`${key}Count`])
159
185
  compact[`${key}Count`] = value.length;
160
186
  }
187
+ else if (key === "crossModelNotes" && value !== null && typeof value === "object" && !Array.isArray(value)) {
188
+ // r83:跨模型面抬上来的三句提示(逐模型相同,只存一份)——原样保留,
189
+ // 不被通用对象分支摘要成 {keys}(否则默认面丢教学)。
190
+ compact[key] = value;
191
+ }
161
192
  else if (CODE_LIST_KEYS.has(key) && Array.isArray(value)) {
162
193
  // 2026-11-01 预算批 v2:读门 4096→2048 后,中结果(r38 实测 model.inspect
163
194
  // 17 次 51KB 全部卡旧门下全内联)走 compact——配置清单类数组保形为码表
@@ -181,6 +212,11 @@ function compactReadback(result) {
181
212
  name: typeof rule.name === "string" ? rule.name : null,
182
213
  ...(rule.enabled !== undefined ? { enabled: rule.enabled } : {}),
183
214
  ...(rule.defaultRule !== undefined ? { defaultRule: rule.defaultRule } : {}),
215
+ // r83:rule.list --withMappings 的映射摘要随行保留(否则 >2048B 的
216
+ // 常见 7 条预置规则会「开了 withMappings 却在默认面看不到映射」);
217
+ // 只有显式开启该参数的行才有这个键,其余工具的 rules 不受影响。
218
+ ...(Array.isArray(rule.mappings) ? { mappings: rule.mappings } : {}),
219
+ ...(rule.mappingsUnavailable === true ? { mappingsUnavailable: true } : {}),
184
220
  }));
185
221
  compact[key] = slim;
186
222
  }
@@ -379,7 +379,7 @@ const formulaExpressionSameModel = Object.freeze({
379
379
  const externalLookupModel = Object.freeze({
380
380
  id: "external-lookup-model",
381
381
  title: "外部数据映射模型:接口数据落表 + 关联单选下拉带出(填表时即映射)",
382
- aliases: ["外部数据源", "接口映射模型", "企查查下拉", "关联带出", "映射模型", "外部数据带出"],
382
+ aliases: ["外部数据源", "接口映射模型", "企查查下拉", "关联带出", "映射模型", "外部数据带出", "关联映射", "改关联映射"],
383
383
  status: "requires-prior-readback",
384
384
  tool: "field.create",
385
385
  args: {
@@ -403,6 +403,7 @@ const externalLookupModel = Object.freeze({
403
403
  "**数据段首选(平台标准模式,2026-10-29 playwright 门户实证定案)**:映射模型的 GetList/Load 规则挂 BIZ_ACTION 实时调接口(接口方法配 frontEndExtensionEnable:true)——门户关联控件**打开即触发**前端查询链→GetList 规则→BIZ_ACTION 实时调外部接口(引擎日志 bizBusService.invoke + 外部网关日志双侧铁证)。**验证必须走门户填表;data.list 后端查询不反映此链,别用它判死**(r29 曾据此误判不成立)。配置侧三个收尾点:① WORK_SHEET 字段必须带 relativeCode(仅 options.schemaCode 发布表单会 301015 关联业务模型为空);② GetList 规则的 BIZ_ACTION 入参映射要接前端搜索词(实测未配词时 invoke 参数为空 {});③ 出参→列表行的映射配完候选才回显(未配时弹窗 Total 0 但接口已调)。「下拉框形态(输关键字回车查询)」是表单 attributes 层的控件形态设置,默认弹窗形态。备选(不需要实时时):预置 Create/Update 规则落映射表 / TIMING 定时同步。图内「BIZ_ACTION→CREATE 落表→再查」回环在 1.1.25 不可表达,不要走这条岔路。",
404
404
  "**表单段是平台原生能力**:关联单选指向映射模型后,门户上输入关键字回车即查映射表、选中即 mappings 带出——前台填表时映射自然出现,无需按钮/脚本。",
405
405
  "下拉框形态在 form.draft 控件层配置;映射表要有数据下拉才有选项。",
406
+ "**关联填充映射的事实源是字段行 `options.mappings`**:改表单控件属性里的 mappings 会被平台按字段重算覆盖、回读不生效(真机 2026-10-14 中冶实证)。改映射走 `field.update` 按完整 options 提交(只改 mappings,其余键 queryCode/displayField/schemaCode/conditions… 原值保留)→ `field.publish` → `form.draft`(**rebuild:false**,保留现有布局与已挂在线JS)重存 → `form.publish` → 回读核对。**不要用 field.update 的 cascadeRepublish 刷已带自定义布局/在线JS 的表单**——它会 rebuild 脚手架(rebuild:false 手动链才安全)。",
406
407
  ],
407
408
  priorToolReferences: [
408
409
  { tool: "model.create", args: { environment }, purpose: "建映射模型(字段与接口返回一一对应;mappings 的 source/target 只填裸字段 code,不带模型前缀)" },
@@ -7,9 +7,10 @@ const listViewConfigure = Object.freeze({
7
7
  args: { environment, schemaCode: model, fieldCodes: ["applyNo", "applyAmount", "applyNote"] },
8
8
  preconditions: ["字段已 field.publish(视图与表单脚手架都依赖已发布字段)", "默认视图在 model.create 时由平台自动生成,code = schemaCode"],
9
9
  conditionalRequirements: [
10
- "**省略 `code` 即配置默认视图(code = schemaCode);不要先 listview.create——那会多出一个自定义视图。** 只有确实需要第二个视图时才 listview.create。",
10
+ "**省略 `code` 即配置默认视图(code = schemaCode);不要先 listview.create——那会多出一个自定义视图。** 只有确实需要第二个视图时才 listview.create。案卷:r60a-F13 真机对齐 2026-11-13;r73 #6 真机对齐 2026-11-17;8.6.41 实测默认视图同样可 configure(改默认视图影响所有用户)。",
11
11
  "`fieldCodes` 只列业务字段,可给 propertyCode 或字段显示名;系统列由平台决定。未知引用被拒(listview-columns-unknown-field)。",
12
- "数值列 displayFormat 由字段 0 基 `options.scale` 推导(0=整数,1=1位,2=2位…);本工具会原地修正既有列的 displayFormat。",
12
+ "数值列 displayFormat 由字段 0 基 `options.scale` 推导(0=整数,1=1位,2=2位…;真机:scale 2 → displayFormat 3 = 两位小数);本工具会原地修正既有列的 displayFormat。",
13
+ "**列汇总**:数值列 `sumType` wire 为整数——0=不统计/1=求和/2=平均/3=最小/4=最大/5=计数,写进 `presentation.columnsJson` 的列对象(8.6.26 反编译 SumType 实证)。",
13
14
  "`query/update` 自动 publish=TRUE——视图无草稿/发布两态,无需独立发布步骤。",
14
15
  ],
15
16
  priorToolReferences: [
@@ -218,10 +218,16 @@ export function toolSearchMetaReport(registry) {
218
218
  */
219
219
  const TOOL_PARENTS = Object.freeze({
220
220
  "field.create": ["model"], "field.update": ["model"], "field.delete": ["model"], "field.list": ["model"], "field.publish": ["model"],
221
- "form.publish": ["model"], "form.get": ["model"], "form.draft": ["model"],
221
+ "form.publish": ["model"], "form.get": ["model"], "form.draft": ["model"], "form.list": ["model"],
222
222
  "listview.configure": ["model"], "listview.create": ["model"], "listview.get": ["model"], "listview.list": ["model"], "listview.delete": ["model"],
223
223
  "datarule.create": ["model", "field"], "datarule.update": ["model", "field"], "datarule.list": ["model", "field"], "datarule.delete": ["model", "field"],
224
- "method.create": ["service"], "method.update": ["service"], "method.get": ["service"], "method.delete": ["service"], "method.test": ["service"],
224
+ // R79 三期:流程清单以模型为索引(应用树→模型→逐模型解析流程)——句子里
225
+ // 点模型时给 workflow.list 父对象信号(与 listview/form 同族)。
226
+ "workflow.list": ["model"],
227
+ "method.create": ["service"], "method.update": ["service"], "method.get": ["service"], "method.delete": ["service"], "method.test": ["service"], "method.list": ["service"],
228
+ // r83(R79 二期):data.aggregate 是「模型数据的聚合」——句子里点模型时
229
+ // 与 data.list/data.load 同族给出父对象信号(此前只有 data 段命中)。
230
+ "data.aggregate": ["model"],
225
231
  "org.role.addUsers": ["user"], "org.role.removeUsers": ["user"],
226
232
  });
227
233
  /** 反向约束:句子里出现这些词时,该工具**直接出局**(它不是干这个的)。见 scoreTools 内的一票否决注释。 */
@@ -144,22 +144,53 @@ export function inputAliasSynonymKeys(toolName) {
144
144
  synonyms.push(...list);
145
145
  return synonyms;
146
146
  }
147
+ /**
148
+ * r83:规范键可由**另一个键**满足的登记(保持 JSON schema 的必填面稳定)。
149
+ *
150
+ * 背景:`rule.list` 的 `schemaCode` 是历史必填键(`commands` 目录、golden、
151
+ * A2/A3 必填参数面都按它对齐)。r83 要给同一工具加 `schemaCodes[]` 跨模型
152
+ * 清单——若把 `schemaCode` 改成 optional,整个必填面/目录/golden 一起漂移。
153
+ * 这里保留 schema 的必填声明,只在调用方**只传了备选键**时补一个占位值让
154
+ * 校验通过;handler 识别占位符(`REQUIRED_ALTERNATIVE_PLACEHOLDER`)并走
155
+ * 备选语义。占位值永远不会被当成真实业务 code 使用,也不是默认值。
156
+ */
157
+ export const REQUIRED_ALTERNATIVE_PLACEHOLDER = "__omc-required-alternative__";
158
+ const TOOL_INPUT_REQUIRED_ALTERNATIVES = Object.freeze({
159
+ "rule.list": Object.freeze({ schemaCode: "schemaCodes" }),
160
+ });
161
+ /** 该工具的这个规范键是否由备选键填充(handler 用来区分「用户真传了」与占位)。 */
162
+ export function isRequiredAlternativePlaceholder(value) {
163
+ return value === REQUIRED_ALTERNATIVE_PLACEHOLDER;
164
+ }
147
165
  function applyInputAliases(tool, input) {
148
- const aliases = TOOL_INPUT_ALIASES[tool.name];
149
- if (!aliases)
150
- return input;
151
166
  let normalized;
152
- for (const [canonical, synonyms] of Object.entries(aliases)) {
153
- if (input[canonical] !== undefined)
154
- continue;
155
- const hit = synonyms.find((synonym) => input[synonym] !== undefined);
156
- if (hit === undefined)
157
- continue;
158
- normalized ??= { ...input };
159
- normalized[canonical] = input[hit];
160
- // 同义词键就地删除:归一后的输入只留规范键——写面未知键 fail-closed
161
- // (r43 后)不把已消费的同义词误报成未知键。
162
- delete normalized[hit];
167
+ const aliases = TOOL_INPUT_ALIASES[tool.name];
168
+ if (aliases) {
169
+ for (const [canonical, synonyms] of Object.entries(aliases)) {
170
+ if (input[canonical] !== undefined)
171
+ continue;
172
+ const hit = synonyms.find((synonym) => input[synonym] !== undefined);
173
+ if (hit === undefined)
174
+ continue;
175
+ normalized ??= { ...input };
176
+ normalized[canonical] = input[hit];
177
+ // 同义词键就地删除:归一后的输入只留规范键——写面未知键 fail-closed
178
+ // (r43 后)不把已消费的同义词误报成未知键。
179
+ delete normalized[hit];
180
+ }
181
+ }
182
+ const alternatives = TOOL_INPUT_REQUIRED_ALTERNATIVES[tool.name];
183
+ if (alternatives) {
184
+ for (const [canonical, from] of Object.entries(alternatives)) {
185
+ const current = normalized ?? input;
186
+ if (current[canonical] !== undefined)
187
+ continue;
188
+ const source = current[from];
189
+ if (source === undefined || (Array.isArray(source) && source.length === 0))
190
+ continue;
191
+ normalized ??= { ...input };
192
+ normalized[canonical] = REQUIRED_ALTERNATIVE_PLACEHOLDER;
193
+ }
163
194
  }
164
195
  return normalized ?? input;
165
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.6.79",
3
+ "version": "0.6.81",
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.79",
59
+ "omc-core": "0.6.81",
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.79"
77
+ "@stalfh233/omc-fake-platform": "0.6.81"
78
78
  }
79
79
  }
@@ -142,6 +142,7 @@ only the section for the capability you need —
142
142
 
143
143
  - **能做哪些事**:图形规则图(nodeGraph)——数据事件(Create/Update/Delete)触发、按钮/流程触发、动作节点(UPDATE/CREATE/DELETE/QUERY/ASSIGN/MESSAGE/BIZ_ACTION/GET_LIST…)、BRANCH 条件分支、**定时任务 TIMING_TASK**(每天/周期,SCHEDULER 节点)。
144
144
  - **工具**:`rule.list`、`rule.get`、`rule.references`(跨规则引用检索:谁引用了服务/模型/字段)、`rule.save`、`rule.node.update`、`rulelog.search`(**规则执行日志审计入口**:规则触发没触发/哪行/节点链——data.update 后查 F31)
145
+ - **批量/清单(r83)**:`rule.list {schemaCodes:[…]}` 跨模型清单(逐模型读,`models[].modelPresent` / `partial+failed[]`,≤20 模型);`rule.list {withMappings:true}` 每行附 `mappings[]={nodeCode,serviceCode,serviceMethodCode,inputCount,outputCount}` 摘要(正文仍用 `rule.get`);`rule.get {schemaCodes:[…],ruleCodes:[…],summary:true}` 跨模型扫规则图,部分失败不整单失败。
145
146
  - **recipe**:
146
147
  - `omc describe rule.save --example standard-business-rule-graph`
147
148
  - `omc describe rule.save --example business-rule-branch-conditional`
@@ -167,8 +168,8 @@ only the section for the capability you need —
167
168
 
168
169
  ## 流程模板 `workflow`
169
170
 
170
- - **能做哪些事**:流程模板 get_draft/get_published、create、update、publish、bindRule(事件处理器规则绑定)、delete、workitem.list、workflow.instanceActivity(实例节点状态诊断);参与人用组织对象。**流程运维三件套**(r64,测试提速定位):workflow.transfer 换审批人 / workflow.activate 跳转节点 / workflow.finish 手动结束(end 规则照常触发)——运维过的实例不能用于真实流程/权限验证。
171
- - **工具**:`workflow.get_draft`、`workflow.setButtons`(节点「表单操作」按钮勾选)、`workflow.get_published`、`workflow.validate`、`workflow.create`、`workflow.update`、`workflow.publish`、`workflow.bindRule`、`workflow.delete`、`workflow.permissions`、`workflow.addPermission`、`workflow.removePermission`(发起权限:发布流程不会自动建这一行,缺它一律 40009)、`configure_workflow`、`workitem.list`、`workflow.instanceActivity`、`workflow.transfer`、`workflow.activate`、`workflow.finish`、`org.role.list`、`org.department.list`、`org.user.search`、`org.role.users`、`org.role.userScope`、`org.roleGroup.create`、`org.role.create`、`org.role.update`、`org.role.addUsers`、`org.role.removeUsers`、`org.role.setUserScope`、`org.department.create`、`org.department.update`、`org.department.delete`、`org.department.users`、`org.user.create`、`org.user.update`、`org.user.delete`、`org.user.info`、`org.user.departments`、`org.role.delete`、`org.roleGroup.delete`、`org.user.transferDepartment`
171
+ - **能做哪些事**:流程模板 workflow.list(应用内流程清单,以模型为索引)、get_draft/get_published、create、update、publish、bindRule(事件处理器规则绑定)、delete、workitem.list、workflow.instanceActivity(实例节点状态诊断);参与人用组织对象。**流程运维三件套**(r64,测试提速定位):workflow.transfer 换审批人 / workflow.activate 跳转节点 / workflow.finish 手动结束(end 规则照常触发)——运维过的实例不能用于真实流程/权限验证。
172
+ - **工具**:`workflow.list`、`workflow.get_draft`、`workflow.setButtons`(节点「表单操作」按钮勾选)、`workflow.get_published`、`workflow.validate`、`workflow.create`、`workflow.update`、`workflow.publish`、`workflow.bindRule`、`workflow.delete`、`workflow.permissions`、`workflow.addPermission`、`workflow.removePermission`(发起权限:发布流程不会自动建这一行,缺它一律 40009)、`configure_workflow`、`workitem.list`、`workflow.instanceActivity`、`workflow.transfer`、`workflow.activate`、`workflow.finish`、`org.role.list`、`org.department.list`、`org.user.search`、`org.role.users`、`org.role.userScope`、`org.roleGroup.create`、`org.role.create`、`org.role.update`、`org.role.addUsers`、`org.role.removeUsers`、`org.role.setUserScope`、`org.department.create`、`org.department.update`、`org.department.delete`、`org.department.users`、`org.user.create`、`org.user.update`、`org.user.delete`、`org.user.info`、`org.user.departments`、`org.role.delete`、`org.roleGroup.delete`、`org.user.transferDepartment`
172
173
  - **recipe**:`omc describe workflow.bindRule --example workflow-handler-binding`;条件两级/一级:`omc describe workflow.update --example workflow-conditional-two-level-approval`
173
174
  - **边界 / 陷阱**:greenfield 首版;`publish`/`bindRule` 不得在 `ValidateMessage[]` 拒绝时报告成功。运行时 workitem(提交/审批)走 `data.submit`;想知道实例停在哪/是否错派,用 `workflow.instanceActivity`(无 status=1=真停,参与人全是发起人=解析为空退回)。**发起权限**(`workflow.permissions` / `addPermission`)只有部门/角色/用户三种白名单,**没有「全员」选项**——缺权限行时非管理员通常不能发起(40009),想放开只能授一个够宽的部门/角色,不是「不建行=全员」。**行级数据权限 / 可见范围 / 申请人只看自己的单据不在工具覆盖内**(没有按登录人动态过滤的读面/写面);`org.role.setUserScope` 是角色成员的部门管理范围,不是单据行级可见范围。
174
175