@stalfh233/omc-cli 0.6.35 → 0.6.37

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/dist/cli.js CHANGED
@@ -1858,7 +1858,7 @@ function cmdHelpSearch(topic, query, transport, searchMode, limit) {
1858
1858
  sectionOrdinal: match.sectionOrdinal,
1859
1859
  matchLines: match.matchLines,
1860
1860
  sectionBytes: match.sectionBytes,
1861
- sectionCommand: `omc help ${match.topic} --section "${match.heading}"`,
1861
+ sectionCommand: `omc help ${match.topic} --section ${shellQuote(match.heading)}`,
1862
1862
  sectionComplete: complete,
1863
1863
  ...(complete ? { sectionContent: match.section } : { inlineOmitted: `${match.sectionBytes}B 超过单节内联上限 ${SEARCH_INLINE_SECTION_CEILING}B;用 sectionCommand 精确取这一节` }),
1864
1864
  };
@@ -1895,6 +1895,10 @@ function cmdHelpSearch(topic, query, transport, searchMode, limit) {
1895
1895
  console.error(`omc help --search "${query.trim()}":${result.total} 节命中,返回 ${matches.length} 节${truncating || anyOmitted ? "(含未内联正文,见 sectionCommand)" : ""}`);
1896
1896
  return emitTransportResult(envelopeFor(matches, truncating), transport);
1897
1897
  }
