@exaudeus/workrail 3.22.0 → 3.24.0
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/application/services/workflow-interpreter.js +14 -5
- package/dist/console/assets/{index-e4cUjvJj.css → index-ByW7d9qr.css} +1 -1
- package/dist/console/assets/{index-BjnOsG8b.js → index-CWETdPGj.js} +9 -9
- package/dist/console/index.html +2 -2
- package/dist/manifest.json +13 -13
- package/dist/v2/durable-core/domain/decision-trace-builder.d.ts +4 -0
- package/dist/v2/durable-core/domain/decision-trace-builder.js +97 -0
- package/package.json +1 -1
package/dist/console/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>WorkRail Console</title>
|
|
7
|
-
<script type="module" crossorigin src="/console/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/console/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/console/assets/index-CWETdPGj.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/console/assets/index-ByW7d9qr.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/dist/manifest.json
CHANGED
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
"bytes": 1507
|
|
143
143
|
},
|
|
144
144
|
"application/services/workflow-interpreter.js": {
|
|
145
|
-
"sha256": "
|
|
146
|
-
"bytes":
|
|
145
|
+
"sha256": "860a147051cb6cf36720c18a30c5c6f62c7868c4dd9a0f98e413fda0b0d205a5",
|
|
146
|
+
"bytes": 22145
|
|
147
147
|
},
|
|
148
148
|
"application/services/workflow-service.d.ts": {
|
|
149
149
|
"sha256": "c9c9e2ab4396c46da0f12af93133ca1e7da94bdc88f67a074d8f6c43ef0a5b3b",
|
|
@@ -369,16 +369,16 @@
|
|
|
369
369
|
"sha256": "5fe866e54f796975dec5d8ba9983aefd86074db212d3fccd64eed04bc9f0b3da",
|
|
370
370
|
"bytes": 8011
|
|
371
371
|
},
|
|
372
|
-
"console/assets/index-
|
|
373
|
-
"sha256": "
|
|
374
|
-
"bytes":
|
|
372
|
+
"console/assets/index-ByW7d9qr.css": {
|
|
373
|
+
"sha256": "1336e0c417833c4fff933ac519b763ab5945ef86c97d25e31c2f82d83b45d0c1",
|
|
374
|
+
"bytes": 59845
|
|
375
375
|
},
|
|
376
|
-
"console/assets/index-
|
|
377
|
-
"sha256": "
|
|
378
|
-
"bytes":
|
|
376
|
+
"console/assets/index-CWETdPGj.js": {
|
|
377
|
+
"sha256": "01ac1ee867b8260ea371d73fee41187368253ac60299ed94846dbcaf1317182d",
|
|
378
|
+
"bytes": 742813
|
|
379
379
|
},
|
|
380
380
|
"console/index.html": {
|
|
381
|
-
"sha256": "
|
|
381
|
+
"sha256": "26f9f87ae94cb739151d893db85be046dc4fe015d30306f80f4ca8e04e375a48",
|
|
382
382
|
"bytes": 417
|
|
383
383
|
},
|
|
384
384
|
"core/error-handler.d.ts": {
|
|
@@ -1622,12 +1622,12 @@
|
|
|
1622
1622
|
"bytes": 962
|
|
1623
1623
|
},
|
|
1624
1624
|
"v2/durable-core/domain/decision-trace-builder.d.ts": {
|
|
1625
|
-
"sha256": "
|
|
1626
|
-
"bytes":
|
|
1625
|
+
"sha256": "f897dd17019bb094c72b1b19d7e731d535f66256ae38a0b08646d2604be0663d",
|
|
1626
|
+
"bytes": 2314
|
|
1627
1627
|
},
|
|
1628
1628
|
"v2/durable-core/domain/decision-trace-builder.js": {
|
|
1629
|
-
"sha256": "
|
|
1630
|
-
"bytes":
|
|
1629
|
+
"sha256": "478a50a6b530248a46359d589611c640683fd3f754c2412341b7affa61f4d95b",
|
|
1630
|
+
"bytes": 7910
|
|
1631
1631
|
},
|
|
1632
1632
|
"v2/durable-core/domain/function-definition-expander.d.ts": {
|
|
1633
1633
|
"sha256": "2720e7c4dfbd9ec0cdf75eb4384fdbea18d4430aeae7f13d9215f0e5e4980468",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Result } from 'neverthrow';
|
|
2
2
|
import type { LoopControlEvaluationResult } from './loop-control-evaluator.js';
|
|
3
|
+
import type { Condition } from '../../../utils/condition-evaluator.js';
|
|
3
4
|
export type DecisionTraceEntryKind = 'selected_next_step' | 'evaluated_condition' | 'entered_loop' | 'exited_loop' | 'detected_non_tip_advance';
|
|
4
5
|
export type DecisionTraceRef = {
|
|
5
6
|
readonly kind: 'step_id';
|
|
@@ -23,6 +24,9 @@ export declare function traceEnteredLoop(loopId: string, iteration: number): Dec
|
|
|
23
24
|
export declare function traceEvaluatedCondition(loopId: string, iteration: number, result: boolean, source: 'artifact' | 'context' | 'legacy'): DecisionTraceEntry;
|
|
24
25
|
export declare function traceExitedLoop(loopId: string, reason: string): DecisionTraceEntry;
|
|
25
26
|
export declare function traceSelectedNextStep(stepId: string, stepTitle?: string): DecisionTraceEntry;
|
|
27
|
+
export declare function formatConditionTrace(condition: Condition, context: Record<string, unknown>, passed: boolean): string;
|
|
28
|
+
export declare function traceStepRunConditionSkipped(stepId: string, stepTitle: string | undefined, condition: Condition, context: Record<string, unknown>): DecisionTraceEntry;
|
|
29
|
+
export declare function traceStepRunConditionPassed(stepId: string, stepTitle: string | undefined, condition: Condition, context: Record<string, unknown>): DecisionTraceEntry;
|
|
26
30
|
export declare function traceArtifactMatchResult(loopId: string, iteration: number, result: LoopControlEvaluationResult): DecisionTraceEntry;
|
|
27
31
|
export declare function applyTraceBudget(entries: readonly DecisionTraceEntry[]): readonly DecisionTraceEntry[];
|
|
28
32
|
export declare function buildDecisionTraceEventData(traceId: string, entries: readonly DecisionTraceEntry[]): Result<{
|
|
@@ -4,6 +4,9 @@ exports.traceEnteredLoop = traceEnteredLoop;
|
|
|
4
4
|
exports.traceEvaluatedCondition = traceEvaluatedCondition;
|
|
5
5
|
exports.traceExitedLoop = traceExitedLoop;
|
|
6
6
|
exports.traceSelectedNextStep = traceSelectedNextStep;
|
|
7
|
+
exports.formatConditionTrace = formatConditionTrace;
|
|
8
|
+
exports.traceStepRunConditionSkipped = traceStepRunConditionSkipped;
|
|
9
|
+
exports.traceStepRunConditionPassed = traceStepRunConditionPassed;
|
|
7
10
|
exports.traceArtifactMatchResult = traceArtifactMatchResult;
|
|
8
11
|
exports.applyTraceBudget = applyTraceBudget;
|
|
9
12
|
exports.buildDecisionTraceEventData = buildDecisionTraceEventData;
|
|
@@ -40,6 +43,100 @@ function traceSelectedNextStep(stepId, stepTitle) {
|
|
|
40
43
|
refs: [{ kind: 'step_id', stepId }],
|
|
41
44
|
};
|
|
42
45
|
}
|
|
46
|
+
function formatConditionTrace(condition, context, passed) {
|
|
47
|
+
const prefix = passed ? 'PASS' : 'SKIP';
|
|
48
|
+
if (condition.and !== undefined) {
|
|
49
|
+
return passed ? 'PASS: and-condition met' : 'SKIP: and-condition not met';
|
|
50
|
+
}
|
|
51
|
+
if (condition.or !== undefined) {
|
|
52
|
+
return passed ? 'PASS: or-condition met' : 'SKIP: or-condition not met';
|
|
53
|
+
}
|
|
54
|
+
if (condition.not !== undefined) {
|
|
55
|
+
return passed ? 'PASS: not-condition met' : 'SKIP: not-condition not met';
|
|
56
|
+
}
|
|
57
|
+
const varName = condition.var;
|
|
58
|
+
if (!varName) {
|
|
59
|
+
return `${prefix}: condition ${passed ? 'met' : 'not met'}`;
|
|
60
|
+
}
|
|
61
|
+
const op = getOperatorLabel(condition);
|
|
62
|
+
if (passed) {
|
|
63
|
+
const contextValue = context[varName];
|
|
64
|
+
const contextStr = contextValue === undefined ? '(unset)' : String(contextValue);
|
|
65
|
+
const expectedStr = getExpectedValueLabel(condition);
|
|
66
|
+
return expectedStr !== null
|
|
67
|
+
? `PASS: ${varName}=${contextStr} (${op}: ${expectedStr})`
|
|
68
|
+
: `PASS: ${varName}=${contextStr} (${op})`;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
return `SKIP: ${varName} (${op})`;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function getOperatorLabel(condition) {
|
|
75
|
+
if (condition.var === undefined)
|
|
76
|
+
return 'condition';
|
|
77
|
+
if ('equals' in condition)
|
|
78
|
+
return 'equals';
|
|
79
|
+
if ('not_equals' in condition)
|
|
80
|
+
return 'not_equals';
|
|
81
|
+
if (condition.gt !== undefined)
|
|
82
|
+
return 'gt';
|
|
83
|
+
if (condition.gte !== undefined)
|
|
84
|
+
return 'gte';
|
|
85
|
+
if (condition.lt !== undefined)
|
|
86
|
+
return 'lt';
|
|
87
|
+
if (condition.lte !== undefined)
|
|
88
|
+
return 'lte';
|
|
89
|
+
if (condition.contains !== undefined)
|
|
90
|
+
return 'contains';
|
|
91
|
+
if (condition.startsWith !== undefined)
|
|
92
|
+
return 'startsWith';
|
|
93
|
+
if (condition.endsWith !== undefined)
|
|
94
|
+
return 'endsWith';
|
|
95
|
+
if (condition.matches !== undefined)
|
|
96
|
+
return 'matches';
|
|
97
|
+
if (condition.in !== undefined)
|
|
98
|
+
return 'in';
|
|
99
|
+
return 'condition';
|
|
100
|
+
}
|
|
101
|
+
function getExpectedValueLabel(condition) {
|
|
102
|
+
if ('equals' in condition)
|
|
103
|
+
return String(condition.equals);
|
|
104
|
+
if ('not_equals' in condition)
|
|
105
|
+
return String(condition.not_equals);
|
|
106
|
+
if (condition.gt !== undefined)
|
|
107
|
+
return String(condition.gt);
|
|
108
|
+
if (condition.gte !== undefined)
|
|
109
|
+
return String(condition.gte);
|
|
110
|
+
if (condition.lt !== undefined)
|
|
111
|
+
return String(condition.lt);
|
|
112
|
+
if (condition.lte !== undefined)
|
|
113
|
+
return String(condition.lte);
|
|
114
|
+
if (condition.contains !== undefined)
|
|
115
|
+
return condition.contains;
|
|
116
|
+
if (condition.startsWith !== undefined)
|
|
117
|
+
return condition.startsWith;
|
|
118
|
+
if (condition.endsWith !== undefined)
|
|
119
|
+
return condition.endsWith;
|
|
120
|
+
if (condition.matches !== undefined)
|
|
121
|
+
return condition.matches;
|
|
122
|
+
if (condition.in !== undefined)
|
|
123
|
+
return JSON.stringify(condition.in);
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
function traceStepRunConditionSkipped(stepId, stepTitle, condition, context) {
|
|
127
|
+
return {
|
|
128
|
+
kind: 'evaluated_condition',
|
|
129
|
+
summary: formatConditionTrace(condition, context, false),
|
|
130
|
+
refs: [{ kind: 'step_id', stepId }],
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function traceStepRunConditionPassed(stepId, stepTitle, condition, context) {
|
|
134
|
+
return {
|
|
135
|
+
kind: 'evaluated_condition',
|
|
136
|
+
summary: formatConditionTrace(condition, context, true),
|
|
137
|
+
refs: [{ kind: 'step_id', stepId }],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
43
140
|
function traceArtifactMatchResult(loopId, iteration, result) {
|
|
44
141
|
const detail = (() => {
|
|
45
142
|
switch (result.kind) {
|