@stalfh233/omc-cli 0.8.16 → 0.8.18

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.
@@ -820,6 +820,107 @@ function projectPathOnSource(source, path) {
820
820
  }
821
821
  return { ...first };
822
822
  }
823
+ /**
824
+ * F8(0.8.17 真机 P1):拒绝态投影会把「没有值」伪装成成功值。`data.list` 对不存在的
825
+ * 模型回 `{status:"refused", blocker:"schema-not-found", total:0}`,`--jq total` 于是
826
+ * 回 `0`——与「模型存在但没有行」同形,调用方会把「模型没了」读成「0 条数据」。
827
+ *
828
+ * 拒绝不是答案:非诊断路径不投影,回拒绝摘要(blocker/message/nextCommand 原样保留)。
829
+ * **不**笼统禁止 refused 的所有投影——`--jq blocker` / `--jq message` 正是排查入口,
830
+ * 挡掉它们等于让防护挡住自己的逃生门。只挡「会伪装成功值」的载荷字段。
831
+ */
832
+ const REFUSAL_DIAGNOSTIC_KEYS = new Set([
833
+ // 结论与排查入口
834
+ "status",
835
+ "blocker",
836
+ "message",
837
+ "nextCommand",
838
+ "nextAction",
839
+ "errcode",
840
+ "platformErrcode",
841
+ "reason",
842
+ "citation",
843
+ "detail",
844
+ "diagnostic",
845
+ "environmentFingerprint",
846
+ // 证据面:引用点、校验失败、可用候选、恢复选项、存在性与读回
847
+ "references",
848
+ "validation",
849
+ "issues",
850
+ "available",
851
+ "options",
852
+ "coverage",
853
+ "exists",
854
+ "schemaCode",
855
+ "schemaCodes",
856
+ "readback",
857
+ // 身份键(拒绝回执用它们点名对象;不是结果集)
858
+ "ruleCode",
859
+ "serviceCode",
860
+ "methodCode",
861
+ "serviceMethodCode",
862
+ "fieldCode",
863
+ "propertyCode",
864
+ "schema",
865
+ "code",
866
+ "path",
867
+ // 证据计数与扫描自述(不是「结果有 N 行」的载荷 total/count)
868
+ "referenceCount",
869
+ "referenceCountNote",
870
+ "scanNote",
871
+ "methods",
872
+ "disappearingRefs",
873
+ // 恢复指引
874
+ "doNot",
875
+ "note",
876
+ "retryable",
877
+ "environment",
878
+ "owner",
879
+ "lockOwner",
880
+ "recovery",
881
+ "steps",
882
+ "causes",
883
+ ]);
884
+ /**
885
+ * 拒绝态投影闸门的**唯一真相源**(测试直接引用它钉住键集:新增 evidence 键
886
+ * 必须显式登记,否则会被当成载荷挡掉)。
887
+ */
888
+ export function refusalDiagnosticKeys() {
889
+ return REFUSAL_DIAGNOSTIC_KEYS;
890
+ }
891
+ /**
892
+ * 该路径读的是「拒绝回执怎么说的」而不是「平台数据」。首段是信封键
893
+ * (result./ok.)时看下一段;`--jq result`(整包拒绝回执)本身允许——
894
+ * status/blocker 都在里面,不会被读成成功值。
895
+ */
896
+ export function isRefusalDiagnosticPath(path) {
897
+ const segments = path.replace(/^\$\.?/, "").replace(/^[.\/]+/, "").split(/[.\/[]/).filter(Boolean);
898
+ const head = segments[0] === "result" || segments[0] === "ok" ? segments[1] : segments[0];
899
+ if (head === undefined)
900
+ return true;
901
+ return REFUSAL_DIAGNOSTIC_KEYS.has(head);
902
+ }
903
+ /**
904
+ * F7(0.8.17 真机 P1)配套:单路径命中 null 时,若源回执用 `<key>Omitted:true`
905
+ * 显式声明「这段正文已外置」,把这句话带进回执——否则 `--jq models` 回
906
+ * `result:null`,与「真的没有模型」同形(discover_environment 缓存命中就是
907
+ * models:null + modelsOmitted:true)。只给提示,不改值:投影仍是纯投影。
908
+ *
909
+ * 复核修正(0.8.17):这里**不能**引用本回执里的 tablesHint/fetch/artifactId——
910
+ * `detailFile → detailArtifactId` 的替换发生在投影之后,`--jq` 面拿不到它们。
911
+ * 只给一定能执行的下一步:去掉 --jq 重取同一条命令。
912
+ */
913
+ function omittedNullHint(path, source) {
914
+ if (source === null || typeof source !== "object" || Array.isArray(source))
915
+ return undefined;
916
+ const head = path.replace(/^\$\.?/, "").replace(/^[.\/]+/, "").split(/[.\/[]/).filter(Boolean)[0];
917
+ if (head === undefined)
918
+ return undefined;
919
+ const record = source;
920
+ if (record[head] !== null || record[`${head}Omitted`] !== true)
921
+ return undefined;
922
+ return `「${head}」本次为 null 且 ${head}Omitted:true——是「正文已外置」的声明,不是空表(空表是 [])。去掉 --jq 重取同一条命令:未投影回执里有 tablesHint / fetch(含取回该段正文的命令);别把 null 读成「没有数据」。`;
923
+ }
823
924
  export function projectResultExtract(result, paths, keysOnly, retry, explain = false) {
824
925
  const artifactId = typeof result.detailArtifactId === "string" ? result.detailArtifactId : typeof result.artifactId === "string" ? result.artifactId : undefined;
825
926
  // Tools hand an in-process artifact as `detailFile` (a local path);
@@ -857,6 +958,11 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
857
958
  // exist on the result but would silently resolve to a wrong-shaped value on
858
959
  // the artifact (or miss entirely). Never fall back to "parent object".
859
960
  const projectionSource = source;
961
+ // F8:拒绝态非诊断路径一律不投影(见 REFUSAL_DIAGNOSTIC_KEYS)。放在 artifact
962
+ // 合流之后:无论值来自回执还是外置正文,拒绝态的载荷字段都不是答案。
963
+ const refusalSuppressedPaths = result.status === "refused"
964
+ ? new Set(paths.filter((path) => !isRefusalDiagnosticPath(path)))
965
+ : undefined;
860
966
  const out = {
861
967
  status: result.status ?? "ok",
862
968
  ...(artifactId !== undefined ? { artifactId, sha256: artifact?.sha256 } : {}),
@@ -865,10 +971,15 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
865
971
  // 投影只改变取值路径,不改变源结果的完整性事实。尤其是外置 artifact
866
972
  // 场景,调用方仍必须能判断 items 是否被折叠,以及源侧 total/itemsCount。
867
973
  // 只透传源中实际存在的键;未截断结果不要凭空写 truncated:false。
974
+ // 拒绝态例外:total/itemsCount 是拒绝回执的默认 0——透传出去 `--jq total`
975
+ // 又变回「0 行」,与「存在但 0 行」同形(F8)。诊断路径也不透传:它们读的是
976
+ // 拒绝事实,不是结果集规模。
868
977
  const sourceRecord = source && typeof source === "object" && !Array.isArray(source)
869
978
  ? source
870
979
  : undefined;
871
980
  for (const key of ["truncated", "truncatedKeys", "itemsCount", "total"]) {
981
+ if (result.status === "refused" && (key === "total" || key === "itemsCount"))
982
+ continue;
872
983
  if (sourceRecord !== undefined && Object.prototype.hasOwnProperty.call(sourceRecord, key))
873
984
  out[key] = sourceRecord[key];
874
985
  }
@@ -952,6 +1063,21 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
952
1063
  return Buffer.byteLength(JSON.stringify(candidate), "utf8") <= 300 ? { nextCommand: fullFace.nextCommand } : {};
953
1064
  };
954
1065
  out.extract = paths.map((path) => {
1066
+ // F8:拒绝态下载荷字段不是值——回拒绝摘要而不是默认 0/[]/null。
1067
+ // 键本身不存在(`--jq blokcer`)时不吞成拒绝摘要:落回正常 pathMiss,
1068
+ // 保留 didYouMean / correctPath 的自愈提示。
1069
+ if (refusalSuppressedPaths?.has(path) === true && !projectPathOnSource(projectionSource, path).projected.missed) {
1070
+ const blocker = typeof result.blocker === "string" ? result.blocker : "refused";
1071
+ return {
1072
+ path,
1073
+ content: null,
1074
+ refused: true,
1075
+ blocker,
1076
+ ...(typeof result.message === "string" ? { message: result.message } : {}),
1077
+ ...(typeof result.nextCommand === "string" ? { nextCommand: result.nextCommand } : {}),
1078
+ hint: `本次调用被拒绝(${blocker}):「${path}」是拒绝回执的默认字段,不代表「有 0 条 / 空列表」。诊断值用 --jq blocker / message / nextCommand。`,
1079
+ };
1080
+ }
955
1081
  // r28f F2:对象构造 / 函数调用不是 pathMiss——先识别,别伪装成键缺失。
956
1082
  const unsupported = detectUnsupportedJqSyntax(path);
957
1083
  if (unsupported !== undefined) {
@@ -1058,11 +1184,14 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
1058
1184
  : compactMissExtra(path, single.at, baseMiss, fullFace)),
1059
1185
  };
1060
1186
  }
1187
+ const singleValue = single.value ?? null;
1188
+ const nullHint = singleValue === null ? omittedNullHint(path, projectionSource) : undefined;
1061
1189
  return {
1062
1190
  path,
1063
- content: single.value ?? null,
1191
+ content: singleValue,
1064
1192
  ...(autoStripped !== undefined ? { autoStripped } : {}),
1065
1193
  ...(preferResult ? { from: "result" } : {}),
1194
+ ...(nullHint !== undefined ? { hint: nullHint } : {}),
1066
1195
  };
1067
1196
  });
1068
1197
  // r30a F21 / r31c F7: single path keeps top-level `content`. Multi-path used
@@ -1072,12 +1201,14 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
1072
1201
  // projections so two columns align without a second round trip.
1073
1202
  const extracts = out.extract;
1074
1203
  if (paths.length === 1) {
1075
- out.content = extracts[0]?.content ?? null;
1204
+ // 拒绝态条目不是值——不写顶层 content(否则 `content:null` 又成了「值就是 null」)。
1205
+ if (extracts[0]?.refused !== true)
1206
+ out.content = extracts[0]?.content ?? null;
1076
1207
  }
1077
1208
  else {
1078
1209
  const columns = extracts.map((entry) => ({
1079
1210
  path: entry.path,
1080
- values: entry.pathMiss === true || entry.unsupportedSyntax === true
1211
+ values: entry.pathMiss === true || entry.unsupportedSyntax === true || entry.refused === true
1081
1212
  ? []
1082
1213
  : Array.isArray(entry.content)
1083
1214
  ? entry.content
@@ -1114,6 +1245,21 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
1114
1245
  out.hint = `${RESULT_RELATIVE_PATH_NOTE}逐条定位见 extract[](或 rows[] 列对齐);语法教程:${PATH_MISS_HELP_REF}。`;
1115
1246
  }
1116
1247
  }
1248
+ // F8:拒绝态的结论与排查载荷原样保留(不论本路径是否被挡下)——`--jq blocker`
1249
+ // 的信封 error 也要是**这条**拒绝,不是笼统的 "operation refused"。
1250
+ if (result.status === "refused" && paths.length > 0) {
1251
+ if (typeof result.blocker === "string")
1252
+ out.blocker = result.blocker;
1253
+ if (typeof result.message === "string")
1254
+ out.message = result.message;
1255
+ if (typeof result.nextCommand === "string")
1256
+ out.nextCommand = result.nextCommand;
1257
+ // 只有被挡下的载荷路径才是「没回答」;诊断路径(blocker 等)是回答了。
1258
+ if (extracts.some((entry) => entry.refused === true)) {
1259
+ out.unanswered = true;
1260
+ out.hint = `拒绝态不投影载荷字段:本次调用被拒绝(${String(out.blocker)}),被挡下的路径读到的是拒绝回执的默认值(0 / [] / null),与「有 0 条」同形。排查用 --jq blocker / message / nextCommand;要数据先解除拒绝。`;
1261
+ }
1262
+ }
1117
1263
  }
1118
1264
  return out;
1119
1265
  }
@@ -1124,7 +1270,8 @@ export function unwrapSinglePathProjection(projected) {
1124
1270
  if (!Array.isArray(extracts) || extracts.length !== 1)
1125
1271
  return undefined;
1126
1272
  const entry = extracts[0];
1127
- if (entry.pathMiss === true || entry.unsupportedSyntax === true)
1273
+ // refused:拒绝摘要不是值,不能解包成 `result:<默认值>`。
1274
+ if (entry.pathMiss === true || entry.unsupportedSyntax === true || entry.refused === true)
1128
1275
  return undefined;
1129
1276
  const resultMeta = { path: entry.path };
1130
1277
  for (const key of SINGLE_PATH_META_KEYS) {
@@ -37,6 +37,44 @@ const submitCrossFieldCheck = Object.freeze({
37
37
  ],
38
38
  requiresEnvironmentDerivedIds: false,
39
39
  });
40
+ const submitFieldVsConstant = Object.freeze({
41
+ id: "submit-field-vs-constant",
42
+ aliases: ["金额必须大于0", "提交校验 常量比较"],
43
+ title: "提交校验最小例:字段 vs 常量(dataRuleType:1 + checkType:2)——checkType:2=提交校验、dataRuleType:1=校验类;右值 valueType:\"custom\" 是 JSON 值对象(平台也接受裸字面量)",
44
+ status: "offline-valid",
45
+ tool: "datarule.create",
46
+ args: {
47
+ environment,
48
+ schemaCode: model,
49
+ propertyCode: "amount",
50
+ dataRuleType: 1,
51
+ checkType: 2,
52
+ name: "金额必须大于 0",
53
+ options: {
54
+ conditions: '{amount} 大于 {"valueType":"custom","value":0}',
55
+ prompt: "金额必须大于 0",
56
+ },
57
+ },
58
+ preconditions: [
59
+ "目标字段(示例 `amount`)已发布。",
60
+ "**判型一句话**:`dataRuleType:1` 是校验类规则,`checkType:2` 是其中的提交校验;两者一起才是「提交时按条件校验」。",
61
+ ],
62
+ conditionalRequirements: [
63
+ '**右值 `{"valueType":"custom","value":0}` 是 JSON 值对象**;平台也接受裸字面量(如 `{qty} 大于 100`)。只有跨字段比较才用 `{"valueType":"currentModel","value":"<字段code>"}`。',
64
+ "条件串是 `{字段code} 操作符 右值` 三段单空格(中文操作符优先,如 大于/大于等于/等于);多条件用 ` && `、多组用 ` || `。",
65
+ "`prompt` 存纯文本(门户原样显示,URL 编码会弹 %E5.. 乱码)。",
66
+ "执行面:该规则默认只在门户表单提交时由前端执行,CLI `data.submit` 对非空值不跑条件校验——配置面用 `datarule.list` 核对,行为在门户点验。",
67
+ ],
68
+ priorToolReferences: [{ tool: "field.list", args: { environment, schemaCode: model, published: true }, purpose: "确认目标字段已发布" }],
69
+ dryRun: { supported: true, command: `omc call datarule.create --env ${environment} --dry-run --args '<recipe.args>'`, notes: "dry-run 过条件协议校验(裸右值/prompt 编码当场拒),零 wire" },
70
+ expectedReadback: { performed: { errcode: 0 }, readback: { dataRuleType: 1, checkType: 2, rulePresent: true } },
71
+ refusalRecovery: [
72
+ { code: "datarule-submit-prompt-encoded", action: "prompt 存纯文本,别 URL 编码" },
73
+ { code: "datarule-options-invalid", action: `复制 recipe 的三段条件串;常量右值用 {"valueType":"custom","value":<值>},跨字段才用 currentModel` },
74
+ ...commonRecovery,
75
+ ],
76
+ requiresEnvironmentDerivedIds: false,
77
+ });
40
78
  const dataruleCalcRule = Object.freeze({
41
79
  id: "field-compute-rule",
42
80
  title: "字段计算规则:普通字段 + 计算规则(type2,勿用「计算公式」字段类型)",
@@ -218,6 +256,6 @@ const dataruleDisplay = Object.freeze({
218
256
  requiresEnvironmentDerivedIds: false,
219
257
  });
220
258
  export const DATARULE_METADATA = Object.freeze({
221
- "datarule.create": Object.freeze({ recipes: [submitCrossFieldCheck, dataruleCalcRule, dataruleSubtableSum, dataruleChildColumn, dataruleRequired, dataruleReadonly, dataruleDisplay], relatedTools: ["field.list", "datarule.list"] }),
259
+ "datarule.create": Object.freeze({ recipes: [submitFieldVsConstant, submitCrossFieldCheck, dataruleCalcRule, dataruleSubtableSum, dataruleChildColumn, dataruleRequired, dataruleReadonly, dataruleDisplay], relatedTools: ["field.list", "datarule.list"] }),
222
260
  });
223
261
  //# sourceMappingURL=datarule.js.map
@@ -41,7 +41,44 @@ const listViewConfigure = Object.freeze({
41
41
  ],
42
42
  requiresEnvironmentDerivedIds: false,
43
43
  });
44
+ /**
45
+ * F11(0.8.18 探针 L):`describe listview.configure --param conditions` 只回 schema,
46
+ * 没有可抄的最小行。单独给一条配方,形状与 sorts 的 `configure-default-list` 对齐;
47
+ * conditions 是整体替换,省略 fieldCodes 即「只改条件、不动列」。
48
+ */
49
+ const configureConditions = Object.freeze({
50
+ id: "configure-conditions",
51
+ title: "配置视图固定条件(最小行:propertyCode/filterType/defaultValue/displayType)",
52
+ status: "requires-prior-readback",
53
+ tool: "listview.configure",
54
+ args: {
55
+ environment,
56
+ schemaCode: model,
57
+ conditions: [{ propertyCode: "<propertyCode>", filterType: "Eq", defaultValue: "<value>", displayType: "INPUT" }],
58
+ },
59
+ preconditions: [
60
+ "字段已 field.publish;conditions 是整体替换(省略该参数 = 不改条件)",
61
+ "视图固定条件只在门户运行面生效:REST data.list --queryCode 不应用,验收看 listview.get 回读的 conditions",
62
+ ],
63
+ conditionalRequirements: [
64
+ "filterType 是 QueryFilterType 字符串枚举(Eq/Gte/Lte/Like…,省略时按 propertyType 取平台默认);displayType 是 INPUT/RADIO/CHECKBOX/SELECT/RANGE。",
65
+ "只想加条件不要重发列:省略 fieldCodes 即不动列;要精确列集合另配 replaceColumns+hideDefaultSystemFields。",
66
+ "2.1.5 树视图条件行需原样带回 treeLimitScopeType/treeLimitConditionGroup/treeDefaultConditionGroup,否则默认拒 listview-tree-conditions-changed。",
67
+ ],
68
+ priorToolReferences: [
69
+ { tool: "listview.get", args: { environment, schemaCode: model, code: model }, purpose: "读回既有 conditions(整体替换,先看基线)" },
70
+ { tool: "field.list", args: { environment, schemaCode: model, published: true }, purpose: "确认 propertyCode 与 propertyType 已发布" },
71
+ ],
72
+ dryRun: { supported: true, command: `omc call listview.configure --env ${environment} --dry-run --args '<recipe.args>'`, notes: "dry-run 预检 conditions 形状与树过滤组门,不写" },
73
+ expectedReadback: { readback: { conditions: [{ propertyCode: "<propertyCode>", filterType: "Eq", defaultValue: "<value>", displayType: "INPUT" }] }, next: ["listview.get 核对 conditionReadback.equivalent", "门户点验运行面过滤(REST 无入口)"] },
74
+ refusalRecovery: [
75
+ { code: "listview-tree-conditions-would-be-lost", action: "提交行缺 treeLimitScopeType/treeLimitConditionGroup/treeDefaultConditionGroup:原样带回基线三键后重试" },
76
+ { code: "listview-tree-conditions-changed", action: "确认要改写树过滤组才传 allowTreeConditionChange:true;否则照抄基线值" },
77
+ ...commonRecovery,
78
+ ],
79
+ requiresEnvironmentDerivedIds: false,
80
+ });
44
81
  export const LISTVIEW_METADATA = Object.freeze({
45
- "listview.configure": Object.freeze({ recipes: [listViewConfigure], relatedTools: ["listview.list", "listview.get", "field.list", "field.publish"] }),
82
+ "listview.configure": Object.freeze({ recipes: [listViewConfigure, configureConditions], relatedTools: ["listview.list", "listview.get", "field.list", "field.publish"] }),
46
83
  });
47
84
  //# sourceMappingURL=list-view.js.map
package/dist/residue.js CHANGED
@@ -9,6 +9,10 @@ import { emitInvalid, emitResult } from "./command-transport.js";
9
9
  import { projectResultExtract } from "./path-projection.js";
10
10
  const MAX_ITEMS = 20;
11
11
  const SYSTEM_RULE_NAMES = new Set(["Available", "Cancel", "Create", "Delete", "GetList", "Load", "Update"]);
12
+ /** 未扫描面的补扫入口(探针 L F9:命令必须是真实存在、可复制执行的)。 */
13
+ const UNSCANNED_FACE_CHECKS = [
14
+ { face: "report", command: `omc call report.tree --args '{}'` },
15
+ ];
12
16
  function residueOrigin(row, faceName) {
13
17
  if (row.defaultRule === true || row.preset === true || row.system === true || row.systemPreset === true)
14
18
  return "system-preset";
@@ -116,10 +120,13 @@ export async function scanResidues(session, prefix, options = {}) {
116
120
  faces.push({ face: "report", count: -1, items: [], note: "not-scanned——报表残留判定用 report.tree(树)+ report.get(BI 残留看 readback.biResidue)" });
117
121
  }
118
122
  const compact = options.allFaces === true ? faces : nonZeroFaces;
119
- // 探针 J F9:report 面至今没有扫描入口(platform/lane 都只有清单读),
120
- // 所以每次 residue 都存在未扫描面。将来接上 report 扫描时移除这一项即可
121
- // ——三个键按 unscannedFaces 是否为空成组出现。
122
- const unscannedFaces = ["report"];
123
+ // 探针 J F9 + 探针 L F9:report 面至今没有扫描入口(platform/lane 都只有清单读),
124
+ // 所以每次 residue 都存在未扫描面,complete 恒为 false。**不要**引入「调用方声明
125
+ // 已核对」的 bypass——没有实际扫描就没有覆盖面证据;等接上 report 扫描入口、
126
+ // 真正扫过之后再让 complete 变 true。
127
+ const unscanned = UNSCANNED_FACE_CHECKS;
128
+ const unscannedFaces = unscanned.map((check) => check.face);
129
+ const complete = unscannedFaces.length === 0;
123
130
  return {
124
131
  prefix,
125
132
  faces: compact,
@@ -131,20 +138,28 @@ export async function scanResidues(session, prefix, options = {}) {
131
138
  // coverage 逐面标注,未扫面不得读作「零残留」。
132
139
  clean: userResidues === 0 && !pendingCascade,
133
140
  cleanWithinScannedFaces: userResidues === 0 && !pendingCascade,
141
+ // 探针 L F9:clean 的覆盖面结论单独出键。clean 语义不变(不改成 false),
142
+ // 但 complete:false 明说「这次扫描没覆盖全部面」,读者不能只看 clean。
143
+ complete,
134
144
  // r70 探针01-F7:真残留存在时顶层 clean:true 仍误导(coverage 在深处,首屏只看
135
145
  // clean)——caveat 常驻顶层,紧贴 clean 键。
136
146
  cleanCaveat: "clean 仅指已扫描面(scanned faces only);report 面未扫描(报表资源残留用 report.tree + report.get 判)",
137
- ...(unscannedFaces.length > 0
147
+ ...(unscanned.length > 0
138
148
  ? {
139
149
  cleanScope: "scanned-faces",
140
150
  unscannedFaces,
141
- reportCheckCommand: `omc call report.tree --args '{}'`,
151
+ ...(unscanned.some((check) => check.face === "report")
152
+ ? { reportCheckCommand: unscanned.find((check) => check.face === "report").command }
153
+ : {}),
154
+ mandatoryChecks: unscanned,
142
155
  }
143
156
  : {}),
144
157
  coverage: { report: "not-scanned(用 report.tree + report.get 判,BI 残留看 readback.biResidue)", workflow: "模板跟模型走(模型删即删)" },
145
158
  ...(systemPresetCount > 0 ? { systemPresetCount } : {}),
146
159
  ...(pendingCascade ? { pendingCascade: true } : {}),
147
- note: pendingCascade ? "scanned faces only——模型已不存在但仍有级联面命中:平台删除为异步任务、时长不定,稍后重跑,幂等" : "scanned faces only——clean 仅指已扫描面;report 面未扫描——报表残留判定用 report.tree(树)+ report.get(BI 残留看 biResidue)",
160
+ note: pendingCascade
161
+ ? "scanned faces only——模型已不存在但仍有级联面命中:平台删除为异步任务、时长不定,稍后重跑,幂等"
162
+ : "scanned faces only;report 面需另行核对——clean 仅指已扫描面,全局零残留看 complete + mandatoryChecks",
148
163
  };
149
164
  }
150
165
  export async function cmdResidue(prefix, options, transport) {
@@ -67,6 +67,8 @@ const KEY_RULES = Object.freeze({
67
67
  subFields: { cls: "user", source: "子表列清单是需求本体", user: "utterance" },
68
68
  formData: { cls: "user", source: "业务数据载荷是需求本体", user: "utterance" },
69
69
  filter: { cls: "user", source: "查询语义(op/字段/值)是需求本体", user: "utterance" },
70
+ // 0.8.18(探针 L F11):listview.configure 的固定条件行(propertyCode/filterType/defaultValue/displayType)。
71
+ conditions: { cls: "user", source: "视图固定筛选条件是需求本体(列候选由 field.list 给,判定/取值由需求给)", user: "utterance" },
70
72
  records: { cls: "user", source: "字典键值对是需求本体", user: "utterance" },
71
73
  source: { cls: "user", source: "在线 JS 源码是需求本体", user: "utterance" },
72
74
  template: { cls: "user", source: "流程拓扑(节点/连线/参与人/条件)是需求本体", user: "utterance" },
package/dist/wire.js CHANGED
@@ -278,7 +278,17 @@ function invalidateReadCache(session, call) {
278
278
  ENDPOINTS.dataRuleDelete,
279
279
  ]);
280
280
  const path = call.path;
281
- if (fieldPaths.includes(path)) {
281
+ if (path === ENDPOINTS.fieldPublish) {
282
+ // 模型级发布把**子表 schema 的列**一起送上发布面(2.1.5/8.6.26
283
+ // `BizPropertyManagerImpl.getPublishedPropertyList` 按父模型粒度物化,
284
+ // 真机 PLAIN 回执 `resolvedFromChildSchemas` 为证),但 POST body 只带父模型
285
+ // code——按 code 收窄失效会留下子 schema 的旧行面,同一进程里紧接的
286
+ // field.get/发布读回读到发布前快照(published:false,探针 L F1 的同族假值)。
287
+ // 发布是低频写,字段面整面清掉(其它模型只是多一次读,不会读错)。
288
+ dropAll([ENDPOINTS.fieldList]);
289
+ dropSchemaScoped([ENDPOINTS.sheetGet], schemaCodesFromBody(call.body));
290
+ }
291
+ else if (fieldPaths.includes(path)) {
282
292
  // Field writes change the field faces; sheet metadata is dropped for the
283
293
  // same schema as a conservative guard.
284
294
  dropSchemaScoped([ENDPOINTS.fieldList, ENDPOINTS.sheetGet], schemaCodesFromBody(call.body));
package/dist/write.js CHANGED
@@ -472,7 +472,7 @@ function findCompleted(root, requestId, tool, environment, requestFingerprint) {
472
472
  }
473
473
  /** Low-level write registration factory: shared by every lane adapter. */
474
474
  export function writeTool(definition) {
475
- const { tools, name, lane, scope, description, inputSchema, search, execute, preflight, dryRunPayload, writeLint, rollback, readOnlyEscape } = definition;
475
+ const { tools, name, lane, scope, description, inputSchema, search, nestedParamHints, execute, preflight, dryRunPayload, writeLint, rollback, readOnlyEscape } = definition;
476
476
  const rawExecute = execute;
477
477
  // R75-B:未显式声明时按实际能力推导——有 session 只读 lint(writeLint 或
478
478
  // dryRunPayload)→ partial;两者都没有 → plan(dry-run 只回 plan,最容易被
@@ -559,6 +559,7 @@ export function writeTool(definition) {
559
559
  scope,
560
560
  description: `${description} ${WRITE_PROTOCOL}`,
561
561
  ...(search === undefined ? {} : { search }),
562
+ ...(nestedParamHints === undefined ? {} : { nestedParamHints }),
562
563
  inputSchema: { environment: environmentArg, capability: capabilityArg, confirmProduction: confirmProductionArg, requestId: z.string().min(1).optional(), dryRun: z.boolean().optional(), ...inputSchema },
563
564
  handler: async (ctx, args, self) => {
564
565
  semanticGate(args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.8.16",
3
+ "version": "0.8.18",
4
4
  "description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "commander": "14.0.3",
61
- "omc-core": "0.8.16",
61
+ "omc-core": "0.8.18",
62
62
  "proper-lockfile": "4.1.2",
63
63
  "write-file-atomic": "6.0.0",
64
64
  "zod": "^3.23.8",
@@ -76,6 +76,6 @@
76
76
  "directory": "packages/omc-cli"
77
77
  },
78
78
  "optionalDependencies": {
79
- "@stalfh233/omc-fake-platform": "0.8.16"
79
+ "@stalfh233/omc-fake-platform": "0.8.18"
80
80
  }
81
81
  }
@@ -114,7 +114,7 @@ only the section for the capability you need —
114
114
  - **recipe**:`omc describe configure_form --example publish-default-form`
115
115
  - **边界 / 陷阱**:默认表单已存在,用 `configure_form`/`form.draft(rebuild)`/`form.publish(rebuild:true)` 改它,不要新建;改字段形状后刷新表单一调用 `form.publish rebuild:true`。
116
116
  - **每个模型交付前其默认表单必须已发布**:只建草稿=用户无法录入/查看。用 `configure_form` 或 `form.draft(rebuild:true)`+`form.publish` 发布。
117
- - **发布态以 `form.get` 的 `published`/`existDraft` 布尔为准**,不要看 `publishedControlCodes` 是否非空(草稿字段也非空,会误判)。交付前列出每个模型的 `form.get.published` 核对。
117
+ - **`form.get` 的 `published`/`existDraft` 是内容面结论**(`platformFlags` 才是平台 `bizsheet/get` 的原始标记位);`form.list` 的 `published` 仍是平台旗标,两者语义不同——判发布面内容用 `form.get`,不要用 `form.list` 旗标或 `publishedControlCodes` 是否非空。交付前列出每个模型的 `form.get.published` 核对。
118
118
  - **写业务数据的前提是先发布模型+表单**:正确顺序 = 建模型 → 发布字段(`field.publish`)→ 建并**发布**默认表单(`form.publish`)→ 才 `data.save`/`data.submit`。不要在建/未发布状态下写业务数据。
119
119
  - **表单按钮**:`form.publish {buttons:[…]}` 写 `options.customButtonJson` 并生成 `h_biz_button(triggerType=FORM)`;表单页显示还取决于流程节点 `buttonPermission.customBtns[].enabled`(设计器「表单操作」勾选)。执行用 `form.runButton`(带整条记录,区别于列表按钮的 `rule.run`)。
120
120
 
@@ -12,7 +12,7 @@ be treated as a second source. Read this, then follow the topics it names.
12
12
 
13
13
  ## 最小路径(先读这段就能开始)
14
14
 
15
- 0. **调用与检索(跨平台)**:`omc call ... --args '<json>'` 的内联 JSON 在 Windows PowerShell 下因引号转义不可靠——**PS 环境优先 `--args-file <path>`**(把 JSON 写临时文件再引用;解析失败的报错里也有此提示)。长 JSON、含引号或中文换行的负载统一可走 stdin:`echo '<json>' | omc call <tool> --args -`;`--args-file <path>` 则必须位于项目配置根内。读命令输出默认把中文转义为 `\uXXXX`(防乱码)——**这是有意为之**:stdout 恒为「恰好一个合法 JSON envelope」,在任何代码页下都能被 `JSON.parse`/`ConvertFrom-Json` 还原(GitLab #17 T2 实证:曾让 `--utf8` 关掉转义,GBK 管道把信封结构解码坏、`ConvertFrom-Json` 中途失败)。`--utf8` 只让**人类诊断文本**(stderr/散文)按 UTF-8 原文输出;要连 stdout 也是中文明文,必须先让管道按 UTF-8 解码(`chcp 65001`)——只设 `OMC_ASCII_STDOUT=0` 是关写出端转义、不改管道解码,在 cp936 管道下会把信封解码坏。对输出做内容检索时**先解 JSON 再检索**(或 `--jq` 取值),"grep 搜不到中文"≠"没有配置"(静默假阴性坑)。stdout 恒为纯 JSON、人读进度在 stderr——脚本解析勿 `2>&1` 合流。
15
+ 0. **调用与检索(跨平台)**:`omc call ... --args '<json>'` 的内联 JSON 在 Windows PowerShell 下因引号转义不可靠——**PS 环境优先 `--args-file <path>`**(把 JSON 写临时文件再引用;解析失败的报错里也有此提示)。长 JSON、含引号或中文换行的负载统一可走 stdin:`echo '<json>' | omc call <tool> --args -`;`--args-file <path>` 则必须位于项目配置根内(worktree 下回退主检出);`model-scaffold`/`field-add` 的 `--fields-file` 必须位于 `$OMC_CONFIG_HOME` 或当前工作目录(根外一律拒绝),这两条命令免落盘用 `--fields -` 从 stdin 读。读命令输出默认把中文转义为 `\uXXXX`(防乱码)——**这是有意为之**:stdout 恒为「恰好一个合法 JSON envelope」,在任何代码页下都能被 `JSON.parse`/`ConvertFrom-Json` 还原(GitLab #17 T2 实证:曾让 `--utf8` 关掉转义,GBK 管道把信封结构解码坏、`ConvertFrom-Json` 中途失败)。`--utf8` 只让**人类诊断文本**(stderr/散文)按 UTF-8 原文输出;要连 stdout 也是中文明文,必须先让管道按 UTF-8 解码(`chcp 65001`)——只设 `OMC_ASCII_STDOUT=0` 是关写出端转义、不改管道解码,在 cp936 管道下会把信封解码坏。对输出做内容检索时**先解 JSON 再检索**(或 `--jq` 取值),"grep 搜不到中文"≠"没有配置"(静默假阴性坑)。stdout 恒为纯 JSON、人读进度在 stderr——脚本解析勿 `2>&1` 合流。
16
16
 
17
17
  0. **拼装器优先(高频写面一条命令)**:整模型建模(模型+N 字段+子表+发布+表单)`omc model-scaffold`;**存量模型加字段(建→发布→重建表单→列表加列)`omc field-add`**;字段计算 `omc compute`;条件→动作 `omc rule-when`;线性审批流 `omc approval-flow`;表单默认值 `omc form-default`;存量盘点 `data.list all:true`;收尾清理 `omc model-purge --code <schema>`(依赖倒序,默认 dry-run)+ `omc residue <prefix>` 证删净——命中这些形态先看 `--help`,比 recipe 手拼省 10+ 轮。
18
18