1898
+ /** Quote a heading so `sectionCommand` can be pasted into a POSIX shell. */
1899
+ function shellQuote(value) {
1900
+ return /[`'"$\s]/.test(value) ? `'${value.replace(/'/g, "'\\''")}'` : value;
1901
+ }
1898
1902
  /**
1899
1903
  * Ticket 122 — `omc help [topic]`: the methodology layer, reachable exactly
1900
1904
  * like `git help <concept>`. The command list is the "what"; these topics are
@@ -1956,7 +1960,7 @@ function cmdHelpSearch(topic, query, transport, searchMode, limit) {
1956
1960
  for (const requested of requestedSections) {
1957
1961
  const sliced = readSkillSection(topic, requested);
1958
1962
  if (sliced?.section)
1959
- found.push({ section: requested, content: sliced.section, chars: sliced.section.length, bytes: Buffer.byteLength(sliced.section, "utf8") });
1963
+ found.push({ section: sliced.heading ?? requested, ...(sliced.heading !== requested ? { requested } : {}), ...(sliced.matchType === "partial" ? { matchType: "partial" } : {}), content: sliced.section, chars: sliced.section.length, bytes: Buffer.byteLength(sliced.section, "utf8") });
1960
1964
  else
1961
1965
  missing.push(requested);
1962
1966
  }
@@ -1990,7 +1994,9 @@ function cmdHelpSearch(topic, query, transport, searchMode, limit) {
1990
1994
  return emitTransportResult({
1991
1995
  status: "ok",
1992
1996
  topic: sliced.document.name,
1993
- section: singleSection,
1997
+ section: sliced.heading ?? singleSection,
1998
+ ...(sliced.heading !== singleSection || sliced.matchType === "partial" ? { requested: singleSection } : {}),
1999
+ ...(sliced.matchType === "partial" ? { matchType: "partial" } : {}),
1994
2000
  chars: sliced.section.length,
1995
2001
  bytes: Buffer.byteLength(sliced.section, "utf8"),
1996
2002
  complete: true,
@@ -2164,7 +2170,8 @@ async function main() {
2164
2170
  return CLI_EXIT_CODES.ok;
2165
2171
  }
2166
2172
  // r30f F15:topic 既是位置参数也接受 `--topic <name>` 别名(肌肉记忆对齐 capability/contract)。
2167
- command.command("help [topic]").option("--topic <name>", "topic 别名(与位置参数等价:`omc help omc-refusals` = `omc help --topic omc-refusals`)").option("--section [heading]", "按标题取该节内容;可重复或用逗号一次取多节:--section a --section b / --section a,b(不带值则列出该 topic 的节标题)").option("--sections").option("--all", "回整篇正文(默认只回节索引:标题 + 各节字节)").option("--search <query>", "跨 topic 全文检索(错误码/字段名/命令名);命中节正文随结果返回,不需要再取一次").option("--search-mode <mode>", "all(默认,同一节包含全部词)或 any(包含任一)").option("--limit <n>", "检索最多返回几节(默认 5,1–50)").option("--max-output-bytes <bytes>").action(async (topic, options) => {
2173
+ const collectSection = (value, previous = []) => [...previous, value];
2174
+ command.command("help [topic]").option("--topic <name>", "topic 别名(与位置参数等价:`omc help omc-refusals` = `omc help --topic omc-refusals`)").option("--section [heading]", "按标题取该节内容;可重复或用逗号一次取多节:--section a --section b / --section a,b(不带值则列出该 topic 的节标题)", collectSection, []).option("--sections").option("--all", "回整篇正文(默认只回节索引:标题 + 各节字节)").option("--search <query>", "跨 topic 全文检索(错误码/字段名/命令名);命中节正文随结果返回,不需要再取一次").option("--search-mode <mode>", "all(默认,同一节包含全部词)或 any(包含任一)").option("--limit <n>", "检索最多返回几节(默认 5,1–50)").option("--max-output-bytes <bytes>").action(async (topic, options) => {
2168
2175
  const resolvedTopic = typeof options.topic === "string" && options.topic.trim() !== "" ? options.topic.trim() : topic;
2169
2176
  commandExitCode = await withTransport(options, request, (transport) => cmdHelp(resolvedTopic, command.commands.map((entry) => entry.name()), transport, options.section, options.sections === true, options.all === true, typeof options.search === "string" ? options.search : undefined, typeof options.searchMode === "string" ? options.searchMode : undefined, typeof options.limit === "string" ? options.limit : undefined));
2170
2177
  });
@@ -2356,7 +2363,7 @@ async function main() {
2356
2363
  .option("--schema <schemaCode>", "模型 code")
2357
2364
  .option("--schema-code <schemaCode>")
2358
2365
  .option("--rule-code <ruleCode>")
2359
- .option("--name <name>", "规则显示名(rule.save 的 name 位;与既有规则同名则覆盖更新)")
2366
+ .option("--name <name>", "规则显示名(rule.save 的 name 位;与既有规则同 code 则覆盖更新)。**平台约束:仅中文/字母/数字,长度 1–50**——下划线等符号能落库但设计器无法再编辑(rule-name-invalid 会拦)")
2360
2367
  .option("--node-graph <json>", "规则图 {nodes,routes} JSON")
2361
2368
  .option("--publish", "保存后同时发布规则版本")
2362
2369
  .option("--env <environment>")
@@ -168,7 +168,7 @@ export const FIELD_LANE_CONTRACT = Object.freeze({
168
168
  description: describeTool("Create a draft field on a model (bizproperty/create).", [
169
169
  "Field type must be one of the live-accepted families; nested child tables and OCR/ELECTRONIC_SIGN are out of coverage.",
170
170
  `Reserved/system codes are refused (code_reserved): ${[...RESERVED_CODES].join(", ")} — pick a business code (e.g. owner → taskOwner).`,
171
- "The relation field family name is `WORK_SHEET` (there is no RELATED_SINGLE/RELATION): pass `propertyType:\"WORK_SHEET\"` + `relativeCode:<schemaCode>` + `options:{schemaCode,queryCode,displayField,displayFieldType,mappings}`; `mappings` is a JSON *string* (empty string when there is no mapping).",
171
+ "**mapping 类型兼容**(三层口径 r52):①拦截依据=设计器 `filterCondition`:长文本←长文本/短文本(单向);短文本/下拉/单选←同族;复选框/下拉多选←同族;**其余必须同型**。违反→`mapping-type-incompatible`。②设计器只过滤下拉:保存不复核、平台 `checkOptions` 缺 WORK_SHEET、运行期直接 put——绕过设计器可写违规组合。③后果:50000 或**静默损坏**(`→LOGICAL` 恒 false、`NUMERICAL→DATE` 丢 null、文本→人员/关联=悬空 id、多值→单选串进单值列、`→COMMENT/OCR/SIGN/RELEVANCE_DATA` 不落库)。④映射只在关联单选建记录时生效;`data.save/submit` 不跑映射。",
172
172
  "For single/multi-select pass `choices` (e.g. [\"A\",\"B\",\"C\"]) or `options.optionsSet` with optionsType custom/dictionary/businessModel; dictionary uses checkedDictionary/checkedDictionaryCode, businessModel uses schemaCode/sheetDataItem.",
173
173
  "For a relation pass `relativeCode` and `options` (schemaCode/displayField/...). `searchFormula` and `conditions` are JSON strings for the relation data restriction/query conditions.",
174
174
  "For a relation display field the tool writes the field-row top-level `relativePropertyCode` = options.displayField (the runtime reads THAT key, not options.displayField — QueryRuntimeController.java:1214-1226) and defaults options.displayFieldType:0 + displayFieldFormat:\"\".",
@@ -179,7 +179,7 @@ export const FIELD_LANE_CONTRACT = Object.freeze({
179
179
  "field.update": Object.freeze({
180
180
  scope: "create publish readback",
181
181
  description: describeTool("Update an existing field (bizproperty/update) — merges `options` (and optional `choices`/`relativeCode`) onto the current draft/published record.", [
182
- "**不切换 propertyType**:field.update 传 propertyType 会被静默忽略(errcode 0 但类型不变,r6 实证 2026-10-10)——已发布字段改类型只能 field.delete + field.create 重建(含关联 mappings 的同类型对齐场景:人员单选只能映射给人员单选)。choices 只对文本单选族(RADIO/DROPDOWN_BOX 等)合法,传给其它类型会被出门校验拒。",
182
+ "**不切换 propertyType**:field.update 传 propertyType 会被静默忽略(errcode 0 但类型不变,r6 实证 2026-10-10)——已发布字段改类型只能 field.delete + field.create 重建(mapping 类型兼容见 field.create 的 mappings 说明)。choices 只对文本单选族(RADIO/DROPDOWN_BOX 等)合法,传给其它类型会被出门校验拒。",
183
183
  "字典-backed 可用 `syncDictionary:true` 重填 useDictionariesData;readback 带 face:\"draft\"。",
184
184
  "Use it to add relation `mappings` (source/target carry-through) or change field options. **关联填充映射的事实源是字段行 `options.mappings`**(真机 2026-10-14 中冶实证:改表单控件属性里的 mappings 会被平台按字段重算覆盖、回读不生效)。改映射的正确链:`field.update` 按完整 options 提交(只改 mappings,其余键 queryCode/displayField/schemaCode/conditions… 原值保留)→ `field.publish` → 已发布表单重派生一次:`form.draft`(**rebuild:false**,保留现有布局与已挂在线JS)重存 → `form.publish` → 回读核对。**不要用 field.update 的 cascadeRepublish 刷已带自定义布局/在线JS 的表单**——它会 rebuild 脚手架,可能动到现有自定义布局(rebuild:false 手动链才安全)。",
185
185
  "A relation's display field is the field-row top-level `relativePropertyCode` (options.displayField is mirrored but not what the runtime reads); the tool rewrites it when you pass a new displayField.",
@@ -45,6 +45,45 @@ function relationTypeOf(row) {
45
45
  const value = Number(row.type ?? row.propertyType);
46
46
  return Number.isInteger(value) ? value : undefined;
47
47
  }
48
+ /**
49
+ * 设计器的可映射类型表(r52 前端逆向,admin/js/17170.93392489.js `filterCondition`):
50
+ *
51
+ * LongText ← LongText | ShortText (单向:长文本可收短文本,反之不行)
52
+ * ShortText/Dropdown/Radio ← 同族三选一
53
+ * Checkbox/DropdownMulti ← 同族二选一
54
+ * 其它(数值/日期/时间/逻辑/人员/部门/关联/地址/附件/子表…)← 必须完全相同
55
+ *
56
+ * 这是「用户手点得出来」的口径。平台后端零校验,所以绕过设计器(API/导入/复制)
57
+ * 能写出设计器不允许的组合——那些组合要么运行期 50000,要么静默丢值。
58
+ */
59
+ const MAPPING_TEXT_FAMILY = new Set([
60
+ FIELD_PROPERTY_TYPES.SHORT_TEXT,
61
+ FIELD_PROPERTY_TYPES.DROPDOWN_BOX,
62
+ FIELD_PROPERTY_TYPES.RADIO,
63
+ ]);
64
+ const MAPPING_MULTI_FAMILY = new Set([
65
+ FIELD_PROPERTY_TYPES.CHECKBOX,
66
+ FIELD_PROPERTY_TYPES.DROPDOWN_MULTI_BOX,
67
+ ]);
68
+ function mappingCompatibleSourceTypes(targetType) {
69
+ if (targetType === FIELD_PROPERTY_TYPES.LONG_TEXT)
70
+ return [FIELD_PROPERTY_TYPES.LONG_TEXT, FIELD_PROPERTY_TYPES.SHORT_TEXT];
71
+ if (MAPPING_TEXT_FAMILY.has(targetType))
72
+ return [...MAPPING_TEXT_FAMILY];
73
+ if (MAPPING_MULTI_FAMILY.has(targetType))
74
+ return [...MAPPING_MULTI_FAMILY];
75
+ return [targetType];
76
+ }
77
+ function mappingTypesCompatible(targetType, sourceType) {
78
+ return mappingCompatibleSourceTypes(targetType).includes(sourceType);
79
+ }
80
+ /** propertyType 数字 → 枚举名(拒绝信息用;未知返回数字串)。 */
81
+ function propertyTypeName(type) {
82
+ for (const [name, value] of Object.entries(FIELD_PROPERTY_TYPES))
83
+ if (value === type)
84
+ return name;
85
+ return String(type);
86
+ }
48
87
  /** Semantic relation gate: the designer only offers published business fields. */
