@stalfh233/omc-cli 0.8.31 → 0.8.32

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
@@ -3362,6 +3362,7 @@ function onboardingHelp() {
3362
3362
  "读面不做跨调用结果去重:同一读面同参数连跑 N 次就是 N 次真实读(不会回 unchanged,也没有 dedupe 开关)。要省就 --jq 定向取值或把结果落到自己的变量里复用;`unchanged:true` 只出现在写面回读缓存那一条路径。",
3363
3363
  "工具发现:omc commands(路由索引)→ omc commands --capability <id>(工具名+brief+recipe)→ omc describe <tool>(参数/必填/firstCall)→ --example/--full;omc commands --json 是全量目录(回退面)。能力面:omc capabilities(id+工具数)· omc capabilities --full(id/lane/aliases/tools/依赖顺序)· omc capability <id> --executable(单能力完整执行包)。应用参数矩阵:omc help app-scope。",
3364
3364
  "单工具/契约:omc describe <tool>(schema+recipe+能力路由)· omc contract <lane>(wire 契约+能力路由);环境就绪:omc call discover_environment --env <env> --args '{}'。",
3365
+ "环境选择:解析序 --env > OMC_ENV > .omc-env > 默认。可见环境≥2 时,写操作或目标是生产 → 先问用户选哪个,不要猜;只读且未绑定时也先确认。单环境可省 --env。",
3365
3366
  "写入两道门:对话层草稿确认(omc help omc-config-draft-review)+ 环境 writable 开关;生产环境每笔写需在 args 里带 confirmProduction:true。",
3366
3367
  ].join("\n");
3367
3368
  }
@@ -3842,8 +3843,14 @@ async function main() {
3842
3843
  const configRoot = dirname(paths.configPath);
3843
3844
  const projectRoot = dirname(paths.projectEnvPath);
3844
3845
  const binding = { configRoot, projectRoot, bindingFiles: { ".omc-env": paths.projectEnvPath, ".omc-envs": paths.projectEnvsPath }, note: "环境集合由「项目根」的 .omc-env/.omc-envs + 配置根的 omc.config.json 共同决定;换目录会换集合" };
3846
+ // 2026-12-01:可见环境 ≥2 时必须显式说「该问用户」——CLI 不交互提问
3847
+ // (stdout 单 JSON / 非 TTY / stdin 契约),选择责任在 agent。
3848
+ // 只有一个可见环境时输出逐字节不变。
3849
+ const selectionHint = rows.length > 1
3850
+ ? `可见环境 ${rows.length} 个:写操作、或目标是生产 → 先问用户选哪个;只读且未绑定时也先确认。可用 --env 显式指定。`
3851
+ : undefined;
3845
3852
  if (options.json)
3846
- process.stdout.write(JSON.stringify({ ok: true, configRoot, projectRoot, environments: rows, binding, ...(scopeNote ?? {}) }, null, 2) + "\n");
3853
+ process.stdout.write(JSON.stringify({ ok: true, configRoot, projectRoot, environments: rows, binding, ...(selectionHint !== undefined ? { selectionHint } : {}), ...(scopeNote ?? {}) }, null, 2) + "\n");
3847
3854
  else if (rows.length === 0)
3848
3855
  console.error(`(none configured; run omc setup)\n配置根:${configRoot}\n项目根:${projectRoot}`);
3849
3856
  // A5(GitLab #15):credential: missing 的环境列得出、调不通(auth-config)——
@@ -3856,6 +3863,8 @@ async function main() {
3856
3863
  // 700+ 字符坏 3 次——正道 `env export` 在所有 skill/文档里零露出。列环境时顺手
3857
3864
  // 指路(CLI 自更新直达存量项目,比 AGENTS.md 重装传播可靠)。
3858
3865
  console.error(`联调/token/headers 一律走 omc env export --env <env> --example curl|node(CLI 自己登录;凭据只从这条取)`);
3866
+ if (selectionHint !== undefined)
3867
+ console.error(selectionHint);
3859
3868
  if (scopeNote !== undefined)
3860
3869
  console.error(scopeNote.hint);
3861
3870
  }
package/dist/field-add.js CHANGED
@@ -185,7 +185,8 @@ export async function cmdFieldAdd(args, contextForTest) {
185
185
  inputJson = readFileSync(assertSafeInputPath(root, fieldsFile, "--fields-file"), "utf8");
186
186
  }
187
187
  catch (error) {
188
- return invalid(`--fields-file 读取失败:${error instanceof Error ? error.message : String(error)}${/must be inside the configuration root/.test(error instanceof Error ? error.message : String(error)) ? "。把参数文件放到配置根内(如配置根/args.json)再用 --fields-file 引用;不想落盘可直接用 stdin:--fields - < <文件>" : ""}`);
188
+ // F1(0.8.32):与 --args-file / model-scaffold 同语气——先给 stdin。
189
+ return invalid(`--fields-file 读取失败:${error instanceof Error ? error.message : String(error)}${/must be inside the configuration root/.test(error instanceof Error ? error.message : String(error)) ? "。免落盘替代:`--fields -` 从 stdin 读 JSON(--fields - < <文件>);或把参数文件放到配置根内(如配置根/args.json)再用 --fields-file 引用" : ""}`);
189
190
  }
190
191
  }
