@stalfh233/omc-cli 0.6.37 → 0.6.39

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.
@@ -6,9 +6,10 @@ export const DISCOVERY_AUTHORITY = Object.freeze({
6
6
  authoritative: "package",
7
7
  route: "omc help omc-start-here",
8
8
  readiness: "omc call discover_environment --env <env> --args '{}'",
9
- distributedMirror: "a cpdocs snapshot may mirror this package; its manifest commit and file hashes are the authority for that copy",
9
+ distributedMirror: "cpdocs mirror: manifest commit/hashes",
10
10
  capabilityProjection: "omc capabilities",
11
11
  executableBundle: "omc capability <id> --executable",
12
+ appScope: "appCode/applicationCode: same scope, NOT interchangeable; use schema.",
12
13
  });
13
14
  /**
14
15
  * The 13 Configuration capabilities. Declaration order is presentation order.
@@ -265,7 +266,11 @@ export const CAPABILITY_CUES = Object.freeze({
265
266
  workflow: ["流程", "工作流", "审批", "节点", "待办", "流转", "参与人", "审批人", "角色", "部门负责人", "审批角色",
266
267
  "组织架构", "组织管理", "管理组织", "角色组", "权限范围", "管理范围", "userScope", "部门树", "员工账号", "组织"],
267
268
  onlinejs: ["在线js", "脚本", "联动", "onload", "onvalidate"],
268
- programming: ["在线开发", "在线编码", "后端源码", "java源码", "编码模式", "handler", "programming", "源码编译"],
269
+ // These are deliberately explicit: import/classpath and third-party invoke
270
+ // asks are programming's two high-signal faces, not datarule or intent work.
271
+ programming: ["在线开发", "在线编码", "后端源码", "java源码", "编码模式", "handler", "programming", "源码编译",
272
+ "import", "扩展包", "扩展", "jar", "工具类", "类路径", "loader",
273
+ "oauth", "openapi", "client_credentials", "第三方", "外部调用", "外部系统", "invoke", "调用自定义规则", "返回值"],
269
274
  bizservice: ["集成", "接口", "服务", "回调", "对接", "外部系统", "datasql", "restful"],
270
275
  report: ["报表", "图表", "看板", "bi", "dashboard"],
271
276
  data: ["运行数据", "提交数据", "保存记录", "查记录", "造数据", "测试数据", "测试单据", "造单据", "造单", "录数据", "填数据", "模拟数据", "业务数据", "造几条", "造两张", "造几张", "验数据", "批量导入", "批量写入", "批量删除", "导入数据"],
package/dist/cli.js CHANGED
@@ -45,7 +45,7 @@ else if (process.env.OMC_ASCII_STDOUT !== "0" && process.argv.some((arg) => arg
45
45
  }
46
46
  import { commandIndex, commandInventory, describeContract, describeContractFull, describeContractTool, describeExample, describeParam, describeSchemaOnly, describeTool, describeToolFull, filterTools } from "./discovery.js";
47
47
  import { closestMatches } from "./closest-match.js";
48
- import { KEY_ALIAS_HINTS } from "./tool-types.js";
48
+ import { KEY_ALIAS_HINTS, inputAliasSynonymKeys } from "./tool-types.js";
49
49
  import { repeatFullDescribe } from "./describe-cache.js";
50
50
  import { buildCapabilityOverview, capabilityDetail, capabilityRouteIndex, compactCapabilities, executableCapabilityBundle, resolveCapabilityId, DISCOVERY_AUTHORITY } from "./capability-overview.js";
51
51
  import { goalRoute } from "./goal-routes.js";
@@ -662,6 +662,10 @@ async function cmdCall(store, args) {
662
662
  if (tool) {
663
663
  const schemaKeys = new Set(Object.keys(tool.inputSchema));
664
664
  const recognized = new Set(["environment", "capability", "requestId", "dryRun", "lenientArgs"]);
665
+ // r54 C② F2:工具声明的输入别名同义词也算 recognized(工具层归一化接管);
666
+ // 否则读面先拒、写面却放行的双标准。
667
+ for (const synonym of inputAliasSynonymKeys(tool.name))
668
+ recognized.add(synonym);
665
669
  const lenientArgs = parsedArgs.lenientArgs === true;
666
670
  const unknownKeys = Object.keys(parsedArgs).filter((key) => !schemaKeys.has(key) && !recognized.has(key));
667
671
  const appScopeUnknown = unknownKeys.filter((key) => APP_SCOPE_ARG_KEYS.has(key));
@@ -706,6 +710,8 @@ async function cmdCall(store, args) {
706
710
  if (!lenientArgs) {
707
711
  const suggestions = otherUnknown.map((key) => ({ key, ...suggestArgumentKey(key, [...schemaKeys], toolName) }));
708
712
  const pairs = suggestions.map((entry) => {
713
+ if (entry.hint)
714
+ return `${entry.key}(${entry.hint})`;
709
715
  if (entry.closest)
710
716
  return `${entry.key}→${entry.closest}`;
711
717
  if (entry.absentInTool)
@@ -826,6 +832,8 @@ async function cmdCall(store, args) {
826
832
  // 读面未知键的非阻断回显:放在投影**之后**,否则会被 --jq 的窄投影吞掉。
827
833
  if (ignoredReadKeys.length > 0 && typeof result === "object" && result !== null) {
828
834
  const pairs = ignoredReadKeys.map((entry) => {
835
+ if (entry.hint)
836
+ return `${entry.key}(${entry.hint})`;
829
837
  if (entry.closest)
830
838
  return `${entry.key}→${entry.closest}`;
831
839
  if (entry.absentInTool)
@@ -871,11 +879,19 @@ const APP_SCOPE_ARG_KEYS = new Set(["appCode", "applicationCode", "application"]
871
879
  */
