@stalfh233/omc-cli 0.6.62 → 0.6.64
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/goal-routes.js +26 -3
- package/dist/lanes/report.js +1 -1
- package/dist/lanes/rule-lifecycle.js +5 -1
- package/dist/read-shapes.js +2 -2
- package/dist/refusal-guidance.js +11 -1
- package/dist/residue.js +8 -0
- package/dist/rule-support.js +21 -0
- package/dist/workflow-support.js +2 -0
- package/package.json +3 -3
package/dist/goal-routes.js
CHANGED
|
@@ -784,7 +784,25 @@ function goalRouteInner(registry, goal) {
|
|
|
784
784
|
// 聚合/计数问句的正确答案:data 能力**没有 group-by 工具**,诚实指路
|
|
785
785
|
// data.list 拉全量 + `--jq` 投影自行计数;跨模型/大结果集才涉及报表章节。
|
|
786
786
|
// 放在能力打分前,聚合词不再落进任何写阶梯(cue「分组」已从 app 移除)。
|
|
787
|
-
|
|
787
|
+
// r70 探针02-F11:前提曾依赖 readish(mode 已判 read)——「把客户模型的数据按
|
|
788
|
+
// **创建**人统计条数」被 formula 字段 cue 抢判 build/composer(问公式字段=写面),
|
|
789
|
+
// 聚合专项不触发。聚合/计数词本身就是强读信号,直达不依赖 mode 前判
|
|
790
|
+
// (WRITE_DESTINATION 否决保留)。
|
|
791
|
+
// r70 门红教训:「条数(?!据)」——「保存并启用一条数据事件规则」的「一条数」
|
|
792
|
+
// 含子串「条数」,裸「条数」会把数据事件规则的写问句劫进聚合读路径。
|
|
793
|
+
const AGGREGATE_ASK = /(统计|分组|汇总|聚合|计数|条数(?!据)|多少条|有几条|数一下)/;
|
|
794
|
+
// r70 门红(ticket04 G3 + r66 c-F4 两案):「设备模型**要**汇总…」(formula 写意图)
|
|
795
|
+
// 和「**建**报表…汇总图」(report 写链)都带聚合词——直达分支劫走了它们的 recipe
|
|
796
|
+
// 首答。写意图否决(助动词 + BUILD/MODIFY 显式写动词任一命中即否决直达);
|
|
797
|
+
// 「把客户模型的数据按创建人统计」无任何写词,直达仍生效。readish 原语义不变。
|
|
798
|
+
const WRITE_INTENT_AUX = /(要|想|帮我|需要)/;
|
|
799
|
+
// 「按创建人统计」的「创建」是子串误触(创建人/创建时间/创建日期都是常见聚合维度)
|
|
800
|
+
// ——「按 X 统计/分组」结构本身就是读聚合的强信号,绕过写词子串否决。
|
|
801
|
+
const aggregateByDimension = /按.{1,12}(统计|分组|汇总|聚合)/.test(goal);
|
|
802
|
+
const directAggregate = AGGREGATE_ASK.test(goal) && !WRITE_INTENT_AUX.test(goal) &&
|
|
803
|
+
(aggregateByDimension || (!BUILD_CUES.some((cue) => goal.includes(cue)) && !MODIFY_CUES.some((cue) => goal.includes(cue)))) &&
|
|
804
|
+
!WRITE_DESTINATION.test(goal);
|
|
805
|
+
if ((readish || directAggregate) && AGGREGATE_ASK.test(goal) && !WRITE_DESTINATION.test(goal)) {
|
|
788
806
|
const dataRoute = routeById.get("data");
|
|
789
807
|
if (dataRoute !== undefined) {
|
|
790
808
|
const readTools = readToolsInLane(registry, dataRoute.lane);
|
|
@@ -1372,7 +1390,12 @@ function goalRouteInner(registry, goal) {
|
|
|
1372
1390
|
: readish
|
|
1373
1391
|
? capabilityId === "model"
|
|
1374
1392
|
? { firstAnswer: { state: "ready", action: LIST_MODELS_ACTION, why: "问的就是模型清单本身:model.list 一次调用直接回答" } }
|
|
1375
|
-
:
|
|
1393
|
+
: goal.match(/(失败|报错|执行过|执行记录|什么时候跑|触发了吗)/) && ["businessrule", "datarule", "rule-lifecycle"].includes(capabilityId)
|
|
1394
|
+
// r70 探针02-F2:「查最近哪些规则执行失败」的 firstAnswer 索要 schemaCode 之外
|
|
1395
|
+
// 只给 model.list——排查类问句的起手工具是 rulelog.search(探针自行改判多 1 轮)。
|
|
1396
|
+
// 「规则」cue 可能打到 datarule/businessrule/rule-lifecycle 任一,全族收口。
|
|
1397
|
+
? { firstAnswer: { state: "needs-input", question: "查哪个模型的规则日志?给我 schemaCode(或业务名)", action: `omc call rulelog.search --args '{"schemaCode":"<模型code>"}'`, why: "排查/失败/执行记录类问句:rulelog.search 是起手工具(带 includeNodes:true 拿节点级根因;全局跨模型失败扫描暂无专工具,逐模型查)" } }
|
|
1398
|
+
: { firstAnswer: { state: "needs-input", question: "要查看哪个对象?给我 schemaCode(或业务名,我列清单核对)", action: LIST_MODELS_ACTION, why: `读路径命中能力 ${capabilityId}:readTools 已内联,只差目标对象 code` } }
|
|
1376
1399
|
: recipeCommand !== undefined
|
|
1377
1400
|
? { firstAnswer: { state: "ready", action: recipeCommand, why: `命中配方 ${recipe.recipe}:describe 首答自带 firstCall 形状,代入你的 schemaCode/字段 code 即可执行` } }
|
|
1378
1401
|
: { firstAnswer: { state: "needs-input", question: "要操作哪个对象?给我 schemaCode(或模型业务名,我列清单核对)", action: LIST_MODELS_ACTION, why: "未命中配方:需要目标对象 code 才能给出一步可跑的写命令" } }),
|
|
@@ -1395,7 +1418,7 @@ function capabilityOrder(capabilityId) {
|
|
|
1395
1418
|
// chartdata 是取数一跳(环境边界:reporter 版本族须对齐主应用,8.6 环境见
|
|
1396
1419
|
// r63 教学信封)——单列注记而不是塞进 order(它不是配置链的一环)。
|
|
1397
1420
|
if (capabilityId === "report") {
|
|
1398
|
-
return { order, orderNote: "执行顺序见 order(tools 的键序是注册序,勿按它排步骤);chartdata 是取数一跳:需 reporter
|
|
1421
|
+
return { order, orderNote: "执行顺序见 order(tools 的键序是注册序,勿按它排步骤);chartdata 是取数一跳:需 reporter 版本族对齐主应用,环境边界,换参数/重试无用;**取数断时绕行:omc describe data.list --example report-chart-verify-numeric**(data.list 拉数本地聚合对照)" };
|
|
1399
1422
|
}
|
|
1400
1423
|
return { order };
|
|
1401
1424
|
}
|
package/dist/lanes/report.js
CHANGED
|
@@ -862,7 +862,7 @@ export function registerReportLane(tools) {
|
|
|
862
862
|
...(biResidue !== undefined ? { biResidue } : {}),
|
|
863
863
|
...(biResidueNote !== undefined ? { biResidueNote } : {}),
|
|
864
864
|
removedClean,
|
|
865
|
-
verdictNote: "删干净主判据=removedClean(平台树已无该 code 且 BI 无残留)。各键归各面:absent/remainingInTree=平台树;biRemoved=BI 删除请求已执行(≠删净);biResidue=删后 BI 仍可读(平台无 purge 面,处置见 biResidueNote
|
|
865
|
+
verdictNote: "删干净主判据=removedClean(平台树已无该 code 且 BI 无残留)。各键归各面:absent/remainingInTree=平台树;biRemoved=BI 删除请求已执行(≠删净);biResidue=删后 BI 仍可读(平台无 purge 面,处置见 biResidueNote);platformRemoved=平台逻辑删请求已执行(≠行不可读——行仍可被 report.get 读到,看 treeVisibility:not-listed 判读)。",
|
|
866
866
|
...(degraded !== undefined ? { degraded } : {}),
|
|
867
867
|
},
|
|
868
868
|
};
|
|
@@ -3,7 +3,7 @@ import { ENDPOINTS } from "../endpoints.js";
|
|
|
3
3
|
import { writeTool } from "../write.js";
|
|
4
4
|
import { registerPackageTool } from "../package-tool.js";
|
|
5
5
|
import { writeSummary } from "../human-summary.js";
|
|
6
|
-
import { executeRuleSaveWrite, ruleNodeGraphArg, assertRuleSchemaExists, explainRuleSelfCheck } from "../rule-support.js";
|
|
6
|
+
import { executeRuleSaveWrite, ruleNodeGraphArg, assertRuleSchemaExists, explainRuleSelfCheck, modelWorkflowDispatchWarning } from "../rule-support.js";
|
|
7
7
|
import { ToolRefusalError } from "../tool-types.js";
|
|
8
8
|
import { prepareRuleGraph, validateRuleNodeGraph, PLATFORM_TRIGGER_RULE_CODES } from "./rule-graph.js";
|
|
9
9
|
import { wireCall, wireRows, WireError } from "../wire.js";
|
|
@@ -169,6 +169,9 @@ export async function executeRuleEnableWrite(session, args) {
|
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
const statusLag = draftStatus !== null && draftStatus !== "ENABLED";
|
|
172
|
+
// r69 探针 F6:配置回执(enabled/verified 全绿)不预警「绑流程模型 REST 写不派发」——
|
|
173
|
+
// 探针失败 3 次才在 rulelog 的 emptyLogHint 里读到边界。enable 面同样要预警。
|
|
174
|
+
const dispatchWarning = await modelWorkflowDispatchWarning(session, args.schemaCode);
|
|
172
175
|
return {
|
|
173
176
|
performed: { errcode: published.errcode, enableErrcode, ...(alreadyEnabled ? { alreadyEnabled: true } : {}) },
|
|
174
177
|
readback: {
|
|
@@ -180,6 +183,7 @@ export async function executeRuleEnableWrite(session, args) {
|
|
|
180
183
|
executable: true,
|
|
181
184
|
verified: true,
|
|
182
185
|
...(statusLag ? { statusLag: true, statusNote: "DRAFT status 列仍非 ENABLED(平台滞后常见);enabled=true 才是分发真相" } : {}),
|
|
186
|
+
...dispatchWarning,
|
|
183
187
|
source: "draft-get+list",
|
|
184
188
|
effectHint: "executable/verified 以 DRAFT get.enabled 为准;listEnabled 来自 PUBLISH 投影。rule.run 前若仍拒,再 rule.get 看 draftStatus",
|
|
185
189
|
},
|
package/dist/read-shapes.js
CHANGED
|
@@ -216,8 +216,8 @@ const READ_SHAPES = {
|
|
|
216
216
|
// r67 探针01(真机实证):removeReport 回执成功 ≠ 删净——BI dashboard 删除
|
|
217
217
|
// 残留,平台无单面 purge API。r68 报表面闭环:delete readback 增 biResidue
|
|
218
218
|
// (删除后再读一次 BI config 判 present),biRemoved 只是回执口径。
|
|
219
|
-
keys: ["status", "readback:{absent,remainingInTree,biRemoved,platformRemoved,biResidue,biResidueNote
|
|
220
|
-
notes: ["
|
|
219
|
+
keys: ["status", "readback:{absent,remainingInTree,biRemoved,platformRemoved,biResidue,biResidueNote?,removedClean,alreadyDeleted?,verdictNote}", "rollback"],
|
|
220
|
+
notes: ["删干净主判据=removedClean(=平台树已无且 !biResidue——r69 探针 F28:remainingInTree:false ≠ 删净,BI 残留时它仍 false);二次删除回 alreadyDeleted 幂等;biResidue:true=BI 残留(平台无 purge 面,绕行=换 code 或 BI 前端手动清)"],
|
|
221
221
|
},
|
|
222
222
|
// r67a:真机采样(2026-11-15,crm_contract 545 条日志面)
|
|
223
223
|
"rulelog.search": {
|
package/dist/refusal-guidance.js
CHANGED
|
@@ -181,7 +181,7 @@ function dashboardBoundaryGuidance() {
|
|
|
181
181
|
function dashboardVersionFamilyGuidance() {
|
|
182
182
|
return {
|
|
183
183
|
whatWentWrong: "报表服务已连通,但取数一跳失败——reporter 与主应用版本族不匹配(r63 实证:reporter 6.2.0.45 ↔ 主应用 8.6,connstring 握手 SM4 解密链断裂,conn.string.empty)",
|
|
184
|
-
fixFirst: "这是环境边界,不是参数错:换参数/重试无用。设计链全部可用(report.create/tree/get/datasource.link/configure 均真机验证过)——配置已落库,取数要等 reporter 版本对齐主应用(升级 reporter 镜像)。核对配置用 report.get 的 bi.charts",
|
|
184
|
+
fixFirst: "这是环境边界,不是参数错:换参数/重试无用。设计链全部可用(report.create/tree/get/datasource.link/configure 均真机验证过)——配置已落库,取数要等 reporter 版本对齐主应用(升级 reporter 镜像)。核对配置用 report.get 的 bi.charts。**绕行取数:omc describe data.list --example report-chart-verify-numeric**(拉全量本地聚合对照图表定义,r69 探针 F21:绕行教学曾藏在不相干工具的示例里)",
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
187
|
function mentionsDashboardChannel(payload) {
|
|
@@ -209,6 +209,16 @@ export function refusalRecovery(blocker, payload, options = {}) {
|
|
|
209
209
|
// not overwritten — single owner per envelope.
|
|
210
210
|
if (payload.recovery !== undefined)
|
|
211
211
|
return payload.recovery;
|
|
212
|
+
// r70 探针01-F5/F12:同 code 重建撞 601012「模型编码已存在于回收站」——裸 wire-business
|
|
213
|
+
// 只给 help 指针,探针自己挖出语义。回收站残留正是 removedClean:false 的实体面
|
|
214
|
+
// (report.delete 后平台树干净但回收站仍占 code),在这教清楚。
|
|
215
|
+
const text0 = JSON.stringify({ m: payload.message, d: payload.detail, c: payload.errcode });
|
|
216
|
+
if (/601012|回收站/.test(text0)) {
|
|
217
|
+
return {
|
|
218
|
+
whatWentWrong: "该 code 在平台回收站里还有残留(report.delete 删除/其它资源删除后进了回收站,code 仍被占用)——这正是删除回执 removedClean:false 的实体面",
|
|
219
|
+
fixFirst: "处置三选一:① 换一个 code 重建(最快,不动回收站);② 门户「回收站」里物理删除该条目后原 code 可用;③ 保留残留用现名(先 report.get 核对 treeVisibility)。不要反复重试同 code——回收站不清空它就一直占。",
|
|
220
|
+
};
|
|
221
|
+
}
|
|
212
222
|
// r19 p14: the report BI boundary is matched from the wire path in the
|
|
213
223
|
// message/detail, so both refused and frozen (uncertain) envelopes teach it.
|
|
214
224
|
if (mentionsDashboardChannel(payload)) {
|
package/dist/residue.js
CHANGED
|
@@ -110,6 +110,11 @@ export async function scanResidues(session, prefix, options = {}) {
|
|
|
110
110
|
const hasOtherResidue = faces.some((item) => item.face !== "model" && item.count > 0);
|
|
111
111
|
const pendingCascade = !hasModelResidue && hasOtherResidue;
|
|
112
112
|
const nonZeroFaces = faces.filter((item) => item.count > 0);
|
|
113
|
+
// r69 探针 F26:--all-faces 连 report 面占位都不列——「全量清单」缺未扫面会显得
|
|
114
|
+
// 覆盖完整。占位行 count 置 -1 语义化 not-scanned(不并入 totalResidues)。
|
|
115
|
+
if (options.allFaces === true) {
|
|
116
|
+
faces.push({ face: "report", count: -1, items: [], note: "not-scanned——报表残留判定用 report.tree(树)+ report.get(BI 残留看 readback.biResidue)" });
|
|
117
|
+
}
|
|
113
118
|
const compact = options.allFaces === true ? faces : nonZeroFaces;
|
|
114
119
|
return {
|
|
115
120
|
prefix,
|
|
@@ -122,6 +127,9 @@ export async function scanResidues(session, prefix, options = {}) {
|
|
|
122
127
|
// coverage 逐面标注,未扫面不得读作「零残留」。
|
|
123
128
|
clean: userResidues === 0 && !pendingCascade,
|
|
124
129
|
cleanWithinScannedFaces: userResidues === 0 && !pendingCascade,
|
|
130
|
+
// r70 探针01-F7:真残留存在时顶层 clean:true 仍误导(coverage 在深处,首屏只看
|
|
131
|
+
// clean)——caveat 常驻顶层,紧贴 clean 键。
|
|
132
|
+
cleanCaveat: "clean 仅指已扫描面;report 面未扫描(报表资源残留用 report.tree + report.get 判)",
|
|
125
133
|
coverage: { report: "not-scanned(用 report.tree + report.get 判,BI 残留看 readback.biResidue)", workflow: "模板跟模型走(模型删即删)" },
|
|
126
134
|
...(systemPresetCount > 0 ? { systemPresetCount } : {}),
|
|
127
135
|
...(pendingCascade ? { pendingCascade: true } : {}),
|
package/dist/rule-support.js
CHANGED
|
@@ -826,6 +826,25 @@ export async function explainRuleSelfCheck(session, model) {
|
|
|
826
826
|
return { nodeChecks: [] };
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
|
+
/**
|
|
830
|
+
* r69 探针 F6(「本轮最重:证明链断在第一跳」):规则配置回执全绿(enabled/
|
|
831
|
+
* effectiveNow),但模型绑定流程时 REST 写入根本不派发数据事件规则——该边界此前只在
|
|
832
|
+
* rulelog 拿 0 条的 emptyLogHint 里(要失败 3 次+想到查日志才读到)。配置面就要预警。
|
|
833
|
+
* best-effort:isworkflow 一次轻量查询,失败不挂键。
|
|
834
|
+
*/
|
|
835
|
+
export async function modelWorkflowDispatchWarning(session, schemaCode) {
|
|
836
|
+
try {
|
|
837
|
+
const isWorkflow = (await wireCall(session, { path: ENDPOINTS.workflowIsWorkflow, query: { schemaCode } })).data === true;
|
|
838
|
+
if (!isWorkflow)
|
|
839
|
+
return {};
|
|
840
|
+
return {
|
|
841
|
+
dispatchWarning: "本模型绑定流程:数据事件规则(Create/Update/Delete 预置触发)在 REST 写入面(data.save/update/submit)**不派发**(平台行为,r68 对照实验实证)——本回执的 enabled/effectiveNow 只说明配置生效,不说明会被触发。验证规则生效:改配到无流程模型对照,或走门户提交;查证日志用 rulelog.search(0 条时见 emptyLogHint)。",
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
catch {
|
|
845
|
+
return {};
|
|
846
|
+
}
|
|
847
|
+
}
|
|
829
848
|
export async function executeRuleSaveWrite(session, args) {
|
|
830
849
|
// Pre-flight dry lint (ticket 14): a mis-shaped graph must be refused BEFORE
|
|
831
850
|
// any wire call, with structured blockers locating the node/key — never
|
|
@@ -1156,6 +1175,7 @@ export async function executeRuleSaveWrite(session, args) {
|
|
|
1156
1175
|
effectiveNow,
|
|
1157
1176
|
effectiveBasis,
|
|
1158
1177
|
latestPublished: effective?.latestPublished,
|
|
1178
|
+
...(await modelWorkflowDispatchWarning(session, args.schemaCode)),
|
|
1159
1179
|
...(existing?.id ? { versionNote } : {}),
|
|
1160
1180
|
...(enabled ? {} : { nextAction: "rule.enable(businessrule/publish + businessrule/enable 两步)后规则才会分发并对流程/按钮可见;publish:true 只写入版本" }),
|
|
1161
1181
|
},
|
|
@@ -1183,6 +1203,7 @@ export async function executeRuleSaveWrite(session, args) {
|
|
|
1183
1203
|
previousRuleVersion,
|
|
1184
1204
|
effectiveNow: false,
|
|
1185
1205
|
effectiveBasis: "本次只写 DRAFT,未发布;rule.enable(或 publish:true 后再 enable)才会让本次图成为当前运行图",
|
|
1206
|
+
...(await modelWorkflowDispatchWarning(session, args.schemaCode)),
|
|
1186
1207
|
latestPublished: effective?.latestPublished,
|
|
1187
1208
|
...(existing?.id ? { versionNote } : {}),
|
|
1188
1209
|
nextAction: saveNotEffectiveNextAction,
|
package/dist/workflow-support.js
CHANGED
|
@@ -170,6 +170,8 @@ export function diagnoseInstanceActivity(input) {
|
|
|
170
170
|
checks: [
|
|
171
171
|
"看上面 participants 为空的审批节点——参与人解析为空是最常见的静默停滞原因",
|
|
172
172
|
"参与人优先用参与者对象数组(角色 id);内置函数只认 FindUserByRole(org, roleCode[, order])",
|
|
173
|
+
// r69 探针 F12:角色没人 vs 函数名错——区分路径要在断点上给。
|
|
174
|
+
"区分「角色没人」vs「函数名/配置错」:omc call org.role.users --args '{\"roleCode\":\"<节点角色>\"}'——members 空=角色没人(往角色加人),报角色不存在=配置错",
|
|
173
175
|
"需要平台日志时看容器日志的 GetParticipantInfo error / CustomParticipleMethod{...} -> []",
|
|
174
176
|
"修复参与人后重新走链:data.save(带 workflowCode,流程草稿)→ data.submit 三件套",
|
|
175
177
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.64",
|
|
4
4
|
"description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"commander": "14.0.3",
|
|
59
|
-
"omc-core": "0.6.
|
|
59
|
+
"omc-core": "0.6.64",
|
|
60
60
|
"proper-lockfile": "4.1.2",
|
|
61
61
|
"write-file-atomic": "6.0.0",
|
|
62
62
|
"zod": "^3.23.8",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"directory": "packages/omc-cli"
|
|
75
75
|
},
|
|
76
76
|
"optionalDependencies": {
|
|
77
|
-
"@stalfh233/omc-fake-platform": "0.6.
|
|
77
|
+
"@stalfh233/omc-fake-platform": "0.6.64"
|
|
78
78
|
}
|
|
79
79
|
}
|