@stalfh233/omc-cli 0.6.66 → 0.6.68
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/call.js +12 -1
- package/dist/cli-contract.js +11 -0
- package/dist/cli.js +64 -5
- package/dist/goal-routes.js +22 -5
- package/dist/graph.js +231 -28
- package/dist/lanes/businessrule-contract.js +5 -0
- package/dist/lanes/businessrule.js +148 -30
- package/dist/lanes/field.js +33 -2
- package/dist/lanes/list-view-contract.js +2 -2
- package/dist/lanes/list-view.js +72 -10
- package/dist/lanes/rule-graph.js +2 -2
- package/dist/lanes/runtime-data.js +8 -3
- package/dist/mcp-graph.js +56 -27
- package/dist/read-shapes.js +14 -0
- package/dist/rule-support.js +118 -79
- package/dist/tool-types.js +11 -0
- package/dist/write.js +6 -0
- package/package.json +3 -3
- package/skills/omc-start-here.md +1 -1
package/dist/call.js
CHANGED
|
@@ -122,11 +122,22 @@ export async function runToolCall(toolName, options = {}) {
|
|
|
122
122
|
// dictionary.delete) must not read as an OMC gap: name the real recovery
|
|
123
123
|
// path and the documented absence instead of only the nearest tools.
|
|
124
124
|
const absence = absencePointer(toolName);
|
|
125
|
+
// 线上 #40 第 10 条(2026-11-17):`workflow.get` 不是平台缺席,而是 OMC
|
|
126
|
+
// 读面按状态拆成两个工具——「工具不存在」的候选列表看着像拼写错误,
|
|
127
|
+
// 调用方会先怀疑自己再试一遍。直接点名拆分事实与两条命令。
|
|
128
|
+
const SPLIT_FACES = {
|
|
129
|
+
"workflow.get": {
|
|
130
|
+
faces: ["workflow.get_draft", "workflow.get_published"],
|
|
131
|
+
note: "workflow.get 不存在:读面按状态拆分——草稿用 workflow.get_draft,已发布用 workflow.get_published(两面字段不同,不要拿草稿面推断线上形状)",
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
const split = SPLIT_FACES[toolName];
|
|
125
135
|
const result = {
|
|
126
136
|
status: "unknown-tool",
|
|
127
137
|
tool: toolName,
|
|
138
|
+
...(split ? { splitFaces: split.faces, note: split.note, nextCommand: `omc call ${split.faces[split.faces.length - 1]} --args '{"workflowCode":"<流程 code>"}'` } : {}),
|
|
128
139
|
...(candidates.length > 0 ? { candidates } : {}),
|
|
129
|
-
...(didYouMean.length > 0 ? { didYouMean, nextCommand: `omc describe ${didYouMean[0]}` } : {}),
|
|
140
|
+
...(!split && didYouMean.length > 0 ? { didYouMean, nextCommand: `omc describe ${didYouMean[0]}` } : {}),
|
|
130
141
|
...(byText.length > 0 ? { didYouMeanByText: byText } : {}),
|
|
131
142
|
...(absence ? { platformAbsence: absence.replace(/^;/, "") } : {}),
|
|
132
143
|
// 跨族/表意不清时,「猜名字」本身就不该是路径——用目标路由一步到位。
|
package/dist/cli-contract.js
CHANGED
|
@@ -157,6 +157,15 @@ export function requestId() {
|
|
|
157
157
|
* (`business-rule-branch-conditional`) no matter WHICH lint code fired, so a
|
|
158
158
|
* QUERY-shape failure sent the caller to a BRANCH example (2 wasted calls, 0
|
|
159
159
|
* benefit). Route by the first code's prefix and only fall back to the example.
|
|
160
|
+
*
|
|
161
|
+
* r73 P1 (issue #40 §9): the remaining lie was `rule-graph-create*` as a whole
|
|
162
|
+
* pointing at the CROSS-MODEL recipe — a same-model CREATE node missing
|
|
163
|
+
* `originatorValue` (or an illegal `originatorValueType` /
|
|
164
|
+
* `childTriggerConditionType`) is a "what value goes in this node key" error,
|
|
165
|
+
* not a cross-model shape error; the cross-model example sent the caller
|
|
166
|
+
* hunting graph shapes while the fix was one node key. Those three codes route
|
|
167
|
+
* to the nodeGraph param page (node-key reference); the lint message itself
|
|
168
|
+
* carries the DYNAMIC/FIXED fill recipe.
|
|
160
169
|
*/
|
|
161
170
|
export function ruleGraphRecovery(validation) {
|
|
162
171
|
if (!Array.isArray(validation))
|
|
@@ -174,6 +183,8 @@ export function ruleGraphRecovery(validation) {
|
|
|
174
183
|
return "omc compute --help";
|
|
175
184
|
if (first.startsWith("rule-graph-assign-"))
|
|
176
185
|
return "omc describe rule.save --param nodeGraph";
|
|
186
|
+
if (first === "rule-graph-create-originator" || first === "rule-graph-create-originator-value" || first === "rule-graph-child-trigger-condition-type")
|
|
187
|
+
return "omc describe rule.save --param nodeGraph";
|
|
177
188
|
if (first.startsWith("rule-graph-preset-system-node") || first === "rule-graph-system-node")
|
|
178
189
|
return "omc describe rule.save --example standard-business-rule-graph";
|
|
179
190
|
if (first.startsWith("rule-graph-branch") || first.startsWith("rule-graph-condition-"))
|
package/dist/cli.js
CHANGED
|
@@ -26,7 +26,7 @@ import { artifactFetchHint, artifactRoot, boundResult, emitInvalid, emitResult,
|
|
|
26
26
|
import { CLI_DEFAULT_OUTPUT_BYTES, assertSafeOutputPath, pruneArtifacts } from "./artifacts.js";
|
|
27
27
|
import { artifactPathMissHint, nullProjectionHint, partialPathMissHint, projectJsonPath, projectJsonPathFanout, projectResultExtract } from "./path-projection.js";
|
|
28
28
|
import { basename, join, resolve } from "node:path";
|
|
29
|
-
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
29
|
+
import { existsSync, readFileSync, writeFileSync, chmodSync } from "node:fs";
|
|
30
30
|
import { buildToolRegistry } from "./tools.js";
|
|
31
31
|
import { acquireWriteLock, writeLockHeldFace } from "./write-lock.js";
|
|
32
32
|
import { cmdCompute } from "./compute.js";
|
|
@@ -980,6 +980,35 @@ function formatBytes(bytes) {
|
|
|
980
980
|
return `${(bytes / 1024).toFixed(1)}KB`;
|
|
981
981
|
return `${(bytes / 1024 / 1024).toFixed(1)}MB`;
|
|
982
982
|
}
|
|
983
|
+
/**
|
|
984
|
+
* r73 #7(GitLab #40 P1):从 `omc artifact get <id> --out <path>` 的 argv 里截出
|
|
985
|
+
* `--out` 并原地摘除那两个 token,让 configureOutput / stripOutputFlags 的全局
|
|
986
|
+
* 信封重定向语义不再吃掉它。只对 `artifact get` 子命令生效;缺值/flag 形值与
|
|
987
|
+
* configureOutput 同规则拒绝(invalid-input)。返回截得的路径,未出现则 undefined。
|
|
988
|
+
*/
|
|
989
|
+
function extractArtifactGetOutFlag(argv) {
|
|
990
|
+
const tokens = argv.slice(2);
|
|
991
|
+
if (tokens[0] !== "artifact" || tokens[1] !== "get")
|
|
992
|
+
return undefined;
|
|
993
|
+
for (let index = 2; index < argv.length; index += 1) {
|
|
994
|
+
const token = argv[index];
|
|
995
|
+
if (token === "--out") {
|
|
996
|
+
const value = argv[index + 1];
|
|
997
|
+
if (value === undefined || value.startsWith("--"))
|
|
998
|
+
throw new Error("--out requires a file path");
|
|
999
|
+
argv.splice(index, 2);
|
|
1000
|
+
return value;
|
|
1001
|
+
}
|
|
1002
|
+
if (token.startsWith("--out=")) {
|
|
1003
|
+
const value = token.slice("--out=".length);
|
|
1004
|
+
if (value.length === 0)
|
|
1005
|
+
throw new Error("--out requires a file path");
|
|
1006
|
+
argv.splice(index, 1);
|
|
1007
|
+
return value;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
return undefined;
|
|
1011
|
+
}
|
|
983
1012
|
async function cmdArtifactGet(id, transport, options = {}) {
|
|
984
1013
|
try {
|
|
985
1014
|
const artifact = readArtifact(artifactRoot(), id);
|
|
@@ -990,6 +1019,25 @@ async function cmdArtifactGet(id, transport, options = {}) {
|
|
|
990
1019
|
catch {
|
|
991
1020
|
content = artifact.content.toString("utf8");
|
|
992
1021
|
}
|
|
1022
|
+
// r73 #7(GitLab #40 P1,2026-11-17):`--out <配置根内路径>` 把 artifact 原始
|
|
1023
|
+
// 正文**全量落盘**——写文件不走 stdout 限额,`--full` 被上限卡死(fullRejected)
|
|
1024
|
+
// 的大对象(实测 589KB 视图 artifact)此前只能拆 key 取、易漏。这里写的是已过
|
|
1025
|
+
// sha256 校验的原文字节;回执只给 {out,bytes,sha256},stdout 不回正文。
|
|
1026
|
+
if (options.out !== undefined) {
|
|
1027
|
+
let outPath;
|
|
1028
|
+
try {
|
|
1029
|
+
outPath = assertSafeOutputPath(intentConfigRoot(), options.out, "artifact output file");
|
|
1030
|
+
}
|
|
1031
|
+
catch (error) {
|
|
1032
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
1033
|
+
const parsed = errorEnvelope(new Error(`artifact get --out 落盘被拒:${detail}。--out 按配置根(OMC_CONFIG_HOME)解析,只允许配置根内的常规文件路径(父目录须已存在)`), "artifact-out-refused", CLI_EXIT_CODES.invalidInput, transport.request);
|
|
1034
|
+
writeEnvelope(parsed.envelope);
|
|
1035
|
+
return parsed.exitCode;
|
|
1036
|
+
}
|
|
1037
|
+
writeFileSync(outPath, artifact.content, { mode: 0o600 });
|
|
1038
|
+
chmodSync(outPath, 0o600);
|
|
1039
|
+
return emitTransportResult({ status: "ok", artifactId: id, sha256: artifact.sha256, bytes: artifact.content.length, out: options.out, mode: "0600" }, transport);
|
|
1040
|
+
}
|
|
993
1041
|
// `--path-only` deliberately does NOT return the local path: the Agent-facing
|
|
994
1042
|
// CLI contract forbids exposing local filesystem paths. It returns the fetch
|
|
995
1043
|
// command instead, which is the portable way to reach the body.
|
|
@@ -1106,7 +1154,7 @@ async function cmdArtifactGet(id, transport, options = {}) {
|
|
|
1106
1154
|
bytes: artifact.content.length,
|
|
1107
1155
|
outline: true,
|
|
1108
1156
|
...(record ? { keys } : { kind: typeof content }),
|
|
1109
|
-
hint: `正文 ${Math.round(artifact.content.length / 1024)}KB 超过内联上限 ${ARTIFACT_INLINE_CEILING_BYTES}B,本次只回形状(顶层键 + 体积)。要某几个键:--keys <a,b>;要某个路径:--jq '<path>'(支持 .rules[code=Create].name 这类数组选择器);确实需要整包:--full
|
|
1157
|
+
hint: `正文 ${Math.round(artifact.content.length / 1024)}KB 超过内联上限 ${ARTIFACT_INLINE_CEILING_BYTES}B,本次只回形状(顶层键 + 体积)。要某几个键:--keys <a,b>;要某个路径:--jq '<path>'(支持 .rules[code=Create].name 这类数组选择器);确实需要整包:--full,或 --out <配置根内路径> 整包落盘(不走 stdout 限额)。`,
|
|
1110
1158
|
keysCommand: keys.length > 0 ? `omc artifact get ${id} --keys ${keys.slice(0, 3).map((entry) => entry.key).join(",")}` : `omc artifact get ${id} --summary`,
|
|
1111
1159
|
fullCommand: `omc artifact get ${id} --full`,
|
|
1112
1160
|
}, transport);
|
|
@@ -1136,8 +1184,9 @@ async function cmdArtifactGet(id, transport, options = {}) {
|
|
|
1136
1184
|
reason: `整包 ${Math.round(artifact.content.length / 1024)}KB 超过本通道输出上限 ${transport.maxOutputBytes}B;--full 无法一次返回,再跑一次结果相同`,
|
|
1137
1185
|
...(keys.length > 0 ? { keysCommand: `omc artifact get ${id} --keys ${keys.join(",")}`, sampledKeys: keys } : {}),
|
|
1138
1186
|
jqCommand: `omc artifact get ${id} --jq '<path>'`,
|
|
1187
|
+
outCommand: `omc artifact get ${id} --out <配置根内文件路径>(整包落盘,不走 stdout 限额,适合一次性备份)`,
|
|
1139
1188
|
raiseCeilingCommand: `omc artifact get ${id} --full --max-output-bytes ${Math.max(artifact.content.length + 1024, transport.maxOutputBytes * 2)}`,
|
|
1140
|
-
hint: "
|
|
1189
|
+
hint: "三选一:用 --jq/--keys 取你真正需要的那部分(推荐),整包落盘备份用 --out <配置根内路径>(写文件不受 stdout 限额),或显式抬高 --max-output-bytes",
|
|
1141
1190
|
}, transport);
|
|
1142
1191
|
}
|
|
1143
1192
|
return emitTransportResult(result, transport);
|
|
@@ -2352,6 +2401,9 @@ function joinSplitFlagValues(raw, flags) {
|
|
|
2352
2401
|
let lastHelpChunk = "";
|
|
2353
2402
|
async function main() {
|
|
2354
2403
|
let commandExitCode = 0;
|
|
2404
|
+
// r73 #7:artifact get 的 --out 值(在 configureOutput 之前截获,见下)。全局
|
|
2405
|
+
// 其它命令的 --out 语义不变(stdout 信封重定向)。
|
|
2406
|
+
let artifactGetOutPath;
|
|
2355
2407
|
// stderr is the diagnostics stream: apply the same Windows code-page policy
|
|
2356
2408
|
// as stdout before ANY message is written (banner, doctor, refusals).
|
|
2357
2409
|
installCodePageSafeStderr();
|
|
@@ -2374,6 +2426,11 @@ async function main() {
|
|
|
2374
2426
|
}
|
|
2375
2427
|
};
|
|
2376
2428
|
try {
|
|
2429
|
+
// r73 #7(GitLab #40 P1):`artifact get <id> --out <配置根内路径>` 是**产物正文
|
|
2430
|
+
// 落盘**语义。`--out` 同时是全局 stdout 信封重定向 flag(configureOutput 在
|
|
2431
|
+
// commander 之前消费它),artifact get 场景必须先行截走,否则正文永远到不了
|
|
2432
|
+
// 文件、全局通道只会把小信封写进目标文件。
|
|
2433
|
+
artifactGetOutPath = extractArtifactGetOutFlag(argv);
|
|
2377
2434
|
configureOutput(argv);
|
|
2378
2435
|
}
|
|
2379
2436
|
catch (error) {
|
|
@@ -2820,20 +2877,22 @@ async function main() {
|
|
|
2820
2877
|
console.error(`已清理 ${result.removed} 个读回产物,释放 ${formatBytes(result.freedBytes)};保留 ${result.kept} 个(${formatBytes(result.keptBytes)})`);
|
|
2821
2878
|
commandExitCode = CLI_EXIT_CODES.ok;
|
|
2822
2879
|
});
|
|
2823
|
-
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) => {
|
|
2880
|
+
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("--out <path>", "把 artifact 原始正文全量写到配置根内文件(0600;写文件不走 stdout 限额,大对象一次落盘备份;回执只给 {out,bytes,sha256} 不回正文)").option("--max-output-bytes <bytes>").action(async (id, options) => {
|
|
2824
2881
|
// A bare `--jq`/`--keys` is a key-inventory request, not a missing argument:
|
|
2825
2882
|
// commander's "argument missing" (invalid-input + retry) is a dead end the
|
|
2826
2883
|
// caller cannot fix without already knowing the flag takes a value (r11
|
|
2827
2884
|
// burned six rounds on `artifact get <id> --jq` before trying `--summary`).
|
|
2828
2885
|
// --extract 是 --jq 的同义别名(r28h F3)。
|
|
2829
2886
|
// 重复 --jq 的多路径合并为逗号路径透传(r34c-F8:此前静默只留最后一个)。
|
|
2887
|
+
// r73 #7:--out 在 configureOutput 之前被 extractArtifactGetOutFlag 截获
|
|
2888
|
+
//(commander 永远收不到它),这里读的是 main() 截下的值。
|
|
2830
2889
|
const jqPaths = [
|
|
2831
2890
|
...(Array.isArray(options.jq) ? options.jq.filter((v) => typeof v === "string") : []),
|
|
2832
2891
|
...(typeof options.extract === "string" ? [options.extract] : []),
|
|
2833
2892
|
];
|
|
2834
2893
|
const bareJq = options.jq === true;
|
|
2835
2894
|
commandExitCode = await withTransport(options, request, (transport) => cmdArtifactGet(id, transport, { ...(jqPaths.length > 0 ? { jq: jqPaths.join(",") } : {}), pathOnly: options.pathOnly === true, summary: options.summary === true || options.keys === true || bareJq,
|
|
2836
|
-
pureKeys: (options.keys === true || bareJq) && options.summary !== true, ...(typeof options.keys === "string" ? { keys: options.keys } : {}), full: options.full === true }));
|
|
2895
|
+
pureKeys: (options.keys === true || bareJq) && options.summary !== true, ...(typeof options.keys === "string" ? { keys: options.keys } : {}), full: options.full === true, ...(artifactGetOutPath !== undefined ? { out: artifactGetOutPath } : {}) }));
|
|
2837
2896
|
});
|
|
2838
2897
|
command.command("bench").option("--live-sample").option("--env <environment>").action(async (options) => { commandExitCode = await cmdBench([...(options.liveSample ? ["--live-sample"] : []), ...(options.env ? ["--env", options.env] : [])]); });
|
|
2839
2898
|
command.command("residue <prefix>").description("跨面前缀残留扫描(model 全租户/folder/custompage;默认 deep 再查命中模型的 rule/datarule/onlinejs)——收尾「删净」一次证明,clean:true 即零残留。清理入口:omc model-purge --code <schemaCode>(按依赖倒序,默认 dry-run)。只读零写入;report 面暂停维护未扫描").option("--env <environment>", "环境名(默认按 cwd 的 .omc-env 解析)").option("--apps <codes>", "all(默认,全租户)或逗号分隔应用码").option("--no-deep", "只扫 model/folder/custompage,不深查命中模型").option("--all-faces", "列出全部应用×面(含 count:0;默认只回非零面+byFace/userResidues 紧凑形)").option("--max-output-bytes <bytes>").addOption(new Option("--jq [path]", "--jq 不是 jq,仅路径选择器(与 call --jq 同 DSL;可逗号多路径;裸 --jq 列顶层键)").argParser((value, previous = []) => [...previous, value]).default([])).action(async (prefix, options) => { commandExitCode = await withTransport(options, request, (transport) => cmdResidue(prefix, { env: options.env, apps: options.apps, ...(options.deep === false ? { noDeep: true } : {}), ...(options.allFaces ? { allFaces: true } : {}), ...(options.jq !== undefined ? { jq: options.jq } : {}) }, transport)); });
|
package/dist/goal-routes.js
CHANGED
|
@@ -734,14 +734,29 @@ function readOverviewRoute(registry, goal, index) {
|
|
|
734
734
|
* `field.list`(读字段定义)——答的不是「谁引用了它」。r57 探针从零搭 6 个工作包,
|
|
735
735
|
* `omc graph` **一次都没用过**,尽管 `omc help omc-start-here` §1b 写得很详细。
|
|
736
736
|
*
|
|
737
|
-
*
|
|
738
|
-
*
|
|
737
|
+
* r72g(2026-11-17 探针)扩了两处:
|
|
738
|
+
* ① 触发面——盘点型关系问句(「关于 X 配了哪些规则」「哪些字段被规则用到」)
|
|
739
|
+
* 不带「引用/使用/影响」词面,r57 词表接不住,但答案同样一次索引查询可答;
|
|
740
|
+
* ② 定位——note 首句从「是本地引用索引」升级为「关系型问题第一入口」
|
|
741
|
+
* (探针实测:否定结论靠 9 次 rule.get 枚举拿到,索引 1 次可答)。
|
|
742
|
+
*
|
|
743
|
+
* 保守触发:只在**明确问引用/影响/删除前检查/规则盘点**时给,且不改变原有
|
|
744
|
+
* route——只追加一条可核对的指路,原有路由行照旧。给不出唯一目标 code 时只给
|
|
739
745
|
* `status`/`search` 这类**不带 code 也能跑**的入口。
|
|
740
746
|
*/
|
|
741
747
|
const GRAPH_INTENT_RE = /(?:谁|哪(?:个|些|里))?(?:引用|使用|用到|依赖|被用|用到了)|影响面|影响范围|爆炸半径|牵连|波及|删(?:除|掉)?(?:前|之前|了会不会|会怎样|有没有风险)|能不能删|可以删(?:吗|么)|\bimpact\b|\breferences?\b|\bwho uses\b/i;
|
|
748
|
+
/**
|
|
749
|
+
* 盘点型关系问句(r72g):只认「问规则/关联清单」的固定形状,不认裸「规则」
|
|
750
|
+
* (那会把规则写问句也劫来)。聚合词在场时让位——数值聚合不是关系查询,
|
|
751
|
+
* goalRouteInner 的聚合专项(data.list + --jq 自行计数)才是正解;词表镜像自
|
|
752
|
+
* 那里的 AGGREGATE_ASK(函数内常量),改词请两处同步。
|
|
753
|
+
*/
|
|
754
|
+
const GRAPH_INVENTORY_RE = /有哪些规则|配了(?:哪些|什么)规则|关于.{1,12}的规则|被.{0,8}(?:规则|条件|视图)用到|跟.{1,10}(?:有关联|相关)/;
|
|
755
|
+
const GRAPH_AGGREGATE_RE = /(统计|分组|汇总|聚合|计数|条数(?!据)|多少条|有几条|数一下)/;
|
|
742
756
|
const GRAPH_OBJECT_RE = /\b([a-z][a-z0-9]*(?:_[a-z0-9]+)+)\b/g;
|
|
743
757
|
function graphHintFor(goal) {
|
|
744
|
-
|
|
758
|
+
// 引用/影响词面照旧;盘点型问句要过聚合闸(「统计配了哪些规则」是计数不是关系)。
|
|
759
|
+
if (!GRAPH_INTENT_RE.test(goal) && !(GRAPH_INVENTORY_RE.test(goal) && !GRAPH_AGGREGATE_RE.test(goal)))
|
|
745
760
|
return undefined;
|
|
746
761
|
const codes = [...new Set(goal.match(GRAPH_OBJECT_RE) ?? [])];
|
|
747
762
|
// ⚠️ 参数面不同(2026-11-12 真机逐条验证):`status`/`references` 收 --env(仅作绑定提示),
|
|
@@ -749,7 +764,9 @@ function graphHintFor(goal) {
|
|
|
749
764
|
// 给用户一份跑不通的命令比不给更糟,所以这里按子命令分别拼。
|
|
750
765
|
const commands = codes.length === 1
|
|
751
766
|
? [
|
|
752
|
-
|
|
767
|
+
// r72g:字段 code 跨模型不唯一(rule.references 同一边界)——schema.field
|
|
768
|
+
// r72g 核心已落地 schema.field 解析(2026-11-17)——措辞从「将支持」改「支持」。
|
|
769
|
+
`omc graph references field ${codes[0]} --env <环境名> # 字段重名时消歧用 schema.field 写法(<schema>.${codes[0]})`,
|
|
753
770
|
`omc graph references model ${codes[0]} --env <环境名>`,
|
|
754
771
|
`omc graph impact model ${codes[0]} # 注意:impact 不收 --env`,
|
|
755
772
|
]
|
|
@@ -762,7 +779,7 @@ function graphHintFor(goal) {
|
|
|
762
779
|
state: "unknown",
|
|
763
780
|
firstCommand: "omc graph status --env <环境名>; 无索引则 omc graph pull --env <环境名>(只读,约 1 分钟)",
|
|
764
781
|
commands,
|
|
765
|
-
note: "
|
|
782
|
+
note: "关系型问题第一入口:一次毫秒级答「谁用到 X / 关于 X 配了哪些规则 / 改动影响」,替代逐模型 rule.list/rule.get 枚举(r72g 探针实测 9 次 rule.get 才拿到的否定结论,索引 1 次可答)。索引含规则条件叶子(rule.condition 边),不含流程绑定,命中后仍以 rule.get 原文为准。宿主接了 MCP 时用 omc_graph_explore(安装器自动注册)。",
|
|
766
783
|
};
|
|
767
784
|
}
|
|
768
785
|
function goalRouteInner(registry, goal) {
|