191
192
  if (inputJson === undefined)
@@ -1356,15 +1356,17 @@ export async function childColumnsMissingFromForm(session, args) {
1356
1356
  return missing;
1357
1357
  }
1358
1358
  /** 发布面缺子表列时的一句诊断(write 与 dry-run 同一句)。 */
1359
- export const CHILD_COLUMNS_NOT_IN_FORM_NOTE = "子表字段已发布,但表单 Sheet201 控件的 columns 里没有它——业务页面看不到(发布照常成功,不等于可见)。用 configure_form 的 childColumns 增量绑定(不动其它控件/布局)后重跑发布";
1359
+ export const CHILD_COLUMNS_NOT_IN_FORM_NOTE = "子表字段已发布,表单 Sheet201 columns 无此列——页面不可见(成功≠可见)。form.publish 加 bindNewChildColumns:true 一步绑定后发布(不动其它控件/布局);补 fieldCodes/布局才用 configure_form";
1360
1360
  /** 发布面缺子表列时的回执片段(写路径 / already-published 短路 / dry-run 共用一份形状)。 */
1361
1361
  function childColumnsGapReadback(gaps, schemaCode, sheetCode) {
1362
1362
  if (gaps === undefined || gaps.length === 0)
1363
1363
  return {};
1364
+ // F3(0.8.32):form.publish 自己就能一步绑定(bindNewChildColumns:true,与
1365
+ // field.publish 的教学一致),旧 nextCommand 指向 configure_form 的两次调用。
1364
1366
  return {
1365
1367
  childColumnsNotInForm: gaps,
1366
1368
  childColumnsNote: CHILD_COLUMNS_NOT_IN_FORM_NOTE,
1367
- nextCommand: `omc call configure_form --args '${JSON.stringify({ schemaCode, ...(sheetCode !== schemaCode ? { sheetCode } : {}), childColumns: gaps })}'`,
1369
+ nextCommand: `omc call form.publish --args '${JSON.stringify({ schemaCode, ...(sheetCode !== schemaCode ? { sheetCode } : {}), bindNewChildColumns: true })}'`,
1368
1370
  };
1369
1371
  }
