@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
|
@@ -69,6 +69,7 @@ export const WORKFLOW_WIRE = Object.freeze({
|
|
|
69
69
|
authoringChain: "workflow.create (header) → workflow.update (write draft template) → workflow.publish",
|
|
70
70
|
bindPoint: "startEventHandler|cancelEventHandler|activateEventHandler|endEventHandler{bizActions:[<ruleCode>], bizActionType:\"BIZ_RULE\"} (flow level; NODE level = activities[<activityCode>].{beforeActivate|afterActivate|endActivity|cancelActivity|activityApproved|activityRejected|jobSubmitted|jobRejected} with the same ActivityEventHandler shape)",
|
|
71
71
|
bindRuleChain: "workflow.bindRule reads the draft, merges the handler selected by `handler` (start|cancel|activate|end, default end — flow level) or by `activityCode` + `nodeEvent` (node level), workflow/update, then workflow/publish + published-face readback",
|
|
72
|
+
unbindRuleChain: "workflow.unbindRule mirrors workflow.bindRule's two target forms and REMOVES the listed ruleCodes from the handler's bizActions (others preserved); an emptied handler is written back as the platform's canonical unbound shape — handler object kept, bizActions/bizActionType null (WorkflowTemplateController's own template JSON; CollectionUtils.isEmpty treats null and [] alike). Absent codes are refused with the handler's existing codes (workflow-unbind-rule-absent). It NEVER disables the rule (it may be bound elsewhere — check rule.references kind=rule first).",
|
|
72
73
|
renderCompat: "workflow.update/publish/bindRule fail closed on 8.6.26 ActivityType values, unique non-empty activityCode values, rules references, and non-empty `x, y` points; missing points are derived from activity geometry and every write readback carries workflowRenderCompat with activities, rules, START/END, points, and danglingViolations",
|
|
73
74
|
bindRuleScope: "flow level: all four WorkflowTemplateModel event handlers (startEventHandler/cancelEventHandler/activateEventHandler/endEventHandler), each an ActivityEventHandler carrying bizActions + bizActionType=BIZ_RULE; `handler` defaults to end. node level: the eight ActivityEventHandler fields on each activity row (beforeActivate/afterActivate/endActivity/cancelActivity/activityApproved/activityRejected/jobSubmitted/jobRejected), selected by `activityCode` + `nodeEvent`",
|
|
74
75
|
boundRuleMustBeEnabled: "流程事件绑定的规则**必须启用**:禁用/未发布的规则(rule.save 落 DRAFT/DISABLED 态)绑到事件处理器后设计器显示「失效·未启用」且事件不会执行它(真机 2026-10-08 SCM 沙盒)。workflow.bindRule 会先把绑定的自定义规则 publish+enable(rule.enable 链,回读 enabledRuleCodes/alreadyEnabledRuleCodes),并对不存在的 code 报 workflow-bind-rule-absent",
|
|
@@ -108,6 +109,7 @@ export const WORKFLOW_LANE_CONTRACT = Object.freeze({
|
|
|
108
109
|
authoringChain: WORKFLOW_WIRE.authoringChain,
|
|
109
110
|
bindPoint: WORKFLOW_WIRE.bindPoint,
|
|
110
111
|
bindRuleChain: WORKFLOW_WIRE.bindRuleChain,
|
|
112
|
+
unbindRuleChain: WORKFLOW_WIRE.unbindRuleChain,
|
|
111
113
|
renderCompat: WORKFLOW_WIRE.renderCompat,
|
|
112
114
|
bindRuleScope: WORKFLOW_WIRE.bindRuleScope,
|
|
113
115
|
boundRuleMustBeEnabled: WORKFLOW_WIRE.boundRuleMustBeEnabled,
|
|
@@ -128,6 +130,7 @@ export const WORKFLOW_LANE_CONTRACT = Object.freeze({
|
|
|
128
130
|
authoringChain: Object.freeze([behaviorBinding("test/ticket-112-workflow-template-merge.test.ts#workflow.publish also merges onto the draft", assertWorkflowContract)]),
|
|
129
131
|
bindPoint: Object.freeze([emitterBinding("lanes/workflow-contract.WORKFLOW_EVENT_HANDLER_FIELDS", assertWorkflowContract)]),
|
|
130
132
|
bindRuleChain: Object.freeze([behaviorBinding("test/issue-14-workflow-bind-rule.test.ts#workflow.bindRule merges endEventHandler", assertWorkflowContract)]),
|
|
133
|
+
unbindRuleChain: Object.freeze([behaviorBinding("test/r85-workflow-unbind.test.ts#r85 unbind:flow 级解绑——命中/保留他绑/移空 canonical 态/absent 拒(issue 01)", assertWorkflowContract)]),
|
|
131
134
|
renderCompat: Object.freeze([behaviorBinding("test/ticket-112-workflow-template-merge.test.ts#workflow shorthand maps legal activities and derives points into workflowRenderCompat", assertWorkflowContract)]),
|
|
132
135
|
bindRuleScope: Object.freeze([behaviorBinding("test/issue-14-workflow-bind-rule.test.ts#workflow.bindRule binds start/cancel/end handlers independently", assertWorkflowContract)]),
|
|
133
136
|
boundRuleMustBeEnabled: Object.freeze([behaviorBinding("test/issue-14-workflow-bind-rule.test.ts#workflow.bindRule ENABLES a bound custom rule", assertWorkflowContract)]),
|
|
@@ -154,7 +157,7 @@ export const WORKFLOW_LANE_CONTRACT = Object.freeze({
|
|
|
154
157
|
}),
|
|
155
158
|
"workflow.get_published": Object.freeze({
|
|
156
159
|
scope: WORKFLOW_SCOPE,
|
|
157
|
-
description: "Read the current PUBLISHED workflow template (`/api/api/workflow/get_published`). **默认返回 workflowSummary(activities + ruleBindings),不是整份正文**;节点级规则绑定按活动投影在 `workflowSummary.activities[].bizActions`({节点事件:[规则码]};流程级看 ruleBindings
|
|
160
|
+
description: "Read the current PUBLISHED workflow template (`/api/api/workflow/get_published`). **默认返回 workflowSummary(activities + ruleBindings),不是整份正文**;节点级规则绑定按活动投影在 `workflowSummary.activities[].bizActions`({节点事件:[规则码]};流程级看 ruleBindings),SYSTEM_ACTIVITY 顶层绑定(规则绑在系统活动节点本身、激活时执行)看 `activities[].systemBizActions`——三个面看完再下「没绑」结论。完整正文加 --full,或 `--jq 'data.activities[code=<活动>].<节点事件>.bizActions'` 这类**叶子**路径——对父节点 data.activities 取值会再次被折叠。在 workflow.publish / workflow.bindRule 之后用它确认发布后的绑定点。",
|
|
158
161
|
}),
|
|
159
162
|
// R79 三期 T-A:应用内流程清单(注意:不能放在 tools 的首位——
|
|
160
163
|
// lane-contracts 的 assertDescriptionsDerive 用首个 tool 的 scope 匹配契约
|
|
@@ -181,7 +184,11 @@ export const WORKFLOW_LANE_CONTRACT = Object.freeze({
|
|
|
181
184
|
}),
|
|
182
185
|
"workflow.bindRule": Object.freeze({
|
|
183
186
|
scope: WORKFLOW_SCOPE,
|
|
184
|
-
description: "Bind a business rule to one of a workflow's event handlers (BIZ_RULE). **Flow level**: `handler` = `start`→startEventHandler, `cancel`→cancelEventHandler, `activate`→activateEventHandler, `end`→endEventHandler (default `end`). **Node level**(节点级事件): pass `activityCode` + `nodeEvent` instead of `handler`, one of `beforeActivate|afterActivate|endActivity|cancelActivity|activityApproved|activityRejected|jobSubmitted|jobRejected` (e.g. `{activityCode:\"Activity2\",nodeEvent:\"endActivity\"}` = 申请人提交离开该节点时). The two forms are mutually exclusive; `nodeEvent` without `activityCode`, or a code absent from the draft, is refused with the available codes. Reads the draft, merges `{ bizActions:[<ruleCode>], bizActionType:\"BIZ_RULE\" }` into the selected handler(节点级写到 `activities[i][nodeEvent]`,其余字段原样保留), writes via `/api/api/workflow/update`, publishes, and reads back the published face. **A workflow-bound rule MUST be enabled**(rule.save 落 DRAFT/DISABLED 的规则绑上后设计器显示「失效·未启用」且事件不执行它):本工具先把自定义规则 publish+enable,回读 `enabledRuleCodes`/`alreadyEnabledRuleCodes`;不存在的 code 报 `workflow-bind-rule-absent`。四个 flow handler 是 WorkflowTemplateModel 上同构的 ActivityEventHandler 字段。Pass `publish:false` to leave the template draft-only.",
|
|
187
|
+
description: "Bind a business rule to one of a workflow's event handlers (BIZ_RULE). **Flow level**: `handler` = `start`→startEventHandler, `cancel`→cancelEventHandler, `activate`→activateEventHandler, `end`→endEventHandler (default `end`). **Node level**(节点级事件): pass `activityCode` + `nodeEvent` instead of `handler`, one of `beforeActivate|afterActivate|endActivity|cancelActivity|activityApproved|activityRejected|jobSubmitted|jobRejected` (e.g. `{activityCode:\"Activity2\",nodeEvent:\"endActivity\"}` = 申请人提交离开该节点时). The two forms are mutually exclusive; `nodeEvent` without `activityCode`, or a code absent from the draft, is refused with the available codes. Reads the draft, merges `{ bizActions:[<ruleCode>], bizActionType:\"BIZ_RULE\" }` into the selected handler(节点级写到 `activities[i][nodeEvent]`,其余字段原样保留), writes via `/api/api/workflow/update`, publishes, and reads back the published face. **A workflow-bound rule MUST be enabled**(rule.save 落 DRAFT/DISABLED 的规则绑上后设计器显示「失效·未启用」且事件不执行它):本工具先把自定义规则 publish+enable,回读 `enabledRuleCodes`/`alreadyEnabledRuleCodes`;不存在的 code 报 `workflow-bind-rule-absent`。四个 flow handler 是 WorkflowTemplateModel 上同构的 ActivityEventHandler 字段。Pass `publish:false` to leave the template draft-only. 误绑撤销用 `workflow.unbindRule`(镜像本工具的两种目标形态做减法)。",
|
|
188
|
+
}),
|
|
189
|
+
"workflow.unbindRule": Object.freeze({
|
|
190
|
+
scope: WORKFLOW_SCOPE,
|
|
191
|
+
description: "Unbind business rules from a workflow event handler — the inverse of `workflow.bindRule`(bindRule 是 merge 语义,误绑此前只能导出整模板手改回写). Same two target forms: `handler`(flow 级 start|cancel|activate|end,缺省 end)或 `activityCode` + `nodeEvent`(八节点事件,与 bindRule 同枚举),二选一。从目标 handler 的 bizActions 里**只移除列出的 ruleCode(s)**,其余绑定原样保留;移空后按平台 canonical 未绑态写回(handler 对象保留、bizActions/bizActionType 置 null——平台判空 null 与 [] 等价)。ruleCode 不在该 handler 时报 `workflow-unbind-rule-absent`(带现有 codes)。**不自动 disable 规则**——规则可能还被其它流程/事件绑定着;确认无引用先 `rule.references kind=rule`,要停用再单独 `rule.disable`。写路径与 bindRule 同构:get_draft → workflow/update → publish → get_published 读回。Pass `publish:false` to leave the template draft-only.",
|
|
185
192
|
}),
|
|
186
193
|
"workflow.delete": Object.freeze({
|
|
187
194
|
scope: WORKFLOW_SCOPE,
|
|
@@ -262,6 +269,7 @@ export function assertWorkflowContract() {
|
|
|
262
269
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.publish", ["workflow/publish", "template"]);
|
|
263
270
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.setButtons", ["buttonPermission", "customBtns", "childTableBtns", "formButtonCodes", "form-button-absent", "publish:false"]);
|
|
264
271
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.bindRule", ["startEventHandler", "cancelEventHandler", "activateEventHandler", "endEventHandler", "bizActions", "bizActionType", "BIZ_RULE", "publish:false", "enabledRuleCodes", "workflow-bind-rule-absent", "activityCode", "nodeEvent", "endActivity", "activityApproved"]);
|
|
272
|
+
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.unbindRule", ["bizActions", "workflow-unbind-rule-absent", "publish:false", "activityCode", "nodeEvent", "rule.disable", "rule.references"]);
|
|
265
273
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.permissions", ["list_permission", "40009", "PART_VISIABLE"]);
|
|
266
274
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.addPermission", ["create_permission", "unitType", "unitId"]);
|
|
267
275
|
assertDescriptionCarries(WORKFLOW_LANE_CONTRACT, "workflow.removePermission", ["delete_permission", "permissionId"]);
|
|
@@ -300,6 +308,8 @@ export function assertWorkflowContract() {
|
|
|
300
308
|
throw new Error("workflow contract must pin the authoring chain ending in publish");
|
|
301
309
|
if (!WORKFLOW_WIRE.bindRuleChain.includes("workflow/update"))
|
|
302
310
|
throw new Error("workflow contract must pin the bind-rule write step");
|
|
311
|
+
if (!WORKFLOW_WIRE.unbindRuleChain.includes("workflow-unbind-rule-absent") || !WORKFLOW_WIRE.unbindRuleChain.includes("NEVER disables"))
|
|
312
|
+
throw new Error("workflow contract must pin the unbind-rule absent refusal and the no-auto-disable rule");
|
|
303
313
|
if (!WORKFLOW_WIRE.bindRuleScope.includes("startEventHandler") || !WORKFLOW_WIRE.bindRuleScope.includes("endEventHandler"))
|
|
304
314
|
throw new Error("workflow contract must pin the full event-handler scope");
|
|
305
315
|
if (!WORKFLOW_WIRE.boundRuleMustBeEnabled.includes("必须启用") || !WORKFLOW_WIRE.boundRuleMustBeEnabled.includes("rule.enable"))
|
|
@@ -17,6 +17,7 @@ export const WORKFLOW_COVERAGE = declareLaneCoverage(WORKFLOW_LANE_CONTRACT.lane
|
|
|
17
17
|
claim("workflow.update", T["workflow.update"].scope),
|
|
18
18
|
claim("workflow.publish", T["workflow.publish"].scope),
|
|
19
19
|
claim("workflow.bindRule", T["workflow.bindRule"].scope),
|
|
20
|
+
claim("workflow.unbindRule", T["workflow.unbindRule"].scope),
|
|
20
21
|
claim("workflow.setButtons", T["workflow.setButtons"].scope),
|
|
21
22
|
claim("workflow.delete", T["workflow.delete"].scope),
|
|
22
23
|
claim("workflow.permissions", T["workflow.permissions"].scope),
|