@crewx/workflow 0.3.22-rc.13 → 0.3.22-rc.130
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/SKILL.md +38 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +78 -9
- package/dist/cli.js.map +1 -1
- package/dist/src/engine.d.ts +4 -2
- package/dist/src/engine.d.ts.map +1 -1
- package/dist/src/engine.js +57 -2
- package/dist/src/engine.js.map +1 -1
- package/dist/src/failure.d.ts +41 -0
- package/dist/src/failure.d.ts.map +1 -0
- package/dist/src/failure.js +122 -0
- package/dist/src/failure.js.map +1 -0
- package/dist/src/mermaid.d.ts.map +1 -1
- package/dist/src/mermaid.js +7 -4
- package/dist/src/mermaid.js.map +1 -1
- package/dist/src/parent-task-sync.d.ts +49 -0
- package/dist/src/parent-task-sync.d.ts.map +1 -0
- package/dist/src/parent-task-sync.js +132 -0
- package/dist/src/parent-task-sync.js.map +1 -0
- package/dist/src/retry-policy.d.ts +38 -0
- package/dist/src/retry-policy.d.ts.map +1 -0
- package/dist/src/retry-policy.js +140 -0
- package/dist/src/retry-policy.js.map +1 -0
- package/dist/src/run-manager.d.ts +28 -2
- package/dist/src/run-manager.d.ts.map +1 -1
- package/dist/src/run-manager.js +935 -210
- package/dist/src/run-manager.js.map +1 -1
- package/dist/src/types.d.ts +39 -4
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/output-format.d.ts +12 -0
- package/dist/src/utils/output-format.d.ts.map +1 -1
- package/dist/src/utils/output-format.js +103 -5
- package/dist/src/utils/output-format.js.map +1 -1
- package/dist/workflow-schema.json +34 -5
- package/package.json +14 -4
- package/workflow-schema.json +34 -5
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"properties": {
|
|
57
57
|
"type": {
|
|
58
58
|
"type": "string",
|
|
59
|
-
"enum": ["agent_task", "skill_task", "shell_task", "parallel", "join", "branch", "approval", "expression", "end"]
|
|
59
|
+
"enum": ["agent_task", "skill_task", "shell_task", "parallel", "join", "branch", "approval", "expression", "end", "error"]
|
|
60
60
|
},
|
|
61
61
|
"agent": {
|
|
62
62
|
"type": "string"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"cwd": {
|
|
83
83
|
"type": "string",
|
|
84
|
-
"description": "skill_task/shell_task: working directory, normalized and constrained under the project root."
|
|
84
|
+
"description": "agent_task/skill_task/shell_task: working directory, normalized and constrained under the project root."
|
|
85
85
|
},
|
|
86
86
|
"env": {
|
|
87
87
|
"type": "object",
|
|
@@ -90,6 +90,10 @@
|
|
|
90
90
|
},
|
|
91
91
|
"description": "shell_task: explicit env pass-through. Dangerous keys (LD_PRELOAD, etc.) are rejected."
|
|
92
92
|
},
|
|
93
|
+
"stdin": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"description": "skill_task/shell_task: optional stdin payload. Supports {{template}} interpolation."
|
|
96
|
+
},
|
|
93
97
|
"mode": {
|
|
94
98
|
"type": "string",
|
|
95
99
|
"enum": ["query", "execute"]
|
|
@@ -109,6 +113,10 @@
|
|
|
109
113
|
"retry": {
|
|
110
114
|
"$ref": "#/definitions/RetryConfig"
|
|
111
115
|
},
|
|
116
|
+
"fail_when": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Task nodes: semantic failure judgment. Safe expression evaluated against state after the node's output is stored (e.g. 'state.verify_result.status !== \"pass\"'). Truthy → node fails and the run halts."
|
|
119
|
+
},
|
|
112
120
|
"condition": {
|
|
113
121
|
"type": "string"
|
|
114
122
|
},
|
|
@@ -158,6 +166,10 @@
|
|
|
158
166
|
"comment": {
|
|
159
167
|
"type": "string"
|
|
160
168
|
},
|
|
169
|
+
"message": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "error: failure message recorded in run.error. Supports {{template}} interpolation."
|
|
172
|
+
},
|
|
161
173
|
"on_approve": {
|
|
162
174
|
"type": "string"
|
|
163
175
|
},
|
|
@@ -210,19 +222,36 @@
|
|
|
210
222
|
"required": ["max", "delay"],
|
|
211
223
|
"properties": {
|
|
212
224
|
"max": {
|
|
213
|
-
"type": "
|
|
225
|
+
"type": "integer",
|
|
226
|
+
"minimum": 0,
|
|
227
|
+
"maximum": 10,
|
|
228
|
+
"description": "Number of additional retries after the first attempt (0 disables retry)."
|
|
214
229
|
},
|
|
215
230
|
"delay": {
|
|
216
231
|
"type": "string",
|
|
217
232
|
"enum": ["exponential", "fixed"]
|
|
218
233
|
},
|
|
219
234
|
"max_delay": {
|
|
220
|
-
"type": "
|
|
235
|
+
"type": "integer",
|
|
236
|
+
"minimum": 0,
|
|
237
|
+
"description": "Maximum retry delay in milliseconds; runtime hard-caps this at 60000."
|
|
221
238
|
},
|
|
222
239
|
"on": {
|
|
223
240
|
"type": "array",
|
|
224
241
|
"items": {
|
|
225
|
-
"type": "string"
|
|
242
|
+
"type": "string",
|
|
243
|
+
"enum": [
|
|
244
|
+
"CLI_UNRESOLVABLE",
|
|
245
|
+
"SPAWN_FAILED",
|
|
246
|
+
"NODE_TIMEOUT",
|
|
247
|
+
"NODE_EXIT_NONZERO",
|
|
248
|
+
"OUTPUT_INVALID",
|
|
249
|
+
"RATE_LIMITED",
|
|
250
|
+
"CONFIG_INVALID",
|
|
251
|
+
"INTERRUPTED",
|
|
252
|
+
"CANCELLED",
|
|
253
|
+
"UNKNOWN"
|
|
254
|
+
]
|
|
226
255
|
}
|
|
227
256
|
}
|
|
228
257
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewx/workflow",
|
|
3
|
-
"version": "0.3.22-rc.
|
|
3
|
+
"version": "0.3.22-rc.130",
|
|
4
4
|
"description": "Workflow engine for CrewX - list, show, validate workflows with Mermaid visualization",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/src/engine.js",
|
|
7
7
|
"types": "dist/src/engine.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
"*": {
|
|
10
|
+
"run-manager": [
|
|
11
|
+
"dist/src/run-manager.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"types": [
|
|
14
|
+
"dist/src/types.d.ts"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
8
18
|
"exports": {
|
|
9
19
|
".": {
|
|
10
20
|
"types": "./dist/src/engine.d.ts",
|
|
@@ -48,9 +58,9 @@
|
|
|
48
58
|
"dependencies": {
|
|
49
59
|
"@hyperjump/json-schema": "^1.9.4",
|
|
50
60
|
"js-yaml": "^4.1.0",
|
|
51
|
-
"@crewx/knowledge-core": "0.1.17",
|
|
52
|
-
"@crewx/shared": "0.0.
|
|
53
|
-
"@crewx/sdk": "0.
|
|
61
|
+
"@crewx/knowledge-core": "0.1.17-rc.94",
|
|
62
|
+
"@crewx/shared": "0.0.6",
|
|
63
|
+
"@crewx/sdk": "0.9.0-rc.84"
|
|
54
64
|
},
|
|
55
65
|
"devDependencies": {
|
|
56
66
|
"@types/js-yaml": "^4.0.9",
|
package/workflow-schema.json
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"properties": {
|
|
57
57
|
"type": {
|
|
58
58
|
"type": "string",
|
|
59
|
-
"enum": ["agent_task", "skill_task", "shell_task", "parallel", "join", "branch", "approval", "expression", "end"]
|
|
59
|
+
"enum": ["agent_task", "skill_task", "shell_task", "parallel", "join", "branch", "approval", "expression", "end", "error"]
|
|
60
60
|
},
|
|
61
61
|
"agent": {
|
|
62
62
|
"type": "string"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"cwd": {
|
|
83
83
|
"type": "string",
|
|
84
|
-
"description": "skill_task/shell_task: working directory, normalized and constrained under the project root."
|
|
84
|
+
"description": "agent_task/skill_task/shell_task: working directory, normalized and constrained under the project root."
|
|
85
85
|
},
|
|
86
86
|
"env": {
|
|
87
87
|
"type": "object",
|
|
@@ -90,6 +90,10 @@
|
|
|
90
90
|
},
|
|
91
91
|
"description": "shell_task: explicit env pass-through. Dangerous keys (LD_PRELOAD, etc.) are rejected."
|
|
92
92
|
},
|
|
93
|
+
"stdin": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"description": "skill_task/shell_task: optional stdin payload. Supports {{template}} interpolation."
|
|
96
|
+
},
|
|
93
97
|
"mode": {
|
|
94
98
|
"type": "string",
|
|
95
99
|
"enum": ["query", "execute"]
|
|
@@ -109,6 +113,10 @@
|
|
|
109
113
|
"retry": {
|
|
110
114
|
"$ref": "#/definitions/RetryConfig"
|
|
111
115
|
},
|
|
116
|
+
"fail_when": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Task nodes: semantic failure judgment. Safe expression evaluated against state after the node's output is stored (e.g. 'state.verify_result.status !== \"pass\"'). Truthy → node fails and the run halts."
|
|
119
|
+
},
|
|
112
120
|
"condition": {
|
|
113
121
|
"type": "string"
|
|
114
122
|
},
|
|
@@ -158,6 +166,10 @@
|
|
|
158
166
|
"comment": {
|
|
159
167
|
"type": "string"
|
|
160
168
|
},
|
|
169
|
+
"message": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "error: failure message recorded in run.error. Supports {{template}} interpolation."
|
|
172
|
+
},
|
|
161
173
|
"on_approve": {
|
|
162
174
|
"type": "string"
|
|
163
175
|
},
|
|
@@ -210,19 +222,36 @@
|
|
|
210
222
|
"required": ["max", "delay"],
|
|
211
223
|
"properties": {
|
|
212
224
|
"max": {
|
|
213
|
-
"type": "
|
|
225
|
+
"type": "integer",
|
|
226
|
+
"minimum": 0,
|
|
227
|
+
"maximum": 10,
|
|
228
|
+
"description": "Number of additional retries after the first attempt (0 disables retry)."
|
|
214
229
|
},
|
|
215
230
|
"delay": {
|
|
216
231
|
"type": "string",
|
|
217
232
|
"enum": ["exponential", "fixed"]
|
|
218
233
|
},
|
|
219
234
|
"max_delay": {
|
|
220
|
-
"type": "
|
|
235
|
+
"type": "integer",
|
|
236
|
+
"minimum": 0,
|
|
237
|
+
"description": "Maximum retry delay in milliseconds; runtime hard-caps this at 60000."
|
|
221
238
|
},
|
|
222
239
|
"on": {
|
|
223
240
|
"type": "array",
|
|
224
241
|
"items": {
|
|
225
|
-
"type": "string"
|
|
242
|
+
"type": "string",
|
|
243
|
+
"enum": [
|
|
244
|
+
"CLI_UNRESOLVABLE",
|
|
245
|
+
"SPAWN_FAILED",
|
|
246
|
+
"NODE_TIMEOUT",
|
|
247
|
+
"NODE_EXIT_NONZERO",
|
|
248
|
+
"OUTPUT_INVALID",
|
|
249
|
+
"RATE_LIMITED",
|
|
250
|
+
"CONFIG_INVALID",
|
|
251
|
+
"INTERRUPTED",
|
|
252
|
+
"CANCELLED",
|
|
253
|
+
"UNKNOWN"
|
|
254
|
+
]
|
|
226
255
|
}
|
|
227
256
|
}
|
|
228
257
|
}
|