@exaudeus/workrail 1.7.3 → 1.7.4
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/manifest.json +8 -8
- package/dist/mcp/handlers/v2-advance-core/index.d.ts +0 -1
- package/dist/mcp/handlers/v2-advance-core/index.js +8 -8
- package/dist/mcp/handlers/v2-advance-core/outcome-blocked.js +3 -3
- package/dist/mcp/handlers/v2-advance-core/outcome-success.js +3 -3
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
|
@@ -562,12 +562,12 @@
|
|
|
562
562
|
"bytes": 5774
|
|
563
563
|
},
|
|
564
564
|
"mcp/handlers/v2-advance-core/index.d.ts": {
|
|
565
|
-
"sha256": "
|
|
566
|
-
"bytes":
|
|
565
|
+
"sha256": "7a641c5419b4f273feff454d465bb5c5f3b2c349cc5e0032ab41ab3c3ebd033f",
|
|
566
|
+
"bytes": 3448
|
|
567
567
|
},
|
|
568
568
|
"mcp/handlers/v2-advance-core/index.js": {
|
|
569
|
-
"sha256": "
|
|
570
|
-
"bytes":
|
|
569
|
+
"sha256": "bcdaa5e283da9def40695b6c4b529b7dcc0861d748133377bb9ed62bdd28a2d2",
|
|
570
|
+
"bytes": 7107
|
|
571
571
|
},
|
|
572
572
|
"mcp/handlers/v2-advance-core/input-validation.d.ts": {
|
|
573
573
|
"sha256": "d736f163f6673b30f653c63336a287cdfe99c9f58b601c7220ce441590f802ba",
|
|
@@ -582,16 +582,16 @@
|
|
|
582
582
|
"bytes": 1014
|
|
583
583
|
},
|
|
584
584
|
"mcp/handlers/v2-advance-core/outcome-blocked.js": {
|
|
585
|
-
"sha256": "
|
|
586
|
-
"bytes":
|
|
585
|
+
"sha256": "78e3c2c6dd5352dfb90ec9a89aeab1692cdb3aea02f89522f34f748aa68a3487",
|
|
586
|
+
"bytes": 3400
|
|
587
587
|
},
|
|
588
588
|
"mcp/handlers/v2-advance-core/outcome-success.d.ts": {
|
|
589
589
|
"sha256": "da1bcf2d275ba9f1c0f073446f3c87b67394161b0b69c669f70c758bc597c8be",
|
|
590
590
|
"bytes": 936
|
|
591
591
|
},
|
|
592
592
|
"mcp/handlers/v2-advance-core/outcome-success.js": {
|
|
593
|
-
"sha256": "
|
|
594
|
-
"bytes":
|
|
593
|
+
"sha256": "e08268f3b8fd11213e67052721e231a6e055daa1dd4f729784f6ed3b20ddddb4",
|
|
594
|
+
"bytes": 5961
|
|
595
595
|
},
|
|
596
596
|
"mcp/handlers/v2-advance-events.d.ts": {
|
|
597
597
|
"sha256": "02cdb52a2c16dd619645b5496caf0880e57937bf21ea9efe44e6cd195cd43b94",
|
|
@@ -47,7 +47,6 @@ export interface AdvanceContext {
|
|
|
47
47
|
}
|
|
48
48
|
export interface ComputedAdvanceResults {
|
|
49
49
|
readonly reasons: readonly ReasonV1[];
|
|
50
|
-
readonly effectiveReasons: readonly ReasonV1[];
|
|
51
50
|
readonly outputRequirement: ReturnType<typeof getOutputRequirementStatusWithArtifactsV1>;
|
|
52
51
|
readonly validation: ValidationResult | undefined;
|
|
53
52
|
}
|
|
@@ -69,7 +69,7 @@ function executeAdvanceCore(args) {
|
|
|
69
69
|
suggestions: [(0, v2_execution_helpers_js_1.internalSuggestion)('Retry your submission with the same output.', 'The validation criteria for this step may be misconfigured.')],
|
|
70
70
|
};
|
|
71
71
|
const ctx = { truth, sessionId, runId, currentNodeId, attemptId, workflowHash, inputOutput, pinnedWorkflow, engineState, pendingStep };
|
|
72
|
-
const computed = { reasons
|
|
72
|
+
const computed = { reasons: effectiveReasons, outputRequirement, validation: evalValidation };
|
|
73
73
|
const portsLocal = { snapshotStore, sessionStore, sha256, idFactory };
|
|
74
74
|
return (0, outcome_blocked_js_1.buildBlockedOutcome)({ mode, snap, ctx, computed, lock, ports: portsLocal });
|
|
75
75
|
}
|
|
@@ -84,15 +84,15 @@ function executeAdvanceCore(args) {
|
|
|
84
84
|
const missingNotes = !v.notesOptional && !v.notesMarkdown?.trim()
|
|
85
85
|
? { stepId: v.pendingStep.stepId }
|
|
86
86
|
: undefined;
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
return errAsync({ kind: 'invariant_violation', message:
|
|
87
|
+
const rawReasonsRes = (0, blocking_decision_js_1.detectBlockingReasonsV1)({ outputRequirement, missingNotes });
|
|
88
|
+
if (rawReasonsRes.isErr()) {
|
|
89
|
+
return errAsync({ kind: 'invariant_violation', message: rawReasonsRes.error.message });
|
|
90
90
|
}
|
|
91
|
-
const
|
|
92
|
-
const { blocking:
|
|
93
|
-
const shouldBlockNow =
|
|
91
|
+
const rawReasons = rawReasonsRes.value;
|
|
92
|
+
const { blocking: reasons } = (0, risk_policy_guardrails_js_1.applyGuardrails)(v.riskPolicy, rawReasons);
|
|
93
|
+
const shouldBlockNow = reasons.length > 0 && (0, reason_model_js_1.shouldBlock)(v.autonomy, reasons);
|
|
94
94
|
const ctx = { truth, sessionId, runId, currentNodeId, attemptId, workflowHash, inputOutput, pinnedWorkflow, engineState, pendingStep };
|
|
95
|
-
const computed = { reasons,
|
|
95
|
+
const computed = { reasons, outputRequirement, validation };
|
|
96
96
|
const ports = { snapshotStore, sessionStore, sha256, idFactory };
|
|
97
97
|
if (shouldBlockNow) {
|
|
98
98
|
return (0, outcome_blocked_js_1.buildBlockedOutcome)({ mode, snap, ctx, computed, lock, ports });
|
|
@@ -9,9 +9,9 @@ const event_builders_js_1 = require("./event-builders.js");
|
|
|
9
9
|
function buildBlockedOutcome(args) {
|
|
10
10
|
const { mode, snap, lock, ports } = args;
|
|
11
11
|
const { truth, sessionId, runId, currentNodeId, attemptId, workflowHash } = args.ctx;
|
|
12
|
-
const { reasons,
|
|
12
|
+
const { reasons, outputRequirement, validation } = args.computed;
|
|
13
13
|
const { snapshotStore, sessionStore, sha256, idFactory } = ports;
|
|
14
|
-
const blockersRes = (0, reason_model_js_1.buildBlockerReport)(
|
|
14
|
+
const blockersRes = (0, reason_model_js_1.buildBlockerReport)(reasons);
|
|
15
15
|
if (blockersRes.isErr()) {
|
|
16
16
|
return errAsync({ kind: 'invariant_violation', message: blockersRes.error.message });
|
|
17
17
|
}
|
|
@@ -37,7 +37,7 @@ function buildBlockedOutcome(args) {
|
|
|
37
37
|
const extraEventsToAppend = [validationEventRes.value];
|
|
38
38
|
const primaryReason = reasons[0];
|
|
39
39
|
if (!primaryReason) {
|
|
40
|
-
return errAsync({ kind: 'invariant_violation', message: 'shouldBlockNow=true requires at least one reason' });
|
|
40
|
+
return errAsync({ kind: 'invariant_violation', message: 'shouldBlockNow=true requires at least one effective reason (post-guardrails)' });
|
|
41
41
|
}
|
|
42
42
|
const blockedSnapshotRes = (0, blocked_node_builder_js_1.buildBlockedNodeSnapshot)({
|
|
43
43
|
priorSnapshot: snap,
|
|
@@ -18,7 +18,7 @@ function successNodeKind(mode) {
|
|
|
18
18
|
function buildSuccessOutcome(args) {
|
|
19
19
|
const { mode, v, lock, ports } = args;
|
|
20
20
|
const { truth, sessionId, runId, currentNodeId, attemptId, workflowHash, inputOutput, pinnedWorkflow, engineState, pendingStep } = args.ctx;
|
|
21
|
-
const {
|
|
21
|
+
const { reasons, outputRequirement, validation } = args.computed;
|
|
22
22
|
const { snapshotStore, sessionStore, sha256, idFactory } = ports;
|
|
23
23
|
const compiler = new workflow_compiler_js_1.WorkflowCompiler();
|
|
24
24
|
const interpreter = new workflow_interpreter_js_1.WorkflowInterpreter();
|
|
@@ -48,9 +48,9 @@ function buildSuccessOutcome(args) {
|
|
|
48
48
|
}
|
|
49
49
|
const out = nextRes.value;
|
|
50
50
|
const extraEventsToAppend = [];
|
|
51
|
-
if (v.autonomy === 'full_auto_never_stop' &&
|
|
51
|
+
if (v.autonomy === 'full_auto_never_stop' && reasons.length > 0) {
|
|
52
52
|
extraEventsToAppend.push(...(0, v2_advance_events_js_1.buildGapEvents)({
|
|
53
|
-
gaps:
|
|
53
|
+
gaps: reasons,
|
|
54
54
|
sessionId: String(sessionId),
|
|
55
55
|
runId,
|
|
56
56
|
nodeId: currentNodeId,
|