49
88
  async function assertRelationOptionsFields(session, schemaCode, propertyType, relativeCode, options) {
50
89
  const type = typeof propertyType === "number" ? propertyType : FIELD_PROPERTY_TYPES[String(propertyType ?? "")];
@@ -94,6 +133,15 @@ async function assertRelationOptionsFields(session, schemaCode, propertyType, re
94
133
  if (!sourceCandidates.includes(source) || !targetCandidates.includes(mappedTarget)) {
95
134
  throw new ToolRefusalError({ status: "refused", blocker: "relation-mapping-field-not-found", schemaCode, relationTarget: target, mappingIndex: index, source, targetField: mappedTarget, sourceCandidates, targetCandidates, message: `关联映射第 ${index + 1} 行字段不存在:source=${source || "(空)"}(目标模型候选:${sourceCandidates.join("、") || "(无)"}),target=${mappedTarget || "(空)"}(本模型候选:${targetCandidates.join("、") || "(无)"})。请使用发布面业务字段 code。` });
96
135
  }
136
+ // r52:类型兼容门。设计器 filterCondition(admin/js/17170.93392489.js)是产品承认的
137
+ // 可映射不变量,但它只活在下拉框里——保存、导入、field.create 全都绕过;平台后端
138
+ // checkOptions 的 if 链缺 WORK_SHEET 分支,运行期 assignChildData 直接 put 零转换。
139
+ // 所以错配要么运行期 50000,要么静默变 null/false/悬空 id。这里按设计器口径拦。
140
+ const sourceType = targetFields.find((row) => row.code === source)?.type;
141
+ const targetType = ownFields.find((row) => row.code === mappedTarget)?.type;
142
+ if (sourceType !== undefined && targetType !== undefined && !mappingTypesCompatible(targetType, sourceType)) {
143
+ throw new ToolRefusalError({ status: "refused", blocker: "mapping-type-incompatible", schemaCode, relationTarget: target, mappingIndex: index, source, sourceType: propertyTypeName(sourceType), targetField: mappedTarget, targetType: propertyTypeName(targetType), allowedSourceTypes: mappingCompatibleSourceTypes(targetType).map(propertyTypeName), message: `关联映射第 ${index + 1} 行类型不兼容:${propertyTypeName(sourceType)} → ${propertyTypeName(targetType)}。设计器只允许 ${propertyTypeName(targetType)} 接收 ${mappingCompatibleSourceTypes(targetType).map(propertyTypeName).join("/")}。平台后端不校验这条,硬写会在运行期 50000 或静默丢值(真机 r52 2026-11-10)。` });
144
+ }
97
145
  }
98
146
  }