1370
1372
  /**
@@ -5,7 +5,7 @@ export { RUNTIME_DATA_WIRE, RUNTIME_QUERY_OPERATORS, ENGINE_OWNED_KEYS, SUBMIT_S
5
5
  import { RUNTIME_DATA_WIRE } from "omc-core/wire-facts";
6
6
  export function dataListDescription() {
7
7
  const wire = RUNTIME_DATA_WIRE;
8
- return `按简化过滤 DSL 查询业务对象(runtime/query/list);DSL 在 CLI 内翻译为平台 queryCondition(${wire.dslShape}),并按发布字段元数据为每个条件注入 propertyType(未知过滤字段将被拒绝,可用 rawCondition 逃生;op 大小写不敏感);响应行在 items[],业务字段在 items[].fields.<code>(不是 rows[],也不是 item 顶层——--jq 常用 items[].fields.sku);空模型返回空列表;列表只投影视图列:**显式选列只能收窄、不能扩列**(视图外 code 进 columnsOutsideView,扩列用 data.load);**已判定未投影的列会从 items[].fields 省略键**(items[].unprojected 点名;不是数据丢失——data.load 有值;有视图列证据时系统列如 sequenceNo 同判;全 null 时 readback 追加 projectionHint,先 listview.configure 配置视图列或用 data.load 读单条)。键缺席=字段不存在或该行已判定未投影(见 items[].unprojected);键在且值 null=真空值(未投影或真空值不再同形;nullSemantics 说明口径)。`;
8
+ return `按简化过滤 DSL 查询业务对象(runtime/query/list);DSL 在 CLI 内翻译为平台 queryCondition(${wire.dslShape}),并按发布字段元数据为每个条件注入 propertyType(未知过滤字段将被拒绝,可用 rawCondition 逃生;op 大小写不敏感);响应行在 items[],业务字段在 items[].fields.<code>(不是 rows[],也不是 item 顶层——--jq 常用 items[].fields.sku);空模型返回空列表;列表只投影视图列:**显式选列只能收窄、不能扩列**(视图外且无值 code 进 columnsOutsideView,扩列用 data.load);**已判定未投影的列会从 items[].fields 省略键**(items[].unprojected 点名;不是数据丢失——data.load 有值;有视图列证据时系统列如 sequenceNo 同判;全 null 时 readback 追加 projectionHint,先 listview.configure 配置视图列或用 data.load 读单条)。键缺席=字段不存在或该行已判定未投影(见 items[].unprojected);键在且值 null=真空值(未投影或真空值不再同形;nullSemantics 说明口径)。`;
9
9
  }
10
10
  export function dataAggregateDescription() {
11
11
  return `临时计数与数值聚合(纯读)。count:runtime/query/list size:1 读 totalElements(服务端精确、不受 cap 影响;带 filter +1 field.list)。sum/avg/min/max:field 必填且已发布 propertyType=2(NUMERICAL);无 GET_LIST 改源时优先 /sum ALL_DATA(coverage.mode=server-aggregate,全量精确),否则/失败/键不符回退本地折叠(strategyFallback;size:200 翻页至 cap 1000,null 不进聚合、avg=sum/非 null 行数,nonNullCount=0→value:null)。complete 看 rowsScanned>=total,否则 missingCount+capNotice,绝不外推。groupBy 单列:count 值域可枚举(options/字典)→值域×count(V+3 wire),分桶并发窗口 4(限流退化 2,见 wire.concurrency),桶序稳定;按 count 降序取 topN(默认 10/上限 20),截断给 truncatedBuckets/bucketsTruncatedCount,null 单列 nullBucket;不可枚举或数值指标→本地扫描(coverage.mode=paged-local-scan/local-scan),数值桶 {key,count,nonNullCount,value} 按 value 降序、并列按 key,null 行进 nullBucket。filter.draftPolicy:count+groupBy 默认 includeDrafts:false 注入 sequenceStatus≠DRAFT;数值指标不默认排除;count 省略=平台默认(无条件含草稿、带条件排草稿);显式 false 强制排除。边界:临时问句用本工具;持久图表/看板用 report.chartdata,视图汇总列用 sumType,写时计算用 datarule type2。子表计数/求和用 child(主表 schemaCode + childSchemaCode/bizObjectId)。`;
@@ -457,8 +457,23 @@ export const DATA_LIST_COLUMNS_NARROWING_NOTE = "只能选视图列;扩列用
457
457
  * 空 `queryColumns` 不参与本判定:那种形状已由 `projectionHint` /
458
458
  * `viewProjectionOnly`(全 null 业务列)覆盖,避免把「fake 默认无视图」误报成
459
459
  * 「超列」。系统列由 completeSystemFields 恒投影,不判。
460
+ *
461
+ * F4b(0.8.32,真机 P2):**任一行该 code 有非 null 值** = 平台确实返回了它,
462
+ * 就不是「视图外」。子表列(CHILD_TABLE)是典型反例:视图 queryColumns 里没有
463
+ * 它,但行数据照常带子表数组(2.1.5 `BizObjectFacadeImpl.java:614` 的
464
+ * `assemblySubTableBizObject` → `SubBizObjectLoader.java:65,71-78` 遍历的是
465
+ * 模型的**全部已发布子表属性**、子列集来自子表 schema,与主表视图列集无关),
466
+ * 旧判据只看 `!view.has(code)` 于是把 `pb_repair_items` 报成「不会返回值」——
467
+ * 与同一行 `items[].fields.pb_repair_items` 的 2 行数据自相矛盾。用现有证据
468
+ * (不额外 wire),只有「无值且不在视图」才点名。
469
+ *
470
+ * 残余边界(未解,别当成已全解):
471
+ * - ① 子表 **0 行**时平台不返回该子表键(无值证据),该 code 仍可能被报
472
+ * 「视图外」——此时「不会返回值」在字面上成立,但不是「列不在视图」的意思。
473
+ * - ② 只看**本次读到的行**:`all:false` 只观测当前页,某 code 可能在别页有值;
474
+ * `all:true` 也只扫到 1000 行上限。跨页有值而本页为 null/缺键时仍可能误报。
460
475
  */
