@stalfh233/omc-cli 0.4.21 → 0.4.22
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/cli.js +1 -1
- package/dist/lanes/rule-graph.js +5 -0
- package/dist/rule-support.js +13 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1447,7 +1447,7 @@ const request = requestId();
|
|
|
1447
1447
|
main().then((code) => {
|
|
1448
1448
|
// Commands that own their stdout never grow a trailing envelope. `--version`/
|
|
1449
1449
|
// `-V` are here because their short-circuit already wrote the bare version.
|
|
1450
|
-
if (argv[2] === "call" || argv[2] === "artifact" || argv[2] === "commands" || argv[2] === "describe" || argv[2] === "contract" || argv[2] === "capabilities" || argv[2] === "capability" || argv[2] === "next" || argv[2] === "usage" || argv[2] === "intent" || argv[2] === "help" || argv[2] === "--version" || argv[2] === "-V") {
|
|
1450
|
+
if (argv[2] === "call" || argv[2] === "script" || argv[2] === "artifact" || argv[2] === "commands" || argv[2] === "describe" || argv[2] === "contract" || argv[2] === "capabilities" || argv[2] === "capability" || argv[2] === "next" || argv[2] === "usage" || argv[2] === "intent" || argv[2] === "help" || argv[2] === "--version" || argv[2] === "-V") {
|
|
1451
1451
|
completeUsage(code);
|
|
1452
1452
|
finish(code);
|
|
1453
1453
|
return;
|
package/dist/lanes/rule-graph.js
CHANGED
|
@@ -1405,6 +1405,11 @@ export function validateRuleNodeGraph(graph, ruleCode, schemaCode) {
|
|
|
1405
1405
|
const endNodes = nodeRecords.filter((node) => node.nodeType === "END");
|
|
1406
1406
|
if (startNodes.length !== 1)
|
|
1407
1407
|
blockers.push({ code: "rule-graph-start-count", message: `必须恰好 1 个 START 节点(当前 ${startNodes.length})` });
|
|
1408
|
+
// r15 harness finding: a multi-node graph with ZERO routes saves fine but
|
|
1409
|
+
// the platform publish answers 550014 孤立节点 for every non-boundary node —
|
|
1410
|
+
// usually the caller passed the WRONG key (edges/from/to instead of
|
|
1411
|
+
// routes/preNode/postNode, which zod strips silently). Refuse locally, name
|
|
1412
|
+
// the right shape, save the publish round-trip.
|
|
1408
1413
|
if (endNodes.length < 1)
|
|
1409
1414
|
blockers.push({ code: "rule-graph-end-missing", message: "至少需要 1 个 END 节点" });
|
|
1410
1415
|
const systemPersistenceTypes = new Set(["SYSTEM_CREATE", "SYSTEM_UPDATE"]);
|
package/dist/rule-support.js
CHANGED
|
@@ -458,8 +458,19 @@ export async function executeRuleSaveWrite(session, args) {
|
|
|
458
458
|
validation: blockers,
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
|
-
const nodes = preparedGraph.nodes
|
|
462
|
-
const routes = preparedGraph.routes
|
|
461
|
+
const nodes = Array.isArray(preparedGraph.nodes) ? preparedGraph.nodes : [];
|
|
462
|
+
const routes = Array.isArray(preparedGraph.routes) ? preparedGraph.routes : [];
|
|
463
|
+
// r15 harness finding: a multi-node graph with ZERO routes SAVES fine but the
|
|
464
|
+
// platform publish answers 550014 孤立节点 for every non-boundary node — the
|
|
465
|
+
// usual cause is the WRONG edge key (edges/from/to instead of routes/
|
|
466
|
+
// preNode/postNode, silently stripped). Refuse at the save gate, name the
|
|
467
|
+
// right shape, save the publish round-trip.
|
|
468
|
+
if (nodes.length >= 2 && routes.length === 0)
|
|
469
|
+
throw new ToolRefusalError({
|
|
470
|
+
status: "refused",
|
|
471
|
+
blocker: "rule-graph-routes-empty",
|
|
472
|
+
message: `图有 ${nodes.length} 个节点但 0 条 routes——平台发布会判「孤立节点」(550014)。边用 routes:[{preNode:"Start",postNode:"UPDATE_1"},...](不是 edges/from/to,那会被静默剥掉)`,
|
|
473
|
+
});
|
|
463
474
|
await assertCreateSelectionCompatibility(session, args.schemaCode, Array.isArray(nodes) ? nodes : []);
|
|
464
475
|
await assertBizActionMappingFieldsExist(session, args.schemaCode, Array.isArray(nodes) ? nodes : []);
|
|
465
476
|
// Ticket 96: phantom-schema gate — BEFORE the first businessrule wire call
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stalfh233/omc-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.22",
|
|
4
4
|
"description": "CloudPivot 8.6 configuration capability CLI — governed, fail-closed, coverage-manifest bounded.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"commander": "14.0.3",
|
|
54
|
-
"omc-core": "0.4.
|
|
54
|
+
"omc-core": "0.4.22",
|
|
55
55
|
"proper-lockfile": "4.1.2",
|
|
56
56
|
"write-file-atomic": "6.0.0",
|
|
57
57
|
"zod": "^3.23.8",
|