99
147
  async function readFieldRollback(session, args) {
@@ -1,4 +1,41 @@
1
1
  import { environment, model, commonRecovery } from "./shared.js";
2
+ const ruleCustomMinimal = Object.freeze({
3
+ id: "custom-rule-minimal",
4
+ title: "自定义触发规则最小图形状(ruleCode 非平台触发码 → 业务规则面板按钮/API 调用)",
5
+ status: "requires-prior-readback",
6
+ tool: "rule.save",
7
+ args: {
8
+ environment,
9
+ schemaCode: model,
10
+ ruleCode: "<自定义规则 code,如 riskFlagRule>",
11
+ name: "风控标记",
12
+ nodeGraph: {
13
+ nodes: [
14
+ { nodeCode: "Start", nodeType: "START" },
15
+ // 自定义规则的动作节点按需要选;下面是「写死一个字段」的最小可跑形状
16
+ { nodeCode: "UPDATE_1", nodeType: "UPDATE", targetObjectCode: model, inputParam: "_input", filterCondition: { mainConditions: [[{ targetSchemaDataItem: "id", ruleConditionType: "EQ", ruleValueType: "DYNAMIC", currentSchemaDataItem: "id" }]], sheetConditions: [] }, dataActions: [{ targetDataItem: "risk_flag", ruleValueType: "FIXED", value: "HIGH", ruleActionType: "EQUALS" }] },
17
+ { nodeCode: "End", nodeType: "END" },
18
+ ],
19
+ routes: [
20
+ { preNode: "Start", postNode: "UPDATE_1" },
21
+ { preNode: "UPDATE_1", postNode: "End" },
22
+ ],
23
+ },
24
+ },
25
+ preconditions: [
26
+ "ruleCode **不是** Create/Update/Delete/Load/GetList/Cancel/Available 之一,平台就按自定义规则处理(工具自动补 CUSTOM_NODE)。",
27
+ "自定义规则**不会被数据事件自动触发**:要么设计器/按钮调用,要么 `omc call rule.run`,要么 v2/v3 invoke 端点(见 help omc-backend-online-coding §5.1)。",
28
+ ],
29
+ conditionalRequirements: [
30
+ "想跑 Java 源码:先用本配方建规则,再 `programming.get` 取模板 → 写 handler → compile → save → publish。",
31
+ "**name 有字符集约束**:仅中文/字母/数字,1–50 字符;下划线会被 rule-name-invalid 拒(能落库但设计器不可编辑)。",
32
+ ],
33
+ priorToolReferences: [{ tool: "rule.list", args: { environment, schemaCode: model }, purpose: "确认 ruleCode 未被占用(自定义规则不会自动出现在数据事件列表里,但同名会覆盖)" }],
34
+ dryRun: { supported: true, command: `omc call rule.save --env ${environment} --dry-run --args '<recipe.args>'`, notes: "dry-run 校验 nodeGraph 形状与 ruleCode/name 约束,零 wire" },
35
+ expectedReadback: { performed: { errcode: 0 }, readback: { rulePresent: true }, next: ["rule.enable", "programming.get 取模板", "programming.publish"] },
36
+ refusalRecovery: [{ code: "rule-name-invalid", action: "改 name 为纯中文/字母/数字(去掉下划线等符号);或省略 name 让工具按 ruleCode 生成" }, ...commonRecovery],
37
+ requiresEnvironmentDerivedIds: false,
38
+ });
2
39
  const ruleGraph = Object.freeze({
3
40
  id: "standard-business-rule-graph",
4
41
  title: "保存并启用最小数据事件规则图",
package/dist/skills.js CHANGED
@@ -248,13 +248,12 @@ function scanHeadings(lines) {
248
248
  */
249
249
  function sliceSectionText(lines, start, level) {
250
250
  let end = lines.length;
251
- for (let index = start + 1; index < lines.length; index += 1) {
252
- const match = /^(#{1,6})\s+(.+?)\s*$/.exec(lines[index]);
253
- if (match && match[1].length <= level) {
254
- end = index;
255
- break;
256
- }
257
- }
251
+ // Reuse the same fence-aware scan as the section index. A Markdown comment
252
+ // inside a fenced shell/YAML example is not a heading and must not truncate
253
+ // the section body.
254
+ const next = scanHeadings(lines).find((entry) => entry.index > start && entry.level <= level);
255
+ if (next !== undefined)
256
+ end = next.index;
258
257
  return lines.slice(start, end).join("\n").trim() + "\n";
259
258
  }
260
259
  /** Return one Markdown heading and its nested content without loading the full topic into the envelope. */
@@ -272,7 +271,7 @@ export function readSkillSection(name, requested) {
272
271
  // full heading ("8. Canonical configuration order(规范配置顺序)") — the
273
272
  // route lists headings, but agents also number-jump. Match on the leading
274
273
  // ordinal too, so a numeric request does not waste a retry.
275
- const requestedOrdinal = /^(\d+)(?:[.\)、]|\s|$)/.exec(normalized)?.[1];
274
+ const requestedOrdinal = /^(\d+(?:\.\d+)*)(?:[.\)、]|\s|$)/.exec(normalized)?.[1];
276
275
  const matches = (heading) => {
277
276
  if (heading === normalized)
278
277
  return true;
@@ -281,25 +280,30 @@ export function readSkillSection(name, requested) {
281
280
  if (heading.replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase() === normalized)
282
281
  return true;
283
282
  if (requestedOrdinal !== undefined) {
284
- const headingOrdinal = /^(\d+)(?:[.\)、]|\s|$)/.exec(heading)?.[1];
283
+ const headingOrdinal = /^(\d+(?:\.\d+)*)(?:[.\)、]|\s|$)/.exec(heading)?.[1];
285
284
  if (headingOrdinal === requestedOrdinal)
286
285
  return true;
287
286
  }
288
287
  return false;
289
288
  };
290
- let start = scanned.find((entry) => matches(entry.heading.trim().toLowerCase()))?.index ?? -1;
289
+ const exact = scanned.find((entry) => matches(entry.heading.trim().toLowerCase()));
290
+ let start = exact?.index ?? -1;
291
+ // 精确命中(含序号/归一化形态)即 exact;仅唯一子串回退才降级为 partial。
292
+ let matchType = "exact";
291
293
  // Forgiving fallback: a unique prefix/substring match ("流程" for "流程字段权限").
292
294
  // A non-unique partial matches nothing (precision over recall) and the
293
295
  // not-found error lists the real headings, so the caller can retry once.
294
296
  if (start < 0 && normalized.length >= 2) {
295
297
  const partial = scanned.filter((entry) => entry.heading.trim().toLowerCase().includes(normalized));
296
- if (partial.length === 1)
298
+ if (partial.length === 1) {
297
299
  start = partial[0].index;
300
+ matchType = "partial";
301
+ }
298
302
  }
299
303
  if (start < 0)
300
304
  return { document, section: "", headings };
301
305
  const startEntry = scanned.find((entry) => entry.index === start);
302
- return { document, section: sliceSectionText(lines, startEntry.index, startEntry.level), headings };
306
+ return { document, section: sliceSectionText(lines, startEntry.index, startEntry.level), headings, heading: startEntry.heading, matchType };
303
307
  }
304
308
  /**
305
309
  * The "shape" of a topic: every heading with the bytes it would cost to read.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.6.35",
3
+ "version": "0.6.37",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "commander": "14.0.3",
58
- "omc-core": "0.6.35",
58
+ "omc-core": "0.6.37",
59
59
  "proper-lockfile": "4.1.2",
60
60
  "write-file-atomic": "6.0.0",
61
61
  "zod": "^3.23.8",
@@ -73,6 +73,6 @@
73
73
  "directory": "packages/omc-cli"
74
74
  },
75
75
  "optionalDependencies": {
76
- "@stalfh233/omc-fake-platform": "0.6.35"
76
+ "@stalfh233/omc-fake-platform": "0.6.37"
77
77
  }
78
78
  }
@@ -132,6 +132,10 @@ webapi = Spring Boot `PropertiesLauncher`,真机启动参数
132
132
  import;但 launcher 自身的嵌套 BOOT-INF lib 对直接 import 仍不可见(`jakarta.*` 编不过的
133
133
  边界不变)。
134
134
 
135
+ **你没法列举已部署的类**:CLI 没有「列出 extensions 内容」的读面(`extensions/` 在远端容器里,
136
+ agent 侧看不到)。判断某个类能不能用只有一条路——写进 handler,`programming.compile` 试一次
137
+ (只读、不落库):成功即可用,`errors[]` 里报 `package ... does not exist` 即不可用。
138
+
135
139
  ## 1. 两种用法:单条 vs 工作区
136
140
 
137
141
  ### 单条(快速改一条规则)
@@ -332,6 +336,10 @@ owner/creater/modifier/部门/时间字段才从请求上下文回填(显式
332
336
  | 前端 / 站内 | `POST /api/v2/businessRule/invoke`,body `{appCode,schemaCode,businessRuleCode,data}` | RequestContext(无 userId 参数) | **handle 返回值直接 = `ResponseResult.data`** |
333
337
  | 第三方 | `POST /api/openapi/v3/bo/invokeBizRule`,body 带 `userId` | OAuth2 client_credentials(`POST /oauth/token` → bearer) | handle 返回值**包在 `returnObject` 里**(不是直接 data) |
334
338
 
339
+ **两个易混点**:
340
+ - `omc call rule.run` 走的是**第一个面(平台按钮)**,它**不回 handle 的返回 Map**——回执里只有执行结果信封(`effectHint` 明说返回的是执行前快照)。要拿 handle 返回值必须走 v2/v3 的 invoke 端点。
341
+ - 想验规则副作用:写业务字段 → `data.load` 读回。
342
+
335
343
  - **硬闸**:两个 invoke 端点都**只接受自定义规则**——Create/Update/Delete/Load/GetList 五个
336
344
  默认规则名直接抛 `BUSINESS_RULE_ONLY_SUPPORT_CUSTOM_RUN`(Cancel/Available 由 invokeCustom
337
345
  特判逐条执行)。