461
- export function columnsOutsideViewOf(requested, viewColumnCodes, projectionMiss) {
476
+ export function columnsOutsideViewOf(requested, viewColumnCodes, projectionMiss, observedNonNullCodes) {
462
477
  if (requested === undefined || requested.length === 0)
463
478
  return [];
464
479
  const view = viewColumnCodes !== undefined && viewColumnCodes.length > 0 ? new Set(viewColumnCodes) : undefined;
@@ -468,11 +483,24 @@ export function columnsOutsideViewOf(requested, viewColumnCodes, projectionMiss)
468
483
  return [...new Set(requested)].filter((code) => {
469
484
  if (code.length === 0 || RUNTIME_SYSTEM_FIELD_CODES.has(code) || code.endsWith("_") || code.endsWith("_key"))
470
485
  return false;
486
+ if (observedNonNullCodes?.has(code) === true)
487
+ return false;
471
488
  if (missed?.has(code) === true)
472
489
  return true;
473
490
  return view !== undefined && !view.has(code);
474
491
  });
475
492
  }
493
+ /** 结果行里真的有非 null 值的 code(columnsOutsideViewOf 的「不是视图外」证据)。 */
494
+ function observedNonNullCodesOf(items) {
495
+ const codes = new Set();
496
+ for (const item of items) {
497
+ for (const [code, value] of Object.entries(item.fields)) {
498
+ if (value !== null && value !== undefined)
499
+ codes.add(code);
500
+ }
501
+ }
502
+ return codes;
503
+ }
476
504
  /**
477
505
  * F10(w63,2026-11-26 真机):DATE 字段读回固定 `YYYY-MM-DD HH:mm:ss`
478
506
  * (0.8.8 只在 describe 写了,探针仍在回执里按 `options.format` 断言而踩)。
@@ -2127,10 +2155,16 @@ export function registerRuntimeDataLane(tools) {
2127
2155
  filters: z.array(z.record(z.string(), z.unknown())).optional().describe("clauses combined with AND; a malformed clause is refused with blocker invalid-filter-DSL"),
2128
2156
  filterGroup: z.record(z.string(), z.unknown()).optional().describe('nested group { op:"and"|"or", clauses:[clause|group] }'),
2129
2157
  rawCondition: z.unknown().optional(),
2130
- displayFields: z.array(z.string().min(1)).optional().describe("列投影(**本地裁剪**:平台只 SELECT 视图 queryColumns,不认 displayFields;**只能收窄不能扩列**,视图外 code 进 columnsOutsideView);与 columns / fields 同义"),
2158
+ displayFields: z.array(z.string().min(1)).optional().describe("列投影(**本地裁剪**:平台只取视图 queryColumns,不认 displayFields;**只能收窄不能扩列**,视图外且无值 code 进 columnsOutsideView)"),
2131
2159
  columns: z.array(z.string().min(1)).optional().describe("列投影别名(=displayFields)"),
2132
2160
  // r29b F9: data.load/save/update 都叫 fields;list 面原先只有 displayFields/columns。
2133
- fields: z.array(z.string().min(1)).optional().describe("列投影别名(=displayFields;与 data.load/data.save/data.update 的 fields 同语义)"),
2161
+ // F4a(0.8.32):旧描述说「与 data.load 的 fields 同语义」是错的——list 的
2162
+ // fields 只做**结果本地收窄**(body 不发 displayFields,见下方 body 构造;
2163
+ // 平台按视图 queryColumns 取列:BizObjectFacadeImpl.java:2216 的 columns =
2164
+ // handleQueryColumn(...),1830-1866 在 display=false 时只取
2165
+ // bizQueryColumnService.getListByQueryId(queryId) 的视图列;这些列再经
2166
+ // BizFilter.java:60-72 变成 SELECT 列表)。真值用 data.load。
2167
+ fields: z.array(z.string().min(1)).optional().describe("=displayFields;只收窄不扩列,视图外且无值 code 进 columnsOutsideView;真值用 data.load"),
2134
2168
  // r73 #4(GitLab #40 P1):只读查询的排序 fallback 首选曾是写操作(listview.configure
2135
2169
  // 会改线上视图、影响所有用户)。顺序反转——本地排序第一,视图级写操作殿后并注明代价。
2136
2170
  // r86(retro issue 16):wire 侧其实有服务端排序(QueryDataVO.orders,真机 1.1.25
@@ -2555,7 +2589,7 @@ export function registerRuntimeDataLane(tools) {
2555
2589
  const unprojectedCodes = unprojectedFieldCodes(itemsFinal);
2556
2590
  const anyNullField = itemsFinal.some((item) => Object.values(item.fields).some((value) => value === null));
2557
2591
  // F5(w63,P1):columns 只能收窄视图列;视图外的 code 点名。
2558
- const columnsOutsideView = columnsOutsideViewOf(fields, viewEvidence?.viewColumnCodes, projectionMissAll);
2592
+ const columnsOutsideView = columnsOutsideViewOf(fields, viewEvidence?.viewColumnCodes, projectionMissAll, observedNonNullCodesOf(items));
2559
2593
  // F10(w63):结果里真有 DATE 形状的值时才读一次元数据确认类型。
2560
2594
  const dateCandidates = [...new Set(itemsFinal.flatMap((item) => dateLikeCodes(item.fields)))];
2561
2595
  let dateReadbackNote;
@@ -2807,7 +2841,7 @@ export function registerRuntimeDataLane(tools) {
2807
2841
  const unprojectedCodes = unprojectedFieldCodes(itemsFinal);
2808
2842
  const anyNullField = itemsFinal.some((item) => Object.values(item.fields).some((value) => value === null));
2809
2843
  // F5(w63,P1):columns 只能收窄视图列;视图外的 code 点名。
2810
- const columnsOutsideView = columnsOutsideViewOf(fields, viewEvidence?.viewColumnCodes, projectionMissPaged);
2844
+ const columnsOutsideView = columnsOutsideViewOf(fields, viewEvidence?.viewColumnCodes, projectionMissPaged, observedNonNullCodesOf(items));
2811
2845
  // F10(w63):结果里真有 DATE 形状的值时才读一次元数据确认类型。
2812
2846
  const dateCandidates = [...new Set(itemsFinal.flatMap((item) => dateLikeCodes(item.fields)))];
2813
2847
  let dateReadbackNote;
@@ -132,7 +132,9 @@ export async function cmdModelScaffold(args) {
132
132
  const detail = error instanceof Error ? error.message : String(error);
133
133
  // F2(0.8.6):越界报错要能直接照做——旧文案只说「必须在配置根内」,
134
134
  // 不给路径。与 --args-file(cli.ts)同配方:给根内示例文件路径。
135
- return invalid(`--fields-file 读取失败:${detail}${/must be inside the configuration root/.test(detail) ? `。把参数文件放到 ${root} 之下(如 ${join(root, "args.json")})再用 --fields-file 引用;不想落盘可直接用 stdin:--fields - < <文件>` : ""}`);
135
+ // F1(0.8.32):与 --args-file 同语气——**先给免落盘的 stdin**,再给根内
136
+ // 落盘路径。旧顺序把「放到根下」放前面,读者照做后还要再想一步。
137
+ return invalid(`--fields-file 读取失败:${detail}${/must be inside the configuration root/.test(detail) ? `。免落盘替代:\`--fields -\` 从 stdin 读 JSON(--fields - < <文件>);或把参数文件放到 ${root} 之下(如 ${join(root, "args.json")})再用 --fields-file 引用` : ""}`);
136
138
  }
137
139
  }
138
140
  if (inputJson === undefined)
@@ -1059,12 +1059,33 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
1059
1059
  * F7(0.8.12)与 C6(0.8.4)的边界:默认 pathMiss 仍只留「在哪断 + 最接近的键 +
1060
1060
  * 教程指针」(≤300B,无 available/hint);full 面独占键只允许带一条**能装进
1061
1061
  * 300B** 的 `nextCommand`,装不下就留给 `--explain`。
1062
+ *
1063
+ * F2(0.8.32):`skills/omc-refusals.md` 一直写「miss 给 correctPath + nextCommand
1064
+ * (能验证才给)」,但默认面只在 --explain 给。现在**唯一可验证**的纠错
1065
+ * (`reason === undefined`:一个候选且已在真实结果树上解析通过)也进默认面——
1066
+ * 它是结论,不是排查载荷;多候选(reason 点名其余位置)仍只走 --explain,不猜。
1067
+ * 300B 装不下时按优先级退:先保 correctPath(结论),再丢 nextCommand。
1062
1068
  */
1063
- const compactMissExtra = (_path, _at, entry, fullFace) => {
1064
- if (fullFace?.nextCommand === undefined)
1069
+ const compactMissExtra = (entry, fullFace, correction, retryCommand) => {
1070
+ const uniquePath = correction !== undefined && correction.reason === undefined ? correction.correctPath : undefined;
1071
+ const extras = {};
1072
+ if (uniquePath !== undefined)
1073
+ extras.correctPath = uniquePath;
1074
+ // full 面独占键的重试命令优先(form.get 的 full:true);否则用纠错路径拼的重跑命令。
1075
+ const nextCommand = fullFace?.nextCommand ?? (uniquePath !== undefined ? retryCommand : undefined);
1076
+ if (nextCommand !== undefined)
1077
+ extras.nextCommand = nextCommand;
1078
+ const fits = (candidate) => Buffer.byteLength(JSON.stringify({ ...entry, ...candidate }), "utf8") <= 300;
1079
+ if (Object.keys(extras).length === 0)
1065
1080
  return {};
1066
- const candidate = { ...entry, nextCommand: fullFace.nextCommand };
1067
- return Buffer.byteLength(JSON.stringify(candidate), "utf8") <= 300 ? { nextCommand: fullFace.nextCommand } : {};
1081
+ if (fits(extras))
1082
+ return extras;
1083
+ // 装不下:correctPath 是结论,nextCommand 是便利——先丢后者。
1084
+ if (extras.correctPath !== undefined) {
1085
+ const onlyPath = { correctPath: extras.correctPath };
1086
+ return fits(onlyPath) ? onlyPath : {};
1087
+ }
1088
+ return {};
1068
1089
  };
1069
1090
  out.extract = paths.map((path) => {
1070
1091
  // F8:拒绝态下载荷字段不是值——回拒绝摘要而不是默认 0/[]/null。
@@ -1130,7 +1151,7 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
1130
1151
  ...(readFromArtifact ? resultLayerNote(result, path, projectionSource, fan.at) ?? {} : {}),
1131
1152
  hint: fullFace?.hint ?? missHintFor(fan.at, fan.available, correction),
1132
1153
  }
1133
- : compactMissExtra(path, fan.at, baseMiss, fullFace)),
1154
+ : compactMissExtra(baseMiss, fullFace, correction, nextCommand)),
1134
1155
  };