872
880
  export function suggestArgumentKey(key, schemaKeys, toolName) {
873
881
  const known = new Set(schemaKeys);
882
+ const paginationKeys = new Set(["page", "pagesize", "size", "pageindex", "pagenumber", "pageno", "offset", "limit"]);
883
+ if (paginationKeys.has(key.toLowerCase()) && !schemaKeys.some((name) => paginationKeys.has(name.toLowerCase()))) {
884
+ return { hint: "本工具不支持分页(返回全量/受限于应用范围);省略该键即可" };
885
+ }
874
886
  const normalizedTool = toolName?.toLowerCase() ?? "";
875
887
  if ((normalizedTool.startsWith("workflow.") || normalizedTool.startsWith("workitem.")) && key === "code" && known.has("workflowCode"))
876
888
  return { closest: "workflowCode" };
877
889
  if (normalizedTool.startsWith("data.") && key === "id" && known.has("bizObjectId"))
878
890
  return { closest: "bizObjectId" };
891
+ // r53 场景03 F8:rule.run 的记录标识叫 ids(数组),与 data.* 族的 bizObjectId
892
+ // 完全不共享字符串相似度——最近匹配回不出建议,只能报「无相近键」。
893
+ if (normalizedTool.startsWith("rule.") && key === "bizObjectId" && known.has("ids"))
894
+ return { closest: "ids", hint: "rule.run 的记录标识是 ids(字符串数组)" };
879
895
  if (normalizedTool.startsWith("data.") && key === "ids" && known.has("bizObjectIds"))
880
896
  return { closest: "bizObjectIds" };
881
897
  const aliases = KEY_ALIAS_HINTS[key.toLowerCase()] ?? [];
@@ -1306,7 +1322,7 @@ function cmdDiscovery(kind, transport, value, options = {}) {
1306
1322
  delete inventory.intent;
1307
1323
  const discovery = inventory.discovery;
1308
1324
  if (discovery)
1309
- inventory.discovery = { authoritative: discovery.authoritative, route: discovery.route };
1325
+ inventory.discovery = { authoritative: discovery.authoritative, route: discovery.route, appScope: DISCOVERY_AUTHORITY.appScope };
1310
1326
  // Zero hits: minimal envelope + up to three nearest candidates with an
1311
1327
  // exact next command — NOT the full catalogue to re-read (r18: the empty
1312
1328
  // match plus governance prose pushed the agent back to the 20 KB face).
@@ -2067,7 +2083,7 @@ function onboardingHelp() {
2067
2083
  "目标→工具一步定位:omc next \"<你要做什么>\"(离线、只读,给能力/说明/首批命令;不确定会明说并回退到 omc-requirement-analysis)。",
2068
2084
  // r30f F20:写清两道门——读面 diet(~2048) 与 stdout 预算(--max-output-bytes,默认 64KiB) 不是一回事。
2069
2085
  "输出预算:`--max-output-bytes` 默认 65536(64KiB;超则回 artifact 指针 + sha256),只约束最终 stdout 信封(投影/--jq 之后);`artifact get` 内联上限 8192。读面另有独立 diet 门(~2048)会先外置 detailArtifactId——抬高 --max-output-bytes 不会把已 diet 的大表重新内联。",
2070
- "大结果取值一步到位:读面回 detailArtifactId 时,用 omc call <tool> … --jq <path>(可重复;`[]` 映射数组,如 items[].fields.planNo)或 --extract/--extract-keys,省掉再跑一次 omc artifact get。commands/capabilities/describe 也支持 --jq。批量形状预检用 --args-list … --preflight(零 wire、零写入,一次报全)。",
2086
+ "投影:--jq 是路径选择器(非 jq 表达式)。读面回 detailArtifactId 时,用 omc call <tool> … --jq <path>(可重复;`[]` 映射数组,如 items[].fields.planNo)或 --extract/--extract-keys,省掉再跑一次 omc artifact get。commands/capabilities/describe 也支持 --jq。批量形状预检用 --args-list … --preflight(零 wire、零写入,一次报全)。",
2071
2087
  // r25 真机(2026-11-04):探针连跑同一读面 2–3 次想验证「第二次是否 unchanged」,
2072
2088
  // 结果三次都是全量,还去 describe 找 dedupe 参数(多花 3 轮)。读面确实不做跨调用
2073
2089
  // 结果去重——**明说**比留白强,省掉一次探索。
@@ -2277,7 +2293,7 @@ async function main() {
2277
2293
  commandExitCode = CLI_EXIT_CODES.ok;
2278
2294
  });
2279
2295
  command.command("doctor").option("--environment <environment>").option("--env <environment>").option("--service <serviceCode>", "可选:体检单个业务集成服务的鉴权参数形状(掩码/占位/全 0 检出,WARN 非致命)").action(async (options) => { commandExitCode = await cmdDoctor(new ConfigStore(defaultPaths()), options.environment ?? options.env, options.service); });
2280
- command.command("call <tool>").option("--env <environment>", "环境名;项目白名单按当前 cwd 解析,须在含 .omc-env 的目录内运行").option("--environment <environment>").option("--args <json>").option("--args-file <path>", "从文件读参数 JSON。**必须位于配置根内**(数组批量请改用 --args-list;跨目录/系统临时文件会被拒);免落盘用 `--args -`(stdin)").option("--args-list <json-array>", '同一工具跑 N 次(JSON 数组,每条一个 args 对象,最多 200 条);超过上限请分批,或用 omc script 读文件。逐条执行、默认不中断,最后回 succeeded/failed 汇总。适合批量建字段等').option("--preflight", "与 --args-list 一起用:只跑参数校验 + 写前语义闸(零 wire、零写入),一次报全所有形状问题").option("--keys", "与 artifact get 的 --keys 同义(= --extract-keys):列出本次结果 artifact 的顶层键与体积").addOption(new Option("--extract <path>", "在本次结果的 artifact 内取一个路径的值(可重复;省掉一次 artifact get)").argParser((value, previous = []) => [...previous, value]).default([])).addOption(new Option("--jq [path]", "同 --extract,并支持 [] 映射(如 items[].fields.planNo);裸 --jq 列出结果的顶层键").argParser((value, previous = []) => [...previous, value]).default([])).option("--extract-keys", "列出本次结果 artifact 的顶层键与体积(省掉一次 artifact get --keys)").option("--max-output-bytes <bytes>", "最终 stdout 信封预算;默认 65536(投影/--jq 之后再判);读面 diet(~2048) 独立外置 detailArtifactId,抬高本参数不会把已 diet 的大表重新内联;artifact get 内联上限 8192").option("--request-id <requestId>").option("--timeout-ms <milliseconds>").option("--wait <milliseconds>", "仅 `omc call` / `omc intent apply` 支持;写锁冲突时有界排队(0=立刻拒绝)").option("--dry-run").addHelpText("after", `\n${onboardingHelp()}\n`).action(async (tool, options) => {
2296
+ command.command("call <tool>").option("--env <environment>", "环境名;项目白名单按当前 cwd 解析,须在含 .omc-env 的目录内运行").option("--environment <environment>").option("--args <json>").option("--args-file <path>", "从文件读参数 JSON。**必须位于配置根内**(数组批量请改用 --args-list;跨目录/系统临时文件会被拒);免落盘用 `--args -`(stdin)").option("--args-list <json-array>", '同一工具跑 N 次(JSON 数组,每条一个 args 对象,最多 200 条);超过上限请分批,或用 omc script 读文件。逐条执行、默认不中断,最后回 succeeded/failed 汇总。适合批量建字段等').option("--preflight", "与 --args-list 一起用:只跑参数校验 + 写前语义闸(零 wire、零写入),一次报全所有形状问题").option("--keys", "与 artifact get 的 --keys 同义(= --extract-keys):列出本次结果 artifact 的顶层键与体积").addOption(new Option("--extract <path>", "在本次结果的 artifact 内取一个路径的值(可重复;省掉一次 artifact get)").argParser((value, previous = []) => [...previous, value]).default([])).addOption(new Option("--jq [path]", "路径选择器(非 jq),同 --extract;[] 映射如 items[].fields.planNo;裸 --jq 列顶层键").argParser((value, previous = []) => [...previous, value]).default([])).option("--extract-keys", "列出本次结果 artifact 的顶层键与体积(省掉一次 artifact get --keys)").option("--max-output-bytes <bytes>", "最终 stdout 信封预算;默认 65536(投影/--jq 之后再判);读面 diet(~2048) 独立外置 detailArtifactId,抬高本参数不会把已 diet 的大表重新内联;artifact get 内联上限 8192").option("--request-id <requestId>").option("--timeout-ms <milliseconds>").option("--wait <milliseconds>", "仅 `omc call` / `omc intent apply` 支持;写锁冲突时有界排队(0=立刻拒绝)").option("--dry-run").addHelpText("after", `\n${onboardingHelp()}\n`).action(async (tool, options) => {
2281
2297
  const rest = [tool, ...(options.env ? ["--env", options.env] : []), ...(options.environment ? ["--environment", options.environment] : []), ...(options.args !== undefined ? ["--args", options.args] : []), ...(options.argsFile !== undefined ? ["--args-file", options.argsFile] : []), ...(options.argsList !== undefined ? ["--args-list", options.argsList] : []), ...(options.preflight ? ["--preflight"] : []), ...(Array.isArray(options.extract) ? options.extract.flatMap((path) => ["--extract", path]) : []), ...(Array.isArray(options.jq) ? options.jq.flatMap((path) => path === true ? ["--jq"] : ["--jq", path]) : []), ...(options.extractKeys ? ["--extract-keys"] : []),
2282
2298
  ...(options.keys ? ["--keys"] : []), ...(options.maxOutputBytes !== undefined ? ["--max-output-bytes", options.maxOutputBytes] : []), ...(options.requestId ? ["--request-id", options.requestId] : []), ...(options.timeoutMs !== undefined ? ["--timeout-ms", options.timeoutMs] : []), ...(options.wait !== undefined ? ["--wait", options.wait] : []), ...(options.dryRun ? ["--dry-run"] : [])];
2283
2299
  commandExitCode = await cmdCall(new ConfigStore(defaultPaths()), rest);
@@ -2570,7 +2586,7 @@ async function main() {
2570
2586
  console.error(`已清理 ${result.removed} 个读回产物,释放 ${formatBytes(result.freedBytes)};保留 ${result.kept} 个(${formatBytes(result.keptBytes)})`);
2571
2587
  commandExitCode = CLI_EXIT_CODES.ok;
2572
2588
  });
2573
- artifactCommand.command("get <id>").addOption(new Option("--jq [path]").argParser((value, previous = []) => [...previous, value]).default([])).option("--extract <path>", "同 --jq(与 omc call 的 --extract 同名,省一次命名切换)").option("--path-only").option("--summary").option("--keys [a,b]").option("--full", "整包返回正文(默认:正文超过 8KB 时只回形状 outline + fetch,按需 --jq/--keys 定向取值)").option("--max-output-bytes <bytes>").action(async (id, options) => {
2589
+ artifactCommand.command("get <id>").addOption(new Option("--jq [path]", "路径选择器(非 jq);支持 [] 映射与逗号多路径;裸 --jq 列顶层键").argParser((value, previous = []) => [...previous, value]).default([])).option("--extract <path>", "同 --jq(与 omc call 的 --extract 同名,省一次命名切换)").option("--path-only").option("--summary").option("--keys [a,b]").option("--full", "整包返回正文(默认:正文超过 8KB 时只回形状 outline + fetch,按需 --jq/--keys 定向取值)").option("--max-output-bytes <bytes>").action(async (id, options) => {
2574
2590
  // A bare `--jq`/`--keys` is a key-inventory request, not a missing argument:
2575
2591
  // commander's "argument missing" (invalid-input + retry) is a dead end the
2576
2592
  // caller cannot fix without already knowing the flag takes a value (r11
package/dist/coverage.js CHANGED
@@ -125,6 +125,7 @@ export function versionFamilyNotice(manifest, detectedVersion) {
125
125
  if (detectedVersion.startsWith(manifest.version_family + "."))
126
126
  return undefined;
127
127
  return (`兼容模式:检测到 CloudPivot ${detectedVersion},不在 OMC 锚定的 ${manifest.version_family} 族` +
128
- `(锚点 ${manifest.anchor_version})。OMC 基于 8.6 构建,非 8.6 环境按兼容支持,部分能力面可能不适用。`);
128
+ `(锚点 ${manifest.anchor_version})。OMC 基于 8.6 构建,非 8.6 环境按兼容支持,部分能力面可能不适用。` +
129
+ `取证口径:以本环境真机实测为准,8.6 文档与反编译结论仅作参考。`);
129
130
  }
130
131
  //# sourceMappingURL=coverage.js.map
package/dist/discovery.js CHANGED
@@ -444,6 +444,11 @@ function returnsFace(toolName) {
444
444
  },
445
445
  };
446
446
  }
447
+ const DATA_PARAMETER_NAMES = [
448
+ { concept: "业务数据载荷", parameters: "data.save / data.update = formData;其它无" },
449
+ { concept: "记录标识", parameters: "data.load / data.delete / data.submit = bizObjectId" },
450
+ { concept: "流程三件套", parameters: "data.submit 专用:bizObjectId + workItemId + workflowInstanceId" },
451
+ ];
447
452
  /** Default `omc describe`: the compact contract projection. */
448
453
  export function describeTool(registry, name) {
449
454
  const tool = registry.find((entry) => entry.name === name);
@@ -489,6 +494,7 @@ export function describeTool(registry, name) {
489
494
  // 撞上之前没有任何发现面说过"写是环境级串行"——describe 的 params 里没有 wait
490
495
  // (它是 omc call 的 CLI 开关,不在工具 schema),capability notes 是空的。
491
496
  ...(tool.kind === "write" ? { writeLock: "写锁=环境级:同一环境的并发写,后到的直接回 write-lock-held(不排队)。可带 --wait <ms> 让 CLI 内部排队(CLI 开关,不是本工具参数);不要写 shell 重试循环" } : {}),
497
+ ...(tool.name.startsWith("data.") ? { parameterNames: DATA_PARAMETER_NAMES } : {}),
492
498
  // Keep the cost salient at the decision point: agents reached for --full even
493
499
  // when --example/--param existed (sandbox22: 8 --full calls, one 19 KB).
494
500
  full: `omc describe ${tool.name} --full(5–20KB;先试 --example/--param)`,
@@ -640,6 +646,7 @@ export function describeToolFull(registry, name) {
640
646
  lane: tool.lane ?? null,
641
647
  kind: tool.kind,
642
648
  description: tool.description,
649
+ ...(tool.name.startsWith("data.") ? { parameterNames: DATA_PARAMETER_NAMES } : {}),
643
650
  ...(capability ? { capability } : {}),
644
651
  inputSchema: schema,
645
652
  // Recipe ids only — the args live behind `--example <id>` (round 13). This
package/dist/field-add.js CHANGED
@@ -20,6 +20,44 @@ import { writeEnvelope } from "./cli-output.js";
20
20
  import { assertSafeInputPath } from "./artifacts.js";
21
21
  import { readFileSync } from "node:fs";
22
22
  import { resolve } from "node:path";
23
+ /**
24
+ * 模型级发布的爆炸半径:读出该模型草稿面里「不是本次要建的」字段。
25
+ *
26
+ * `omc field-add` 内部走 `field.publish`,而平台该端点是**模型级**的——一次发布会把
27
+ * 模型上所有草稿字段一起发布,且没有「取消发布」端点。r53 真机事故就是:探针据
28
+ * `model.inspect` 的字段面(只含已发布)判断「模型只有 10 个字段」,走 field-add 时
29
+ * 把一条与本次无关的历史草稿字段一起发布了,无法撤销。
30
+ *
31
+ * 只读一次;失败不阻断(爆炸半径是提示不是门)。
32
+ */
33
+ async function listOtherDraftFields(schemaCode, ownCodes, opts) {
34
+ const callFieldList = async (published) => {
35
+ const outcome = await runToolCall("field.list", {
36
+ args: { schemaCode, published },
37
+ requestId: opts.requestId,
38
+ ...(opts.environment !== undefined ? { environment: opts.environment } : {}),
39
+ ...(opts.context !== undefined ? { context: opts.context } : {}),
40
+ print: () => undefined,
41
+ });
42
+ if (outcome.exitCode !== 0)
43
+ return undefined;
44
+ const result = outcome.result;
45
+ return Array.isArray(result.fields) ? result.fields : [];
46
+ };
47
+ const draftRows = await callFieldList(false);
48
+ if (draftRows === undefined)
49
+ return [];
50
+ // r54 C② F6(真机 1.1.25):草稿面**含已发布字段的草稿行**——不做差集会把
51
+ // 全部已发布字段误报成「本次之外的草稿字段」,dry-run 变成假警报(探针差点
52
+ // 因此放弃正确操作)。减掉已发布面后剩的才是真正的「未发布字段」。
53
+ // 已发布面拿不到时退回原始清单(宁可误报不可漏报——r53 事故是漏报侧)。
54
+ const publishedRows = await callFieldList(true);
55
+ const publishedCodes = new Set(publishedRows === undefined ? [] : publishedRows.map((row) => String(row.code ?? row.propertyCode ?? "")));
56
+ const own = new Set(ownCodes);
57
+ return draftRows
58
+ .map((row) => String(row.code ?? row.propertyCode ?? ""))
59
+ .filter((code) => code.length > 0 && !own.has(code) && !publishedCodes.has(code));
60
+ }
23
61
  /**
24
62
  * 字典简写展开(r30/r36 实证:字典字段要先 names 查 id、records 取记录、
25
63
  * 再拼 optionsSet.dictionary 三段 4–5 调;`dictCode` 把它折进 field-add 一步):
@@ -237,21 +275,40 @@ export async function cmdFieldAdd(args, contextForTest) {
237
275
  return CLI_EXIT_CODES.policyRefused;
238
276
  }
239
277
  if (!apply) {
278
+ // 模型级发布的爆炸半径:field.publish 会把该模型上**所有**草稿字段一起发布
279
+ // (平台没有「只发布指定字段」的端点,也没有「取消发布」)。这里先把「本次要建的
280
+ // 字段之外还有哪些草稿字段」读出来(一次只读),否则用户只看到 field.create ×N,
281
+ // 不知道自己顺带发布了别人的东西——r53 真机事故。
282
+ const otherDraftFields = await listOtherDraftFields(schemaCode, fields.map((field) => String(field.code)), {
283
+ ...(environment !== undefined ? { environment } : {}),
284
+ ...(contextForTest !== undefined ? { context: contextForTest } : {}),
285
+ requestId: request,
286
+ });
240
287
  writeEnvelope(envelope("ok", {
241
288
  status: "dry-run",
242
289
  schema: schemaCode,
243
290
  fields: fields.map((field) => String(field.code)),
244
291
  ...(dictExpanded > 0 ? { dictExpanded } : {}),
292
+ ...(otherDraftFields.length > 0
293
+ ? {
294
+ otherDraftFields,
295
+ otherDraftFieldsNote: "未发布字段差集(草稿面 − 已发布面)——field.publish 会把它们一并转正;已发布字段的草稿改动同样随发布生效,但不算新增字段。",
296
+ }
297
+ : {}),
245
298
  steps: [
246
299
  `field.create ×${fields.length}`,
247
- "field.publish(发布失败/有字段失败则停)",
248
- ...(publishForm ? [`form.publish ${schemaCode} --rebuild(重建让新字段进默认表单)`] : []),
300
+ `field.publish(模型级:会一并发布**该模型上所有草稿字段**——含已发布字段的草稿改动${otherDraftFields.length > 0 ? `,并把本次之外的未发布字段 ${otherDraftFields.join("、")} 一并转正` : ""};不可撤销,平台无取消发布端点)`,
301
+ ...(publishForm ? [`form.publish ${schemaCode} --rebuild(重建让新字段进默认表单;**会重发 Group/Title 等布局控件 id,回不到原 id**)`] : []),
249
302
  ...(addToList ? [`listview.configure ${schemaCode} 增量追加列(列保留;固定条件整体替换)`] : []),
250
303
  ...(conditions !== undefined ? [`listview.configure 附带固定过滤条件 ×${conditions.length}`] : []),
251
304
  ...(demoRows !== undefined ? [`data.submit 演示行 ×${demoRows.length}(非幂等)`] : []),
252
305
  ],
253
306
  preflight: { checked: fields.length, passed: true },
254
- note: "dry-run 只列计划;已对每个字段跑过本地形状预检(零 wire)。--apply 依次执行全部步骤。",
307
+ note: "dry-run 只列计划;已对每个字段跑过本地形状预检(零 wire),`otherDraftFields` 是一次只读查询的结果。" +
308
+ (otherDraftFields.length > 0
309
+ ? ` ⚠ 该模型还有未发布字段 ${otherDraftFields.join("、")}(不是本次要建的),上述 field.publish 会把它们一起转正且无法撤销。`
310
+ : "") +
311
+ " --apply 依次执行全部步骤。",
255
312
  }, request));
256
313
  return CLI_EXIT_CODES.ok;
257
314
  }
@@ -321,13 +321,23 @@ export const CAPABILITY_SECTIONS = Object.freeze({
321
321
  { topic: "omc-business-configuration", sections: ["运行验收与清理"] },
322
322
  { topic: "omc-refusals", sections: ["4. Readback mismatch — the write landed but does not match", "6. Idempotency & replay"] },
323
323
  ],
324
+ programming: [
325
+ { topic: "omc-backend-online-coding", sections: ["0.1 在线编码的能力边界(实测,1.1.25)", "5.1 调用面:自定义规则怎么被外部调用(8.6.26 反编译 2026-11-10)"] },
326
+ ],
324
327
  });
325
- function sectionPointersFor(ids) {
328
+ function sectionPointersFor(ids, goal) {
326
329
  const seen = new Set();
327
330
  const pointers = [];
328
331
  for (const id of ids)
329
332
  for (const entry of CAPABILITY_SECTIONS[id] ?? []) {
330
- for (const section of entry.sections) {
333
+ const programmingBoundary = goal !== undefined && /import|扩展包|扩展|jar|工具类|类路径|loader/i.test(goal);
334
+ const programmingCallSurface = goal !== undefined && /oauth|openapi|client_credentials|外部调用|外部系统|invoke|调用自定义规则|返回值/i.test(goal);
335
+ const sections = id === "programming" && programmingBoundary
336
+ ? entry.sections.filter((section) => section.startsWith("0.1 "))
337
+ : id === "programming" && programmingCallSurface
338
+ ? entry.sections.filter((section) => section.startsWith("5.1 "))
339
+ : entry.sections;
340
+ for (const section of sections) {
331
341
  const key = `${entry.topic}\u0000${section}`;
332
342
  if (seen.has(key))
333
343
  continue;
@@ -669,6 +679,23 @@ export function goalRoute(registry, goal) {
669
679
  const availableTopics = new Set(listSkills().map((topic) => topic.name));
670
680
  const mode = detectMode(goal);
671
681
  const readish = mode === "read" || mode === "scout";
682
+ // Known absence only: field-families exposes list/create/update/publish/delete,
683
+ // with no unpublish endpoint or update status bit (local 1.1.25 probe, 2026-11-11).
684
+ // Do not infer other absences from tool names: rollback is a top-level command,
685
+ // and other reverse operations may live in arguments rather than separate tools.
686
+ // Keep publication reversal distinct from e.g. “取消字段必填并发布”.
687
+ const fieldUnpublish = /(字段|\bfield(?:s)?\b)/i.test(goal)
688
+ && /(?:取消|撤销|撤下|撤回|回滚)(?:字段的?|已)?发布|(?:退回|回滚|恢复)(?:到|为)?(?:之前的?|原来的?)?未发布|恢复到(?:之前|原来)的?(?:发布前|未发布)状态|\bunpublish\b|\b(?:revert|rollback|undo|cancel|withdraw)\s+(?:(?:the\s+)?field\s+)?(?:publish(?:ing)?|publication)\b/i.test(goal);
689
+ if (fieldUnpublish && !registryTools.has("field.unpublish")) {
690
+ const reason = "本版本没有字段取消发布(退回未发布状态)的能力;field.update 不能翻转发布状态,field.delete 是删除而非撤销发布,可能丢失数据。";
691
+ return {
692
+ status: "ok", goal, confident: false, mode: "modify", write: false,
693
+ match: { kind: "absence", ref: "field.unpublish" },
694
+ absent: { capability: "field", intent: "unpublish", reason },
695
+ route: null,
696
+ firstAnswer: { state: "blocked", why: reason },
697
+ };
698
+ }
672
699
  // Boundary FIRST. An ask that names an out-of-coverage face (OCR, release/
673
700
  // prod, inline coding, nested child, cross-model aggregation) must not be
674
701
  // matched to a nearby capability and handed the write ladder — that is the
@@ -866,6 +893,17 @@ export function goalRoute(registry, goal) {
866
893
  // Score capabilities BEFORE composer capture so a multi-face ask (r31c F1)
867
894
  // is not stolen by the first matching composer (e.g. 「合计」→ compute).
868
895
  const scoreMap = capabilityScores(registry, goal);
896
+ // Online-coding-specific vocabulary is an intent discriminator, not a
897
+ // second face of a configuration package. Keep generic words such as
898
+ // "规则" from adding a datarule/businessrule ladder step: these goals must
899
+ // answer from programming's boundary/call-surface guidance first.
900
+ const programmingScore = scoreMap.get("programming") ?? 0;
901
+ const programmingSpecific = /import|扩展包|扩展|jar|工具类|类路径|loader|oauth|openapi|client_credentials|第三方|外部调用|外部系统|invoke|调用自定义规则|返回值/i.test(goal);
902
+ if (programmingSpecific && programmingScore > 0) {
903
+ for (const id of [...scoreMap.keys()])
904
+ if (id !== "programming")
905
+ scoreMap.delete(id);
906
+ }
869
907
  const scores = [...scoreMap.entries()].sort((left, right) => right[1] - left[1]);
870
908
  const scoredCapabilityIds = scores.filter((entry) => entry[1] >= 2).map((entry) => entry[0]);
871
909
  const composer = matchComposer(goal, mode);
@@ -987,7 +1025,7 @@ export function goalRoute(registry, goal) {
987
1025
  // 否则「建表单布局 + 在线JS」这类目标会先挂上 model 的通用「标准顺序」,
988
1026
  // 把真正相关的「表单与视图 / 按钮与在线 JS」挤到后面。
989
1027
  const sectionOrder = [...ordered].sort((a, b) => (scoreMap.get(b) ?? 0) - (scoreMap.get(a) ?? 0));
990
- const readSections = sectionPointersFor(sectionOrder);
1028
+ const readSections = sectionPointersFor(sectionOrder, goal);
991
1029
  const write = readish ? false : ordered.some((id) => routeById.get(id)?.tools.some((name) => registryTools.get(name)?.kind === "write"));
992
1030
  const whole = isWholePackageWrite(mode, goal, ordered.length);
993
1031
  // r19 ticket 04: the ladder's first RECIPE command is the first answer
@@ -1083,7 +1121,11 @@ export function goalRoute(registry, goal) {
1083
1121
  // data.submit recipe in another lane. Hand it over directly.
1084
1122
  if (!readish && /审批|通过|驳回|提交|签收/.test(goal) && (capabilityId === "workflow" || capabilityId === "runtimeData"))
1085
1123
  firstCommands.push("omc describe data.submit --example workflow-backed-data-submit");
1086
- const whole = isWholePackageWrite(mode, goal, 1);
1124
+ // A programming-specific goal may mention several nouns (application,
1125
+ // credentials, rules), but it is still a single online-coding question;
1126
+ // never replace its first answer with the generic intent starter.
1127
+ const programmingSpecificGoal = /import|扩展包|扩展|jar|工具类|类路径|loader|oauth|openapi|client_credentials|第三方|外部调用|外部系统|invoke|调用自定义规则|返回值/i.test(goal);
1128
+ const whole = !programmingSpecificGoal && isWholePackageWrite(mode, goal, 1);
1087
1129
  const recipeCommand = recipe ? `omc describe ${recipe.tool} --example ${recipe.recipe}` : undefined;
1088
1130
  return {
1089
1131
  status: "ok",
@@ -1104,7 +1146,7 @@ export function goalRoute(registry, goal) {
1104
1146
  ? { primary: "intent" }
1105
1147
  : { primary: "atomic", note: "该能力无声明式面(intent.level=none),走原子工具" }) : {}),
1106
1148
  ...(readish ? { readTools: readToolsInLane(registry, route.lane) } : { tools: route.tools }),
1107
- ...routeReads(sectionPointersFor([capabilityId]), recipe !== undefined),
1149
+ ...routeReads(sectionPointersFor([capabilityId], goal), recipe !== undefined),
1108
1150
  readiness: DISCOVERY_AUTHORITY.readiness,
1109
1151
  firstCommands,
1110
1152
  write,
@@ -203,9 +203,19 @@ function phraseOf(tool, args, outcome) {
203
203
  // abandoned submit-flag design) contradicted the REAL one-call chain —
204
204
  // the agent read "规则不派发" next to a COMPLETED readback with the rule
205
205
  // fired. The summary must match the delivered semantics.
206
- return args.submit === true
207
- ? `保存并直提数据(模型 ${schemaCode ?? "?"})——一调完成态:DRAFT→COMPLETED,Create 规则已派发(无流程模型;流程模型会拒绝并指路两段式)`
208
- : `保存数据(模型 ${schemaCode ?? "?"})——草稿 DRAFT;要一调完成态加 submit:true`;
206
+ // r54 C② F6(真机):submit:true 在**有流程模型**上会被拒(readback.submitRefused
207
+ // 带三段式指引),但 summary 只看 args 就宣称「DRAFT→COMPLETED 规则已派发」——
208
+ // 信封自相矛盾(summary 说完成、readback 是 DRAFT),探针信了 summary 以为
209
+ // submit 被静默吞掉。summary 必须看 outcome:被拒就说被拒。
210
+ {
211
+ const submitRefused = outcome?.readback?.submitRefused;
212
+ if (args.submit === true && submitRefused !== undefined) {
213
+ return `保存数据(模型 ${schemaCode ?? "?"})——submit:true 被拒(${submitRefused.blocker ?? "?"}):模型有已发布流程,行保持草稿 DRAFT;三段式指引进 readback.submitRefused`;
214
+ }
215
+ return args.submit === true
216
+ ? `保存并直提数据(模型 ${schemaCode ?? "?"})——一调完成态:DRAFT→COMPLETED,Create 规则已派发(无流程模型;流程模型会拒绝并指路两段式)`
217
+ : `保存数据(模型 ${schemaCode ?? "?"})——草稿 DRAFT;要一调完成态加 submit:true`;
218
+ }
209
219
  case "data.update":
210
220
  return `更新数据 ${stringArg(args, "bizObjectId") ?? "?"}(${schemaCode ?? "?"})`;
211
221
  case "data.submit":
@@ -325,6 +325,7 @@ export function registerBusinessRuleLane(tools) {
325
325
  full: z.boolean().optional().describe("返回原始存储图(含确定性布局 x/y/width/height 与路由 points);默认返回语义图,确定性布局已投影去掉(可直接重存,保存时会重新生成布局)"),
326
326
  keys: z.array(z.string().min(1)).min(1).optional().describe("工具经济(A6):只返回列出的顶层键(identity 键 id/code/schemaCode 恒在)。例 ['schedulerSetting'] 只看调度配置,不内联整图——对照生产规则形状时用"),
327
327
  summary: z.boolean().optional().describe("工具经济(A6):只返回身份与体量摘要(节点数/路由数/schedulerSetting 是否存在),不含 nodes/routes 正文"),
328
+ withRuntime: z.boolean().optional().describe("opt-in 聚合运行态:合并规则存在性、可执行性、源码版本与最近日志;默认不增加 wire 读取"),
328
329
  capability: capabilityArg,
329
330
  },
330
331
  handler: async (ctx, args, self) => governedRead(ctx, self, args, async (session) => {
@@ -422,6 +423,8 @@ export function registerBusinessRuleLane(tools) {
422
423
  schemaCode: record.schemaCode,
423
424
  bizRuleType: record.bizRuleType,
424
425
  enabled: record.enabled,
426
+ executable: record.enabled === true,
427
+ executableBasis: `依据 app/businessrule/get.enabled=${String(record.enabled)} 判启用开关(developmentMode=${String(record.developmentMode ?? "unknown")});ruleStatus 是同一 get 面的 status 列,可能滞后,不据此否决运行;此为开关推断,不保证触发条件满足或执行成功,未逐版本真机验证`,
425
428
  // The platform's `status` column lags behind the enable switch: r10
426
429
  // saw `enabled:true` with `ruleStatus:"DISABLED"` while rule.list said
427
430
  // ENABLED. `enabled` is the dispatch truth; flag the disagreement
@@ -441,6 +444,40 @@ export function registerBusinessRuleLane(tools) {
441
444
  ...(semanticFindings ? { semanticFindings } : {}),
442
445
  ...(staleRow ? { staleRow, effectiveId, staleRowMessage } : {}),
443
446
  };
447
+ if (args.withRuntime === true) {
448
+ const coding = record.developmentMode === 1 || record.developmentMode === "1" || record.developmentMode === "CODING";
449
+ let sources = [];
450
+ try {
451
+ const sourceResponse = await wireCall(session, { path: ENDPOINTS.programmingListSources, query: { schemaCode: String(record.schemaCode ?? args.schemaCode ?? "") } });
452
+ sources = wireRows(sourceResponse.data).filter((row) => String(row.businessRuleCode ?? row.code ?? "") === String(record.code ?? args.ruleCode ?? ""));
453
+ }
454
+ catch { /* source face is optional; preserve rule.get */ }
455
+ let lastExecution = null;
456
+ if (!coding) {
457
+ try {
458
+ const logData = await wireCall(session, { path: ENDPOINTS.ruleLogSearch.replace("{schemaCode}", encodeURIComponent(String(record.schemaCode))), method: "POST", body: { page: 0, size: 1, ruleCode: record.code } });
459
+ const rows = wireRows(logData.data);
460
+ lastExecution = rows[0] ?? null;
461
+ }
462
+ catch { /* log face is optional */ }
463
+ }
464
+ const sourceVersions = sources.map((source) => ({ version: source.version ?? null, published: source.published === true, source: "programming.sources" }));
465
+ const runtime = {
466
+ exists: true,
467
+ developmentMode: { value: record.developmentMode ?? null, source: "rule.get" },
468
+ enabled: { value: record.enabled ?? null, source: "rule.get" },
469
+ executable: { value: record.enabled === true, basis: payload.executableBasis, source: "rule.get" },
470
+ draftVersion: { value: sourceVersions[0]?.version ?? null, source: "programming.sources" },
471
+ publishedVersion: { value: sourceVersions.find((entry) => entry.published)?.version ?? null, source: "programming.sources" },
472
+ lastExecution: coding ? null : (lastExecution ? { triggerTime: lastExecution.triggerTime ?? null, finishTime: lastExecution.finishTime ?? null, status: lastExecution.status ?? null, source: "rulelog" } : null),
473
+ traceable: !coding,
474
+ ...(coding ? { traceNote: "CODING 模式规则不记日志;执行痕迹用 data.load 比对业务字段或看容器日志", sourceNote: "programming.sources" } : {}),
475
+ contradictions: [
476
+ ...(record.enabled === true && String(record.status ?? "") !== "ENABLED" ? [{ fields: ["rule.get.enabled", "rule.get.ruleStatus", "rule.list.status"], note: "面间状态矛盾:enabled=true 按裁决逻辑仍视为可执行,status 列可能滞后" }] : []),
477
+ ],
478
+ };
479
+ payload.runtime = runtime;
480
+ }
444
481
  // A6 工具经济(2026-11-03 issue):rule.get 默认内联整图(nodes/routes/
445
482
  // schedulerSetting 全量),对照生产规则形状时往往只要一个键。summary 给
446
483
  // 身份+体量;keys 保留列出的键 + 恒定的 identity 键。两者都作用于投影后
@@ -449,6 +486,7 @@ export function registerBusinessRuleLane(tools) {
449
486
  return {
450
487
  id: payload.id, code: payload.code, name: payload.name, schemaCode: payload.schemaCode,
451
488
  bizRuleType: payload.bizRuleType, enabled: payload.enabled, ruleStatus: payload.ruleStatus,
489
+ executable: payload.executable, executableBasis: payload.executableBasis,
452
490
  defaultRule: payload.defaultRule, ruleVersion: payload.ruleVersion,
453
491
  nodeCount: Array.isArray(payload.nodes) ? payload.nodes.length : 0,
454
492
  routeCount: Array.isArray(payload.routes) ? payload.routes.length : 0,
@@ -59,6 +59,9 @@ export function registerEnvironmentLane(tools) {
59
59
  const versionEvidence = versionEvidenceFor(ctx, session);
60
60
  return {
61
61
  status: "ok",
62
+ // r53 场景03 F2:缓存命中与冷路径同面给出 baseUrl(非密)。
63
+ baseUrl: session.profile.baseUrl,
64
+ baseUrlHint: "非密运行参数(环境配置的 baseUrl)。拼平台端点用它 + 路径;鉴权凭据不在此面。",
62
65
  applications: apps,
63
66
  applicationsCount: apps.length,
64
67
  groups,
@@ -258,6 +261,10 @@ export function registerEnvironmentLane(tools) {
258
261
  const versionEvidence = versionEvidenceFor(ctx, session);
259
262
  return {
260
263
  ...discovered,
264
+ // r53 场景03 F2:agent 要拼「端点 = baseUrl + path」(比如外部 invoke 面)时
265
+ // 只能伸手进凭据目录附近自制过滤读取。baseUrl 是非密运行参数,在这里给掉。
266
+ baseUrl: session.profile.baseUrl,
267
+ baseUrlHint: "非密运行参数(环境配置的 baseUrl)。拼平台端点用它 + 路径;鉴权凭据不在此面。",
261
268
  // r28k F3:裸 hex 不解自用。指纹是 (env, origin, application, enterprise)
262
269
  // 的规范 sha256——绑定写计划 / intent plan 漂移门 / draft 写前复核 /
263
270
  // 读回缓存键;它不是审批令牌。
@@ -1719,10 +1719,30 @@ export async function executeFieldPublish(session, args) {
1719
1719
  mismatches,
1720
1720
  message: `字段已发布,但发布后详情回读与草稿面不一致(${mismatches.map((item) => String(item.code)).join("、")}):这是元数据与预期形状相异的信号,先核对再决定后续;不要当作成功`,
1721
1721
  });
1722
+ // bizproperty/publish 是**模型级**的:一次发布会把该模型上所有草稿字段一起发布,
1723
+ // 平台没有「只发布某一个」的端点,也没有「取消发布」。所以「顺带发布了别人的草稿字段」
1724
+ // 是这条端点的固有副作用,回执必须说出来——r53 真机事故:探针据 model.inspect 的
1725
+ // 已发布字段面判断「模型只有 10 个字段」,走 field-add 时把某条历史草稿字段一起发布了,
1726
+ // 无法撤销,只能在交付报告里解释,且该字段的 mapping 会覆盖业务字段。
1727
+ // 只在调用方**点名**了某些字段时才谈「附带发布」:不点名 = 意图就是整模型批量发布,
1728
+ // 没有「本次之外的」概念,不要制造噪音。
1729
+ const collateralPublishedCodes = requested.length > 0
1730
+ ? [...draftCodesBefore].filter((code) => !requested.includes(code) && publishedCodes.includes(code))
1731
+ : [];
1722
1732
  return {
1723
1733
  performed: { errcode: publishOutcome.errcode, scope: "model" },
1724
1734
  readback: {
1725
1735
  publishedCodes,
1736
+ // 作用域声明:本次发布覆盖整个模型,不是只覆盖 requested。
1737
+ publishedScope: "model",
1738
+ ...(collateralPublishedCodes.length > 0
1739
+ ? {
1740
+ collateralPublishedCodes,
1741
+ collateralNote: `本次发布是模型级:除请求的 ${requested.length > 0 ? requested.join("、") : "全部草稿字段"} 外,` +
1742
+ `还一并发布了模型上原本就在草稿面的 ${collateralPublishedCodes.join("、")}。` +
1743
+ "平台无「单独发布」也无「取消发布」端点,这一步不可撤销;如需让它们不生效只能用 field.delete(会丢该列数据)。",
1744
+ }
1745
+ : {}),
1726
1746
  ...(args.code ? { publishedFieldPresent: publishedCodes.includes(args.code) } : {}),
1727
1747
  ...(args.codes ? { publishedFieldsPresent: Object.fromEntries(args.codes.map((code) => [code, publishedCodes.includes(code)])) } : {}),
1728
1748
  ...(requested.length > 0
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
  import { environmentArg } from "../args.js";
3
3
  import { environmentNotice, environmentWritable, requiresProductionConfirmation } from "../environment-policy.js";
4
4
  import { removedProfileKeys } from "../config-store.js";
5
+ import { versionFamilyNotice } from "../coverage.js";
5
6
  import { defineTool } from "../tool-types.js";
6
7
  import { unsupportedCapabilities } from "../version-family-gaps.js";
7
8
  import { META_LANE_CONTRACT } from "./meta-contract.js";
@@ -299,11 +300,12 @@ export function registerMetaLane(tools) {
299
300
  const familyOk = version ? version.startsWith(ctx.manifest.version_family + ".") : null;
300
301
  steps.push({
301
302
  step: "版本族",
302
- ok: familyOk === true,
303
+ // Outside the anchor family is advisory (WARN), not a failed write gate.
304
+ ok: familyOk === null ? false : familyOk ? true : null,
303
305
  version: version ?? null,
304
306
  expectedFamily: ctx.manifest.version_family,
305
307
  anchor: ctx.manifest.anchor_version,
306
- note: familyOk === null ? "缺少版本证据;写入将保守拒绝" : familyOk ? "兼容" : "不兼容;写入将保守拒绝",
308
+ note: familyOk === null ? "缺少版本证据;写入将保守拒绝" : versionFamilyNotice(ctx.manifest, version) ?? "兼容",
307
309
  });
308
310
  steps.push({ step: "环境指纹", ok: true, fingerprint: session.environmentFingerprint() });
309
311
  // T09 — optional per-service credential shape probe (non-fatal).
@@ -467,6 +467,7 @@ export function registerModelLane(tools) {
467
467
  }
468
468
  : {}),
469
469
  fields,
470
+ fieldsScope: "published",
470
471
  form,
471
472
  listview,
472
473
  rules,
@@ -474,7 +475,7 @@ export function registerModelLane(tools) {
474
475
  rulesCustom: rules.filter((rule) => rule.defaultRule !== true).map((rule) => rule.code),
475
476
  datarules,
476
477
  workflow,
477
- hint: "model.inspect 聚合设计时六面(fields/form/listview/rules/datarules/workflow,摘要);name 是模型显示名(业务方的中文菜单名),与 schemaCode 一一对应,不必再用 listview.list 反推。modelPresent 是存在性判据(field 面 300004=false);字段 options 细节用 field.list --code;规则图用 rule.get schemaCode+ruleCode;运行数据用 data.list(不在此面)。",
478
+ hint: "model.inspect 聚合设计时六面(fields/form/listview/rules/datarules/workflow,摘要);fields 只含已发布字段,草稿字段不在此列;all:true 仅恢复系统字段,不含草稿。查草稿用 field.list {schemaCode,published:false}(all:true 可含系统字段);field.publish 是模型级发布,会一并发布所有草稿字段。name 是模型显示名(业务方的中文菜单名),与 schemaCode 一一对应,不必再用 listview.list 反推。modelPresent 是存在性判据(field 面 300004=false);字段 options 细节用 field.list --code;规则图用 rule.get schemaCode+ruleCode;运行数据用 data.list(不在此面)。",
478
479
  };
479
480
  };
480
481
  const one = await inspectOne(codes[0]);
@@ -493,6 +494,7 @@ export function registerModelLane(tools) {
493
494
  return result;
494
495
  return {
495
496
  schemaCode: result.schemaCode,
497
+ fieldsScope: result.fieldsScope,
496
498
  ...(result.applicationCode !== undefined ? { applicationCode: result.applicationCode } : {}),
497
499
  // r35a-F3:compact 投影必须保留 code(model.list 有 code,inspect 此前
498
500
  // 只剩 schemaCode,`--jq '[].code'` 必 pathMiss 白跑一轮)。
@@ -84,7 +84,7 @@ export const PROGRAMMING_LANE_CONTRACT = Object.freeze({
84
84
  }),
85
85
  "programming.publish": Object.freeze({
86
86
  scope: PROGRAMMING_SCOPE,
87
- description: "发布源码(POST publish):内部 saveDraftSource→**强制 compile**(失败回 PROGRAMMING_COMPILE_FAILED)→插 published 新版本行→BUSINESS_RULE 规则自动置 DevelopmentMode.CODING+enabled+发布。载荷必须带 businessRule 整模型(工具内按 ruleCode 从 businessrule/list_by_schemacode 补齐;规则不存在则拒绝)。发布后运行时才执行该源码。content 省略时用远端草稿。",
87
+ description: "发布源码(POST publish):内部 saveDraftSource→**强制 compile**(失败回 PROGRAMMING_COMPILE_FAILED)→插 published 新版本行→BUSINESS_RULE 规则自动置 DevelopmentMode.CODING+enabled+发布。发布不可逆:永久切在线编码、平台无法退回图形化(删除=连源码删)。先 dry-run 看后果。载荷必须带 businessRule 整模型(工具内按 ruleCode 从 businessrule/list_by_schemacode 补齐;规则不存在则拒绝)。发布后运行时才执行该源码。content 省略时用远端草稿。",
88
88
  }),
89
89
  }),
90
90
  });