@stalfh233/omc-cli 0.6.63 → 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.
@@ -784,7 +784,25 @@ function goalRouteInner(registry, goal) {
784
784
  // 聚合/计数问句的正确答案:data 能力**没有 group-by 工具**,诚实指路
785
785
  // data.list 拉全量 + `--jq` 投影自行计数;跨模型/大结果集才涉及报表章节。
786
786
  // 放在能力打分前,聚合词不再落进任何写阶梯(cue「分组」已从 app 移除)。
787
- if (readish && /(统计|分组|汇总|聚合|计数|条数|多少条|有几条|数一下)/.test(goal) && !WRITE_DESTINATION.test(goal)) {
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
- : { firstAnswer: { state: "needs-input", question: "要查看哪个对象?给我 schemaCode(或业务名,我列清单核对)", action: LIST_MODELS_ACTION, why: `读路径命中能力 ${capabilityId}:readTools 已内联,只差目标对象 code` } }
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 才能给出一步可跑的写命令" } }),
@@ -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
@@ -127,6 +127,9 @@ export async function scanResidues(session, prefix, options = {}) {
127
127
  // coverage 逐面标注,未扫面不得读作「零残留」。
128
128
  clean: userResidues === 0 && !pendingCascade,
129
129
  cleanWithinScannedFaces: userResidues === 0 && !pendingCascade,
130
+ // r70 探针01-F7:真残留存在时顶层 clean:true 仍误导(coverage 在深处,首屏只看
131
+ // clean)——caveat 常驻顶层,紧贴 clean 键。
132
+ cleanCaveat: "clean 仅指已扫描面;report 面未扫描(报表资源残留用 report.tree + report.get 判)",
130
133
  coverage: { report: "not-scanned(用 report.tree + report.get 判,BI 残留看 readback.biResidue)", workflow: "模板跟模型走(模型删即删)" },
131
134
  ...(systemPresetCount > 0 ? { systemPresetCount } : {}),
132
135
  ...(pendingCascade ? { pendingCascade: true } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stalfh233/omc-cli",
3
- "version": "0.6.63",
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.63",
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.63"
77
+ "@stalfh233/omc-fake-platform": "0.6.64"
78
78
  }
79
79
  }