1135
1156
  }
1136
1157
  return {
@@ -1185,7 +1206,7 @@ export function projectResultExtract(result, paths, keysOnly, retry, explain = f
1185
1206
  ...(readFromArtifact ? resultLayerNote(result, path, projectionSource, single.at) ?? {} : {}),
1186
1207
  hint: fullFace?.hint ?? missHintFor(single.at, single.available, correction),
1187
1208
  }
1188
- : compactMissExtra(path, single.at, baseMiss, fullFace)),
1209
+ : compactMissExtra(baseMiss, fullFace, correction, nextCommand)),
1189
1210
  };
1190
1211
  }
1191
1212
  const singleValue = single.value ?? null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.8.31",
3
+ "version": "0.8.32",
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.31",
61
+ "omc-core": "0.8.32",
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.31"
79
+ "@stalfh233/omc-fake-platform": "0.8.32"
80
80
  }
81
81
  }
@@ -31,7 +31,7 @@ be treated as a second source. Read this, then follow the topics it names.
31
31
 
32
32
  1c. **写后端 Java 源码(在线开发)走工作区而不是一条条 call**:`omc programming pull --env <env> --app <appCode>` 把业务规则源码拉进 `.omc-programming/`(git 可管),改文件后 `omc programming status` → `omc programming apply [--publish]`(逐文件走编程面治理);图形化规则转编码用 `omc programming adopt --schema <s> --rule <r>`;验证用 `omc programming test --schema <s> --rule <r>`(fixture 驱动:compile→publish→触发→断言→清理)。**平台运行时只执行已发布版**:只 save 不 publish 等于没改;publish 内部会编译并把规则切 CODING+enable。包路径/类名不得改。
