@stalfh233/omc-cli 0.6.81 → 0.6.83
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/coverage/m1-coverage-manifest-v1.json +5 -2
- package/dist/artifacts.js +28 -5
- package/dist/capability-overview.js +4 -4
- package/dist/cli.js +168 -41
- package/dist/config-store.js +35 -0
- package/dist/endpoints.js +22 -0
- package/dist/env-export.js +4 -0
- package/dist/human-summary.js +8 -0
- package/dist/lanes/b2-registration-contract.js +11 -0
- package/dist/lanes/b2-registration-coverage.js +1 -0
- package/dist/lanes/businessrule-contract.js +5 -3
- package/dist/lanes/businessrule.js +160 -2
- package/dist/lanes/environment-contract.js +8 -0
- package/dist/lanes/environment.js +73 -0
- package/dist/lanes/rule-graph.js +21 -5
- package/dist/lanes/runtime-data-contract.js +8 -0
- package/dist/lanes/runtime-data.js +99 -12
- package/dist/lanes/servicelog.js +376 -0
- package/dist/lanes/workflow-contract.js +12 -2
- package/dist/lanes/workflow-coverage.js +1 -0
- package/dist/lanes/workflow.js +357 -27
- package/dist/model-purge.js +12 -3
- package/dist/path-projection.js +133 -21
- package/dist/read-shapes.js +14 -9
- package/dist/recipes/businessrule.js +1 -1
- package/dist/refusal-guidance.js +5 -4
- package/dist/rule-support.js +414 -43
- package/dist/session-account.js +66 -0
- package/dist/session.js +27 -0
- package/dist/token-cache.js +3 -0
- package/dist/tool-search.js +5 -1
- package/dist/tool-types.js +3 -1
- package/dist/tools.js +2 -0
- package/dist/writable-window.js +209 -0
- package/package.json +3 -3
- package/skills/omc-capabilities.md +5 -5
package/dist/path-projection.js
CHANGED
|
@@ -312,8 +312,13 @@ export const PATH_MISS_HINT = `路径未命中(这一层没有该段)。${RE
|
|
|
312
312
|
* `artifact get` 面:产物内容的投影。区别只在开头——它已经把 miss 落在哪一段
|
|
313
313
|
* (`missedAt`)和可用的键/范围一并返回,所以不必重复「这一层没有该段」。
|
|
314
314
|
*/
|
|
315
|
-
export function artifactPathMissHint(at) {
|
|
316
|
-
|
|
315
|
+
export function artifactPathMissHint(at, copyable) {
|
|
316
|
+
const lead = `路径未命中${at !== undefined ? `段 "${at}"` : "(这一层没有该段)"}`;
|
|
317
|
+
// issue 19:命中同名键时先给可整段复制的完整路径(相对产物正文)。
|
|
318
|
+
if (copyable !== undefined) {
|
|
319
|
+
return `${lead}。${copyable}。想一次拿全部顶层键:--keys(或裸 --jq)。${JQ_PATH_SYNTAX}${JQ_PATH_RULES}${JQ_PATH_HELP_POINTER}`;
|
|
320
|
+
}
|
|
321
|
+
return `${lead}——available 是该层真实存在的键/范围;方括号下标(a[0])与点式(a.0)等价;想一次拿全部顶层键:--keys(或裸 --jq)。${JQ_PATH_SYNTAX}${JQ_PATH_RULES}${JQ_PATH_HELP_POINTER}`;
|
|
317
322
|
}
|
|
318
323
|
/** 逗号多路径里只有部分 miss:给出定位方式 + 同一套语法。 */
|
|
319
324
|
export function partialPathMissHint() {
|
|
@@ -376,6 +381,106 @@ export function pathMissDidYouMean(at, available, availableAll) {
|
|
|
376
381
|
const alias = PATH_KEY_ALIASES[leaf.toLowerCase()];
|
|
377
382
|
return alias !== undefined && keys.includes(alias) ? alias : undefined;
|
|
378
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* Issue 19(retro 2026-11-19):`workflow.get_published` 的 activities 在
|
|
386
|
+
* `data.activities`,但 pathMiss hint 只会说「这一层没有该段 / 它在 result
|
|
387
|
+
* 顶层(只是不在 artifact 副本里)」——描述性指引让人再猜 2–3 次。
|
|
388
|
+
*
|
|
389
|
+
* 这里在**真实结果树**里找同名的键,拼出可整段复制的完整路径:
|
|
390
|
+
* `activities[].bizActions` → `data.activities[].bizActions`。多个位置就列
|
|
391
|
+
* 全部(≤3 条)让调用方自己选;找不到/都解析不通就返回 undefined,由原
|
|
392
|
+
* hint 兜底(不编造路径)。
|
|
393
|
+
*/
|
|
394
|
+
const COPYABLE_SCAN_MAX_NODES = 4000;
|
|
395
|
+
const COPYABLE_MAX_CANDIDATES = 24;
|
|
396
|
+
function escapeRegExp(text) {
|
|
397
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
398
|
+
}
|
|
399
|
+
/** 收集 source 里键名恰为 leaf 的所有路径;数组层记作 `[]`(与 DSL 同形)。 */
|
|
400
|
+
function collectKeyPaths(source, leaf) {
|
|
401
|
+
const found = [];
|
|
402
|
+
let visited = 0;
|
|
403
|
+
const walk = (node, prefix, depth) => {
|
|
404
|
+
if (found.length >= COPYABLE_MAX_CANDIDATES || visited > COPYABLE_SCAN_MAX_NODES || depth > 8)
|
|
405
|
+
return;
|
|
406
|
+
if (Array.isArray(node)) {
|
|
407
|
+
const arrayPrefix = prefix === "" ? "" : `${prefix}[]`;
|
|
408
|
+
for (const entry of node.slice(0, 25)) {
|
|
409
|
+
visited += 1;
|
|
410
|
+
walk(entry, arrayPrefix, depth + 1);
|
|
411
|
+
if (found.length >= COPYABLE_MAX_CANDIDATES)
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
if (node === null || typeof node !== "object")
|
|
417
|
+
return;
|
|
418
|
+
for (const [key, child] of Object.entries(node)) {
|
|
419
|
+
visited += 1;
|
|
420
|
+
const next = prefix === "" ? key : `${prefix}.${key}`;
|
|
421
|
+
if (key === leaf)
|
|
422
|
+
found.push(next);
|
|
423
|
+
walk(child, next, depth + 1);
|
|
424
|
+
if (found.length >= COPYABLE_MAX_CANDIDATES)
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
walk(source, "", 0);
|
|
429
|
+
return found;
|
|
430
|
+
}
|
|
431
|
+
/** path 里 leaf 之后的部分(含 `[]` / `.` 分隔符)。 */
|
|
432
|
+
function suffixAfterLeaf(path, leaf) {
|
|
433
|
+
const matcher = new RegExp(`(?:^|[.\\[])${escapeRegExp(leaf)}(?=$|[.\\[\\]])`, "gu");
|
|
434
|
+
let last;
|
|
435
|
+
let match;
|
|
436
|
+
while ((match = matcher.exec(path)) !== null)
|
|
437
|
+
last = match;
|
|
438
|
+
if (last === undefined)
|
|
439
|
+
return undefined;
|
|
440
|
+
return path.slice(last.index + last[0].length);
|
|
441
|
+
}
|
|
442
|
+
function copyableCandidateResolves(source, candidate) {
|
|
443
|
+
return candidate.includes("[]")
|
|
444
|
+
? !projectJsonPathFanout(source, candidate).missed
|
|
445
|
+
: !projectJsonPath(source, candidate).missed;
|
|
446
|
+
}
|
|
447
|
+
/** 可复制的完整路径(已验证在 source 上命中;去重,≤limit 条)。 */
|
|
448
|
+
export function pathMissCopyablePaths(source, path, at, limit = 3) {
|
|
449
|
+
if (at === undefined || at.length === 0)
|
|
450
|
+
return [];
|
|
451
|
+
const cleanPath = path.replace(/^\$\.?/, "").replace(/^[.\/]+/, "");
|
|
452
|
+
const leaf = at.replace(/^[.\/]+/, "").split(/[./\[]/).filter(Boolean).pop();
|
|
453
|
+
if (leaf === undefined || leaf.length === 0)
|
|
454
|
+
return [];
|
|
455
|
+
const suffix = suffixAfterLeaf(cleanPath, leaf);
|
|
456
|
+
if (suffix === undefined)
|
|
457
|
+
return [];
|
|
458
|
+
const candidates = [];
|
|
459
|
+
for (const prefix of collectKeyPaths(source, leaf)) {
|
|
460
|
+
const candidate = `${prefix}${suffix}`;
|
|
461
|
+
if (candidate === cleanPath || candidates.includes(candidate))
|
|
462
|
+
continue;
|
|
463
|
+
if (!copyableCandidateResolves(source, candidate))
|
|
464
|
+
continue;
|
|
465
|
+
candidates.push(candidate);
|
|
466
|
+
if (candidates.length >= limit)
|
|
467
|
+
break;
|
|
468
|
+
}
|
|
469
|
+
return candidates;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* pathMiss hint 的「可复制路径」句。有命中就**先给命令**(而不是描述它在
|
|
473
|
+
* 哪);多个位置列前 3 条;没有命中返回 undefined(原 hint 原样兜底)。
|
|
474
|
+
*/
|
|
475
|
+
export function pathMissCopyableHint(source, path, at, limit = 3) {
|
|
476
|
+
const shown = pathMissCopyablePaths(source, path, at, limit);
|
|
477
|
+
if (shown.length === 0)
|
|
478
|
+
return undefined;
|
|
479
|
+
const quoted = shown.map((candidate) => `--jq '${candidate.replace(/'/g, "'\\''")}'`).join(";");
|
|
480
|
+
if (shown.length === 1)
|
|
481
|
+
return `这段的完整路径是 ${shown[0]}——可直接复制:${quoted}`;
|
|
482
|
+
return `这段有多个位置——可直接复制其一:${quoted}`;
|
|
483
|
+
}
|
|
379
484
|
/**
|
|
380
485
|
* 多路径一次投影时的**唯一一份**语法说明(放结果顶层,不再逐条复制)。
|
|
381
486
|
* 只给最要紧的三条:位置语义、映射写法、help 指针。
|
|
@@ -594,25 +699,32 @@ export function projectResultExtract(result, paths, keysOnly) {
|
|
|
594
699
|
const missHintFor = (path, at, available, availableAll) => {
|
|
595
700
|
const fallback = multiPath ? pathMissEntryHint(at, available) : PATH_MISS_HINT;
|
|
596
701
|
const candidate = pathMissDidYouMean(at, available, availableAll);
|
|
597
|
-
if (candidate
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
702
|
+
if (candidate !== undefined && at !== undefined) {
|
|
703
|
+
// Replace only the missed segment, retaining array mapping and suffixes.
|
|
704
|
+
const leaf = at.split(/[./\[]/).filter(Boolean).pop();
|
|
705
|
+
if (leaf !== undefined) {
|
|
706
|
+
let replaced = false;
|
|
707
|
+
const corrected = path.replace(/[^.[\]/]+/g, (segment, offset) => {
|
|
708
|
+
const prefix = path.slice(0, offset + segment.length).replace(/^[.$/]+/, "");
|
|
709
|
+
if (replaced || segment !== leaf || (at !== leaf && prefix !== at))
|
|
710
|
+
return segment;
|
|
711
|
+
replaced = true;
|
|
712
|
+
return candidate;
|
|
713
|
+
});
|
|
714
|
+
// A similar key is useful only if the complete proposed path resolves.
|
|
715
|
+
if (corrected !== path && !projectPathOnSource(projectionSource, corrected).projected.missed) {
|
|
716
|
+
const quoted = corrected.replace(/'/g, "'\\''");
|
|
717
|
+
return `路径未命中:在 "${at}" 断开;最接近的是 ${candidate}。可试:--jq '${quoted}'`;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
// issue 19:没有拼写近似时,在真实结果树里找同名键,直接给可复制的完整
|
|
722
|
+
// 路径(如 data.activities[].bizActions)——不再只描述「它在哪一层」。
|
|
723
|
+
const copyable = pathMissCopyableHint(projectionSource, path, at);
|
|
724
|
+
if (copyable !== undefined) {
|
|
725
|
+
return multiPath ? `${copyable}。${pathMissEntryHint(at, available)}` : `${copyable}。${RESULT_RELATIVE_PATH_NOTE}`;
|
|
726
|
+
}
|
|
727
|
+
return fallback;
|
|
616
728
|
};
|
|
617
729
|
out.extract = paths.map((path) => {
|
|
618
730
|
// r28f F2:对象构造 / 函数调用不是 pathMiss——先识别,别伪装成键缺失。
|
package/dist/read-shapes.js
CHANGED
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
const READ_SHAPES = {
|
|
13
13
|
// r28k 治理面形状钉:截断≠空表;指纹有用途;doctor/get_status 分流。
|
|
14
14
|
"discover_environment": {
|
|
15
|
-
keys: ["applications:array<{code,name,groupId?,portalHidden?}>", "applicationsCount", "groups", "groupsCount", "foldersAndModels?", "foldersAndModelsCount?", "foldersAndModelsOmitted?", "models?", "modelsCount?", "modelsOmitted?", "tablesHint?", "applicationCode", "applicationResolution", "readiness", "detectedVersion", "inAnchorFamily", "versionSource", "versionFamily", "anchorVersion", "versionNotice?", "environmentFingerprint", "fingerprintHint?", "detailArtifactId?"],
|
|
15
|
+
keys: ["applications:array<{code,name,groupId?,portalHidden?}>", "applicationsCount", "groups", "groupsCount", "foldersAndModels?", "foldersAndModelsCount?", "foldersAndModelsOmitted?", "models?", "modelsCount?", "modelsOmitted?", "tablesHint?", "applicationCode", "applicationResolution", "readiness", "detectedVersion", "inAnchorFamily", "versionSource", "versionFamily", "anchorVersion", "versionNotice?", "environmentFingerprint", "fingerprintHint?", "platform:{productVersion,buildTime?,licenseType?,licenseExpiration?,source,licenseFaceUnavailable?,extensionBuildShaUnavailable?}|{versionUnavailable}", "detailArtifactId?"],
|
|
16
16
|
notes: [
|
|
17
17
|
"applications/groups 内联;foldersAndModels/models 外置时是 null + *Omitted:true(不是 [])",
|
|
18
18
|
"environmentFingerprint 用途见 fingerprintHint(写前漂移/计划绑定/读缓存键,非审批令牌)",
|
|
19
19
|
"detectedVersion/inAnchorFamily/versionSource 与 doctor/fingerprint 同源",
|
|
20
|
+
"platform.productVersion 是原始版本串(如 AI-Platform-v1.1.25);buildTime 只有平台回传才有(8.6.26 info() 从不赋值)、扩展 build sha 无端点(extensionBuildShaUnavailable)",
|
|
20
21
|
],
|
|
21
22
|
},
|
|
22
23
|
"environment.fingerprint": {
|
|
@@ -107,8 +108,8 @@ const READ_SHAPES = {
|
|
|
107
108
|
// 待办(待办在别人名下;同环境不带过滤回 8 条的实例,按实例过滤回 0,探针据此
|
|
108
109
|
// 误判过「没生成待办」)。看实例全活动链用 workflow.instanceActivity(查别人
|
|
109
110
|
// 名下待办用 participant 参数)。returnsFace 只显示 notes 首条——教学并进首条。
|
|
110
|
-
keys: ["items:array<{workItemId,workflowInstanceId,workflowCode,activityCode,activityName,state,sequenceNo,originator,originatorName,participant,participantName,bizObjectId,schemaCode}>", "total", "count"],
|
|
111
|
-
notes: ["本面=当前登录人待办:按实例过滤回 0 ≠ 没待办(在别人名下,用 participant
|
|
111
|
+
keys: ["items:array<{workItemId,workflowInstanceId,workflowCode,activityCode,activityName,state,sequenceNo,originator,originatorName,participant,participantName,bizObjectId,schemaCode}>", "total", "count", "stateFilter?:{requested,applied,via}"],
|
|
112
|
+
notes: ["本面=当前登录人待办:按实例过滤回 0 ≠ 没待办(在别人名下,用 participant 查别人);全活动链 workflow.instanceActivity", "state 过滤走 list_workitems(含 DRAFT;search_workitems 静默丢 state,看 stateFilter.applied)", "待办 id 键是 workItemId(平铺,不套 fields)"],
|
|
112
113
|
},
|
|
113
114
|
// r68 链2-D5(真机实证 2026-11-15):同一个「活动」概念两个面键名不同——
|
|
114
115
|
// workflow.get_published 的 activities[] 用 code/name/type,本面与 workitem 回执用
|
|
@@ -124,15 +125,15 @@ const READ_SHAPES = {
|
|
|
124
125
|
// 与 published 键不同。
|
|
125
126
|
"workflow.list": {
|
|
126
127
|
keys: ["applicationResolution", "modelsCount", "scannedModels", "withWorkflow", "publishedCount", "absentCount", "workflows:array<{modelCode,workflowCode,exists,published,ruleBindingCount,readFailed?}>", "wire", "partial?", "omittedModels?", "nextCommand?", "indexNote", "environmentFingerprint"],
|
|
127
|
-
notes: ["无流程的模型 workflowCode:null + exists:false(不是错误);平台无流程清单端点,本面按模型索引(流程-模型一对一惯例,workflowCode 常为 <模型code>_flow)", "ruleBindingCount = flow 级 handler
|
|
128
|
+
notes: ["无流程的模型 workflowCode:null + exists:false(不是错误);平台无流程清单端点,本面按模型索引(流程-模型一对一惯例,workflowCode 常为 <模型code>_flow)", "ruleBindingCount = flow 级 handler + 节点级事件 + SYSTEM_ACTIVITY 顶层绑定的规则码总数(比 get_published 摘要里的同名键多算节点级)"],
|
|
128
129
|
},
|
|
129
130
|
"workflow.get_published": {
|
|
130
|
-
keys: ["status", "workflowCode", "exists", "published", "workflowSummary:{workflowCode,templateType,activities:array<{index,code,type,name,bizActions?:{<nodeEvent>:[ruleCode]}}>,edges:array<{from,to}>,ruleBindings:array<{...}>,ruleBindingCount,originateActivity:{code,type,name,participant}}", "activities:array<{code,name,type,bizActions?}>(投影)", "propertyPermissionsCount", "version", "summaryHint", "truncatedKeys?", "omittedKeys?", "truncated?", "data?(外置时 null,完整模板在 detailArtifactId)", "omittedShape?", "omittedNote?", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
|
|
131
|
-
notes: ["
|
|
131
|
+
keys: ["status", "workflowCode", "exists", "published", "workflowSummary:{workflowCode,templateType,activities:array<{index,code,type,name,bizActions?:{<nodeEvent>:[ruleCode]},systemBizActions?:{bizActionType,ruleCodes:[code]}}>,edges:array<{from,to}>,ruleBindings:array<{...}>,nodeRuleBindings?,systemRuleBindings?,ruleBindingCount,originateActivity:{code,type,name,participant}}", "activities:array<{code,name,type,bizActions?,systemBizActions?}>(投影)", "propertyPermissionsCount", "version", "summaryHint", "truncatedKeys?", "omittedKeys?", "truncated?", "data?(外置时 null,完整模板在 detailArtifactId)", "omittedShape?", "omittedNote?", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
|
|
132
|
+
notes: ["规则绑定三个面:流程级 ruleBindings、节点事件 activities[].bizActions、SYSTEM_ACTIVITY 顶层 activities[].systemBizActions(规则绑在系统活动节点本身、激活时执行)——三个面看完再下「没绑」结论;完整模板在 data(外置 detailArtifactId),要深层字段时投影写到叶子(如 --jq 'data.activities[].bizActions')——写整棵父节点会因总量超限再次被外置"],
|
|
132
133
|
},
|
|
133
134
|
"workflow.get_draft": {
|
|
134
|
-
keys: ["status", "workflowCode", "exists", "workflowSummary:{workflowCode,templateType,activities:array<{index,code,type,name,bizActions?:{<nodeEvent>:[ruleCode]}}>,edges:array<{from,to}>,ruleBindings:array<{...}>,ruleBindingCount,originateActivity:{code,type,name,participant}}", "activities:array<{code,name,type,bizActions?}>(投影)", "propertyPermissionsCount", "version", "summaryHint", "truncatedKeys?", "omittedKeys?", "truncated?", "data?(外置时 null,完整模板在 detailArtifactId)", "omittedShape?", "omittedNote?", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
|
|
135
|
-
notes: ["与 workflow.get_published 同形(少了 published 键);节点绑定看 activities[].bizActions;templateType=DRAFT;深层字段投影写到叶子,完整模板在 data/detailArtifactId"],
|
|
135
|
+
keys: ["status", "workflowCode", "exists", "workflowSummary:{workflowCode,templateType,activities:array<{index,code,type,name,bizActions?:{<nodeEvent>:[ruleCode]},systemBizActions?:{bizActionType,ruleCodes:[code]}}>,edges:array<{from,to}>,ruleBindings:array<{...}>,nodeRuleBindings?,systemRuleBindings?,ruleBindingCount,originateActivity:{code,type,name,participant}}", "activities:array<{code,name,type,bizActions?,systemBizActions?}>(投影)", "propertyPermissionsCount", "version", "summaryHint", "truncatedKeys?", "omittedKeys?", "truncated?", "data?(外置时 null,完整模板在 detailArtifactId)", "omittedShape?", "omittedNote?", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
|
|
136
|
+
notes: ["与 workflow.get_published 同形(少了 published 键);节点绑定看 activities[].bizActions、系统活动顶层看 systemBizActions;templateType=DRAFT;深层字段投影写到叶子,完整模板在 data/detailArtifactId"],
|
|
136
137
|
},
|
|
137
138
|
"rule.list": {
|
|
138
139
|
keys: ["rules:array<{code,name,enabled,status,ruleVersion,defaultRule,preset,mappings?,mappingsUnavailable?}>", "rulesCount", "modelPresent", "source", "executableHint", "mappingsWireNote?", "schemaCodes?/modelsCount?/models?:array<每模型同单模型回执>/partial?/failed?:array<{schemaCode,code,message}>/absentModels?"],
|
|
@@ -161,7 +162,7 @@ const READ_SHAPES = {
|
|
|
161
162
|
// service.get,分插各自族附近);键集全部来自真机回执采样(非手写发明),
|
|
162
163
|
// returnsFace 只显 notes[0],高频陷阱并进首条。
|
|
163
164
|
"rule.get": {
|
|
164
|
-
keys: ["status", "id", "absent", "code", "name", "schemaCode", "bizRuleType", "enabled", "executable", "executableBasis", "ruleStatus", "defaultRule", "developmentMode", "ruleVersion", "templateType", "nodes:array<{nodeCode,nodeName,nodeType,nodeCategory?,inputParam?,methodMapping:{schemaCode,serviceCode,serviceMethodCode,inputMappings[],outputMappings[],serviceName,serviceMethodName},serviceType?}>", "routes:array<{preNode,postNode,routeCondition,matchType}>", "schedulerSetting?", "renderCompat", "semanticFindings?", "roundTrip", "nodeDigests?:array<{nodeCode,nodeType,methodMapping:{serviceCode,serviceMethodCode}}>(summary)", "methodMappingCount?(summary)", "bytesOmitted?(summary)", "rules?:array<摘要体>(ruleCodes 批量)", "rulesCount?/requestedCount?/partial?/failed?:array<{code,reason}>(批量;跨模型 failed 每条带 schemaCode)", "models?:array<{schemaCode,modelPresent,rulesCount,failedCount}>(跨模型)", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
|
|
165
|
+
keys: ["status", "id", "absent", "code", "name", "schemaCode", "bizRuleType", "enabled", "executable", "executableBasis", "ruleStatus", "defaultRule", "developmentMode", "ruleVersion", "templateType", "nodes:array<{nodeCode,nodeName,nodeType,nodeCategory?,inputParam?,methodMapping:{schemaCode,serviceCode,serviceMethodCode,inputMappings[],outputMappings[],serviceName,serviceMethodName},serviceType?}>", "routes:array<{preNode,postNode,routeCondition,matchType}>", "schedulerSetting?", "formulaNotes?(codeType:7 公式口径)", "renderCompat", "semanticFindings?", "roundTrip", "nodeDigests?:array<{nodeCode,nodeType,methodMapping:{serviceCode,serviceMethodCode}}>(summary)", "methodMappingCount?(summary)", "bytesOmitted?(summary)", "rules?:array<摘要体>(ruleCodes 批量)", "rulesCount?/requestedCount?/partial?/failed?:array<{code,reason}>(批量;跨模型 failed 每条带 schemaCode)", "models?:array<{schemaCode,modelPresent,rulesCount,failedCount}>(跨模型)", "environmentFingerprint", "detailArtifactId?", "detailSha256?", "fetch?"],
|
|
165
166
|
notes: [
|
|
166
167
|
"绑定方法:默认面看 nodes[].methodMapping.serviceCode/serviceMethodCode(三层深);扫多规则用 summary:true + ruleCodes[](同 schemaCode,1 次 list),扫多模型再配 schemaCodes[](≤20,逐模型 1 探针 + 1 list)——摘要键是 nodeDigests,不是 nodes(nodes 只在默认面)",
|
|
167
168
|
"入参 ruleCode 对应本面返回的 code;enabled 是开关推断,可执行性看 executable/executableBasis;批量面的 failed 是**数组**,所以信封仍是 status:ok + partial:true(不是 partial 状态);跨模型 failed[] 每条带 schemaCode(模型不存在 → modelPresent:false,不发规则面请求)",
|
|
@@ -302,6 +303,10 @@ const READ_SHAPES = {
|
|
|
302
303
|
keys: ["status", "index:{page,size,totalElements,totalPages}", "logs:array<{ruleCode,name,triggerType,status,triggerTime,finishTime,ruleVersion,traceId,triggerRows[]}>", "emptyLogHint?", "notes", "environmentFingerprint"],
|
|
303
304
|
notes: ["查日志拿 0 条先想:流程绑定模型的 REST 写入不派发数据事件规则(平台行为,r68 对照实验实证——验证用无流程模型对照);CODING 模式不记日志;行内 status:false=失败(布尔);includeNodes:true 拿节点链(BIZ_ACTION errMsg=根因),traceId 对全链路", "includeNodes:true 时 logs[].nodes=节点级执行链(type/name/status/errMsg——仅前 3 条,BIZ_ACTION 的 errMsg 直接给根因);traceId 对平台全链路日志"],
|
|
304
305
|
},
|
|
306
|
+
"servicelog.search": {
|
|
307
|
+
keys: ["status", "window:{startTime,endTime,minutes,source}", "filters", "paging:{page,size,totalElements,totalPages,returned,hasMore,nextPage?,nextCommand?}", "rowFilter?:{schemaCode?,bizObjectId?,matched,returned,scannedPages,scannedElements,exhausted,moreLikely?,truncatedMatches?}", "logs:array<{startTime,endTime?,usedTime,code,methodName,status,statusName?,dataTitle,schemaCode,bizObjectId,rule?,params,paramsBytes,paramsTruncated?,result,resultBytes,resultTruncated?,detail?}>", "emptyHint?", "notes", "wire:{path,calls,rowsFetched}", "payloadFile?,payloadSha256?,payloadBytes?,payloadHint?", "environmentFingerprint"],
|
|
308
|
+
notes: ["默认窗口=最近 60 分钟;无任何过滤条件直接拒绝(servicelog-filter-required)——日志表无过滤查询会全表扫描超时", "code/methodName/dataTitle/时间/status 是服务端过滤(code/methodName 为 LIKE 包含,逗号=精确 IN);schemaCode/bizObjectId 是客户端匹配(平台列表端点没有这两个参数),rowFilter.exhausted:false 表示扫描被页数上限截断,未命中不代表没有", "params 平台入库上限 2000 字符(更长的已截断);params/result 单行摘要超过 240 字符或完整量 >4096B 时,完整内容在 payloadFile(jq 定向取回)", "日志异步落库,刚触发的调用可能晚数秒可见;>10 行时 logs 会被读面外置到 detailFile(truncatedKeys/omittedKeys 标注),形状不变"],
|
|
309
|
+
},
|
|
305
310
|
};
|
|
306
311
|
/** Lookup the authored return shape for a tool, if any. */
|
|
307
312
|
export function readShapeFor(toolName) {
|
|
@@ -496,7 +496,7 @@ const ruleBizactionInvokeService = Object.freeze({
|
|
|
496
496
|
expectedReadback: { readback: { published: true, enabled: false, next: "rule.enable → data.submit 触发 → data.load 读回目标字段" } },
|
|
497
497
|
refusalRecovery: [
|
|
498
498
|
{ code: "rule-graph-bizmethod-unresolved", action: "serviceCode/serviceMethodCode 必须是已注册服务(service.list);方法级详情 service.get" },
|
|
499
|
-
{ code: "rule-
|
|
499
|
+
{ code: "rule-mapping-field-absent", action: "inputMappings 的 bizCode 必须是来源模型(本模型或 QUERY 上游)已发布字段 code(field.list 核对;错误里带 did-you-mean);确知不存在仍要保存传 allowAbsentMappingFields:true" },
|
|
500
500
|
{ code: "rule-graph-bizaction-expression-missing", action: "codeType:7(EXPRESSION) 入参的计算规则放 bizCode(JSON 字符串,如 '{\"formula\":\"{amount}*0.13\"}'),不是 expressionValue" },
|
|
501
501
|
...commonRecovery,
|
|
502
502
|
],
|
package/dist/refusal-guidance.js
CHANGED
|
@@ -80,13 +80,14 @@ const SHAPE_GATES = Object.freeze({
|
|
|
80
80
|
correctShape: "每条 route {preNode, postNode, routeCondition:true};Start→首节点→…→End 必须连通",
|
|
81
81
|
recipeCommand: { tool: "rule.save", recipe: "business-rule-branch-conditional" },
|
|
82
82
|
},
|
|
83
|
-
"rule-
|
|
84
|
-
whatWentWrong: "
|
|
85
|
-
correctShape: "inputMappings 每条:serviceMethodParameterCode(服务方法参数)↔ bizCode
|
|
83
|
+
"rule-mapping-field-absent": {
|
|
84
|
+
whatWentWrong: "codeType:1 映射的 bizCode 不在来源模型(本模型或 QUERY 上游模型)的已发布字段清单(错误带该模型字段摘要 + didYouMean)",
|
|
85
|
+
correctShape: "inputMappings 每条:serviceMethodParameterCode(服务方法参数)↔ bizCode(已发布字段 code),codeType:1;平台侧不保证拦截(运行时静默 null→10005)",
|
|
86
86
|
recipeCommand: { tool: "rule.save", recipe: "rule-cross-model-create" },
|
|
87
87
|
missingInputs: [
|
|
88
88
|
{ name: "serviceCode/serviceMethodCode", source: "omc call bizservice.list --args '{}'(已注册的二开服务)" },
|
|
89
89
|
{ name: "bizCode(模型字段)", source: "omc call field.list --args '{\"schemaCode\":\"<模型>\",\"all\":true}'" },
|
|
90
|
+
{ name: "确知字段不存在仍要保存", source: "rule.save 传 allowAbsentMappingFields:true(逃生阀,回执 absentMappingFieldsAllowed 点名放行项)" },
|
|
90
91
|
],
|
|
91
92
|
},
|
|
92
93
|
"rule-graph-bizmethod-unresolved": {
|
|
@@ -114,7 +115,7 @@ const FIX_FIRST_GATES = Object.freeze({
|
|
|
114
115
|
"workflow-start-permission-denied": "40009 有三个独立同码原因:① 发起人角色没挂该流程的发起权限(ouScope ∩ 发起人部门链,全空会静默回退发起人);② 流程未启用/未发布;③ 模型未绑定流程。先 omc call workflow.permissions / workflow.get_published 核对;管理员发起成功带 bypassReason 时不证明白名单生效——换非管理员环境验证。不要反复换参数重试 data.submit",
|
|
115
116
|
"workflow-bound-to-listview": "303024 列表绑定了流程:直接粘贴回执 nextCommand(listview.configure:actions:[] + replaceActions:true + 现成 fieldCodes)解绑,再 workflow.delete;整体清理用 model-purge",
|
|
116
117
|
"workflow-start-permission-empty": "发起权限表为空:除平台管理员外无人能发起。用 workflow.addPermission 授给部门/角色/用户;管理员 data.submit 成功不证明白名单生效",
|
|
117
|
-
"environment-write-disabled": "当前环境 profile
|
|
118
|
+
"environment-write-disabled": "当前环境 profile 不可写:换可写环境;临时改一次配置用 `omc env writable <env> --ttl 10m --reason \"...\"`(有审计、到期自动恢复只读),`omc env writable <env> --close` 立即恢复——窗口只解除 writable 门,生产写仍需每笔 confirmProduction:true(两道门并存)",
|
|
118
119
|
"production-confirmation-required": "生产环境的写需要显式 confirmProduction:true——确认这次写入真的要落生产再加该参数,不要靠重试",
|
|
119
120
|
"app-not-published": "目标应用未发布:先 workflow/form/field 各面发布(或 app 级发布),再重试运行面操作",
|
|
120
121
|
"submit-workitem-not-mine": "该 workItem 不在当前登录人的待办里:用 omc call workitem.list --args '{\"status\":\"PENDING\"}' 拿**自己的** workItemId,不要用别人的 id 提交",
|