33
33
  2. 写前只需读 `omc-config-draft-review`(人审门)与 `omc-five-piece-flow`(发现→草稿→权限→执行→回读);`omc-business-configuration` 按命中的能力分节读(见 `next` 的 `readSections`),不要整篇预取。
34
- 3. 环境名以 `omc doctor` 的「环境=」或 `.omc-env` 为准。发现面按下面的档位表(唯一口径)从小到大取;`describe` 带 `exampleHint`/`recipeHint` 时优先 `--example`。用户只给「测试环境/生产环境」这类自然语言标签时,**不要把标签拼成 `--env`**:单环境项目直接省略 `--env`(走 `.omc-env`);多环境先 `omc env list` / `omc doctor` 读枚举,仍不明确就问用户。
34
+ 3. 环境:以 `omc doctor` 的「环境=」或 `.omc-env` 为准(序 `--env` > `OMC_ENV` > `.omc-env` > default)。自然语言标签**不要**拼成 `--env`。单环境省 `--env`;可见环境 ≥2 先 `omc env list`/`omc doctor`:**写、或目标是生产 → 先问用户**,读面不明确也问。发现面按下面档位表从小到大取;`describe` 带 `exampleHint`/`recipeHint` 时优先 `--example`。
35
35
  5. 键名按对象不同:模型 `schemaCode`、默认表单 `sheetCode`(可省略,默认 == 模型 code)、流程 `workflowCode`/`code`——报错会提示同义键;字段族名认不出会给「最接近的族」。
36
36
  6. **写操作串行**:同一环境不要并发写(含多个 `omc call` 并行进程——环境写锁互斥,r31 实证并行 field.create 2/3 被拒);多个写合并为一条 `omc script` 逐行跑(进程内自动串行);`write-lock-held` 是瞬态:**优先在发起时就排队**——`omc call <tool> --wait 5000`(或 `omc intent apply ... --wait 5000`)让 CLI 内部有界重试,不必自己再花一轮。
37
37
  7. **单个对象优先高阶编排工具**:模型+字段用 `configure_model`(一次含全部字段),表单用 `configure_form`,列表用 `listview.configure`(**默认视图已存在,省略 code 即配置它,不要 `listview.create`**)。原子工具留给单点修改。