@barnum/barnum 0.0.0-main-04a1bb17 → 0.2.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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"title": "ConfigFile",
|
|
4
|
-
"description": "Top-level Barnum configuration file format.\n\
|
|
4
|
+
"description": "Top-level Barnum configuration file format.\n\nThis is the raw parsed format. Call `resolve()` to get the runtime `Config`.",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": [
|
|
7
7
|
"steps"
|
|
8
8
|
],
|
|
9
9
|
"properties": {
|
|
10
10
|
"$schema": {
|
|
11
|
-
"description": "
|
|
11
|
+
"description": "JSON Schema reference for editor validation (ignored at runtime).",
|
|
12
12
|
"writeOnly": true,
|
|
13
13
|
"type": [
|
|
14
14
|
"string",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
"entrypoint": {
|
|
19
|
-
"description": "
|
|
19
|
+
"description": "Entry point step name. If specified, the workflow starts with this step and `--entrypoint-value` can be used to provide the initial value (defaults to `{}`). If not specified, `--initial-state` must be provided on the command line.",
|
|
20
20
|
"default": null,
|
|
21
21
|
"type": [
|
|
22
22
|
"string",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
26
|
"options": {
|
|
27
|
-
"description": "
|
|
27
|
+
"description": "Runtime options.",
|
|
28
28
|
"default": {
|
|
29
29
|
"max_concurrency": null,
|
|
30
30
|
"max_retries": 0,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"steps": {
|
|
42
|
-
"description": "
|
|
42
|
+
"description": "Step definitions forming the task queue.",
|
|
43
43
|
"type": "array",
|
|
44
44
|
"items": {
|
|
45
45
|
"$ref": "#/definitions/StepFile"
|
|
@@ -49,18 +49,20 @@
|
|
|
49
49
|
"additionalProperties": false,
|
|
50
50
|
"definitions": {
|
|
51
51
|
"ActionFile": {
|
|
52
|
-
"description": "How a step processes tasks
|
|
52
|
+
"description": "How a step processes tasks (config file format).",
|
|
53
53
|
"oneOf": [
|
|
54
54
|
{
|
|
55
|
-
"description": "Send
|
|
55
|
+
"description": "Send to the agent pool for processing.",
|
|
56
56
|
"type": "object",
|
|
57
57
|
"required": [
|
|
58
|
-
"instructions",
|
|
59
58
|
"kind"
|
|
60
59
|
],
|
|
61
60
|
"properties": {
|
|
62
61
|
"instructions": {
|
|
63
|
-
"description": "Markdown
|
|
62
|
+
"description": "Markdown instructions shown to agents.",
|
|
63
|
+
"default": {
|
|
64
|
+
"inline": ""
|
|
65
|
+
},
|
|
64
66
|
"allOf": [
|
|
65
67
|
{
|
|
66
68
|
"$ref": "#/definitions/MaybeLinked_for_String"
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
}
|
|
77
79
|
},
|
|
78
80
|
{
|
|
79
|
-
"description": "Run a local
|
|
81
|
+
"description": "Run a local command.",
|
|
80
82
|
"type": "object",
|
|
81
83
|
"required": [
|
|
82
84
|
"kind",
|
|
@@ -90,32 +92,7 @@
|
|
|
90
92
|
]
|
|
91
93
|
},
|
|
92
94
|
"script": {
|
|
93
|
-
"description": "Shell script to execute.\n\n**Input (stdin):** JSON object
|
|
94
|
-
"type": "string"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
"FinallyHook": {
|
|
101
|
-
"description": "Finally hook. Runs after a task and all its descendants complete.\n\nIn JSON: `{\"kind\": \"Command\", \"script\": \"./finally-hook.sh\"}`\n\n**stdin:** The task's original value payload as JSON. **stdout:** JSON array of follow-up tasks: `[{\"kind\": \"StepName\", \"value\": {...}}, ...]`. Return `[]` for no follow-ups.",
|
|
102
|
-
"oneOf": [
|
|
103
|
-
{
|
|
104
|
-
"description": "Run a shell command as the finally hook.",
|
|
105
|
-
"type": "object",
|
|
106
|
-
"required": [
|
|
107
|
-
"kind",
|
|
108
|
-
"script"
|
|
109
|
-
],
|
|
110
|
-
"properties": {
|
|
111
|
-
"kind": {
|
|
112
|
-
"type": "string",
|
|
113
|
-
"enum": [
|
|
114
|
-
"Command"
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
"script": {
|
|
118
|
-
"description": "Shell script to execute. Receives the task's original value as JSON on stdin, must write a JSON array of follow-up tasks on stdout.",
|
|
95
|
+
"description": "Shell script to execute.\n\n**Input (stdin):** JSON object with the structure `{\"kind\": \"<step name>\", \"value\": <parameters>}`. Use `jq '.value'` to extract parameters or `jq -r '.value.fieldName'` for specific fields.\n\n**Output (stdout):** JSON array of next tasks, e.g. `[{\"kind\": \"NextStep\", \"value\": {...}}]`. Return `[]` to spawn no follow-up tasks.",
|
|
119
96
|
"type": "string"
|
|
120
97
|
}
|
|
121
98
|
}
|
|
@@ -123,7 +100,7 @@
|
|
|
123
100
|
]
|
|
124
101
|
},
|
|
125
102
|
"MaybeLinked_for_String": {
|
|
126
|
-
"description": "Content that can be inline or linked to a file.\n\nIn config files: - `{\"inline\": <value>}` → content
|
|
103
|
+
"description": "Content that can be inline or linked to a file.\n\nIn config files: - `{\"inline\": <value>}` → inline content - `{\"link\": \"path\"}` → link to file",
|
|
127
104
|
"anyOf": [
|
|
128
105
|
{
|
|
129
106
|
"description": "Inline content.",
|
|
@@ -133,20 +110,20 @@
|
|
|
133
110
|
],
|
|
134
111
|
"properties": {
|
|
135
112
|
"inline": {
|
|
136
|
-
"description": "The content
|
|
113
|
+
"description": "The inline content.",
|
|
137
114
|
"type": "string"
|
|
138
115
|
}
|
|
139
116
|
}
|
|
140
117
|
},
|
|
141
118
|
{
|
|
142
|
-
"description": "Link to a file
|
|
119
|
+
"description": "Link to a file.",
|
|
143
120
|
"type": "object",
|
|
144
121
|
"required": [
|
|
145
122
|
"link"
|
|
146
123
|
],
|
|
147
124
|
"properties": {
|
|
148
125
|
"link": {
|
|
149
|
-
"description": "
|
|
126
|
+
"description": "Path to the file.",
|
|
150
127
|
"type": "string"
|
|
151
128
|
}
|
|
152
129
|
}
|
|
@@ -154,7 +131,7 @@
|
|
|
154
131
|
]
|
|
155
132
|
},
|
|
156
133
|
"Options": {
|
|
157
|
-
"description": "
|
|
134
|
+
"description": "Runtime options for task execution.",
|
|
158
135
|
"type": "object",
|
|
159
136
|
"properties": {
|
|
160
137
|
"max_concurrency": {
|
|
@@ -197,87 +174,42 @@
|
|
|
197
174
|
},
|
|
198
175
|
"additionalProperties": false
|
|
199
176
|
},
|
|
200
|
-
"PostHook": {
|
|
201
|
-
"description": "Post-action hook. Inspects or modifies the action's outcome.\n\nIn JSON: `{\"kind\": \"Command\", \"script\": \"./post-hook.sh\"}`\n\n**stdin:** Tagged JSON describing the outcome (`\"kind\": \"Success\"`, `\"Timeout\"`, `\"Error\"`, or `\"PreHookError\"`). On success, includes an `input`, `output`, and `next` (follow-up tasks) field. **stdout:** Same tagged JSON, possibly modified (e.g., filtering `next`).",
|
|
202
|
-
"oneOf": [
|
|
203
|
-
{
|
|
204
|
-
"description": "Run a shell command as the post hook.",
|
|
205
|
-
"type": "object",
|
|
206
|
-
"required": [
|
|
207
|
-
"kind",
|
|
208
|
-
"script"
|
|
209
|
-
],
|
|
210
|
-
"properties": {
|
|
211
|
-
"kind": {
|
|
212
|
-
"type": "string",
|
|
213
|
-
"enum": [
|
|
214
|
-
"Command"
|
|
215
|
-
]
|
|
216
|
-
},
|
|
217
|
-
"script": {
|
|
218
|
-
"description": "Shell script to execute. Receives the action outcome as JSON on stdin, must write the (possibly modified) outcome as JSON on stdout.",
|
|
219
|
-
"type": "string"
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
]
|
|
224
|
-
},
|
|
225
|
-
"PreHook": {
|
|
226
|
-
"description": "Pre-action hook. Transforms the task value before the action runs.\n\nIn JSON: `{\"kind\": \"Command\", \"script\": \"./pre-hook.sh\"}`\n\n**stdin:** Task value payload (e.g., `{\"path\": \"/src\"}`). **stdout:** Modified value payload (same shape).",
|
|
227
|
-
"oneOf": [
|
|
228
|
-
{
|
|
229
|
-
"description": "Run a shell command as the pre hook.",
|
|
230
|
-
"type": "object",
|
|
231
|
-
"required": [
|
|
232
|
-
"kind",
|
|
233
|
-
"script"
|
|
234
|
-
],
|
|
235
|
-
"properties": {
|
|
236
|
-
"kind": {
|
|
237
|
-
"type": "string",
|
|
238
|
-
"enum": [
|
|
239
|
-
"Command"
|
|
240
|
-
]
|
|
241
|
-
},
|
|
242
|
-
"script": {
|
|
243
|
-
"description": "Shell script to execute. Receives the task's value as JSON on stdin, must write the (possibly modified) value as JSON on stdout.",
|
|
244
|
-
"type": "string"
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
]
|
|
249
|
-
},
|
|
250
177
|
"SchemaRef": {
|
|
251
|
-
"description": "
|
|
178
|
+
"description": "Reference to a JSON Schema (inline or external file).\n\nIn config files: - `{\"link\": \"path\"}` → link to schema file - Object → inline JSON Schema",
|
|
252
179
|
"anyOf": [
|
|
253
180
|
{
|
|
254
|
-
"description": "
|
|
181
|
+
"description": "Link to a JSON Schema file.",
|
|
255
182
|
"type": "object",
|
|
256
183
|
"required": [
|
|
257
184
|
"link"
|
|
258
185
|
],
|
|
259
186
|
"properties": {
|
|
260
187
|
"link": {
|
|
261
|
-
"description": "
|
|
188
|
+
"description": "Path to the schema file.",
|
|
262
189
|
"type": "string"
|
|
263
190
|
}
|
|
264
191
|
}
|
|
265
192
|
},
|
|
266
193
|
{
|
|
267
|
-
"description": "Inline JSON Schema
|
|
194
|
+
"description": "Inline JSON Schema."
|
|
268
195
|
}
|
|
269
196
|
]
|
|
270
197
|
},
|
|
271
198
|
"StepFile": {
|
|
272
|
-
"description": "A
|
|
199
|
+
"description": "A step in the config file (may have unresolved references).",
|
|
273
200
|
"type": "object",
|
|
274
201
|
"required": [
|
|
275
|
-
"action",
|
|
276
202
|
"name"
|
|
277
203
|
],
|
|
278
204
|
"properties": {
|
|
279
205
|
"action": {
|
|
280
|
-
"description": "How
|
|
206
|
+
"description": "How to execute the step.",
|
|
207
|
+
"default": {
|
|
208
|
+
"instructions": {
|
|
209
|
+
"inline": ""
|
|
210
|
+
},
|
|
211
|
+
"kind": "Pool"
|
|
212
|
+
},
|
|
281
213
|
"allOf": [
|
|
282
214
|
{
|
|
283
215
|
"$ref": "#/definitions/ActionFile"
|
|
@@ -285,23 +217,19 @@
|
|
|
285
217
|
]
|
|
286
218
|
},
|
|
287
219
|
"finally": {
|
|
288
|
-
"description": "
|
|
220
|
+
"description": "Finally hook (runs after all children complete).",
|
|
289
221
|
"default": null,
|
|
290
|
-
"
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"type": "null"
|
|
296
|
-
}
|
|
222
|
+
"type": [
|
|
223
|
+
"string",
|
|
224
|
+
"null"
|
|
297
225
|
]
|
|
298
226
|
},
|
|
299
227
|
"name": {
|
|
300
|
-
"description": "
|
|
228
|
+
"description": "Step name (e.g., `Analyze`, `Implement`).",
|
|
301
229
|
"type": "string"
|
|
302
230
|
},
|
|
303
231
|
"next": {
|
|
304
|
-
"description": "
|
|
232
|
+
"description": "Valid next steps.",
|
|
305
233
|
"default": [],
|
|
306
234
|
"type": "array",
|
|
307
235
|
"items": {
|
|
@@ -309,7 +237,7 @@
|
|
|
309
237
|
}
|
|
310
238
|
},
|
|
311
239
|
"options": {
|
|
312
|
-
"description": "Per-step options that override
|
|
240
|
+
"description": "Per-step options that override global options.",
|
|
313
241
|
"default": {
|
|
314
242
|
"max_retries": null,
|
|
315
243
|
"retry_on_invalid_response": null,
|
|
@@ -323,31 +251,23 @@
|
|
|
323
251
|
]
|
|
324
252
|
},
|
|
325
253
|
"post": {
|
|
326
|
-
"description": "
|
|
254
|
+
"description": "Post-execution hook script.",
|
|
327
255
|
"default": null,
|
|
328
|
-
"
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"type": "null"
|
|
334
|
-
}
|
|
256
|
+
"type": [
|
|
257
|
+
"string",
|
|
258
|
+
"null"
|
|
335
259
|
]
|
|
336
260
|
},
|
|
337
261
|
"pre": {
|
|
338
|
-
"description": "
|
|
262
|
+
"description": "Pre-execution hook script.",
|
|
339
263
|
"default": null,
|
|
340
|
-
"
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
"type": "null"
|
|
346
|
-
}
|
|
264
|
+
"type": [
|
|
265
|
+
"string",
|
|
266
|
+
"null"
|
|
347
267
|
]
|
|
348
268
|
},
|
|
349
269
|
"value_schema": {
|
|
350
|
-
"description": "JSON Schema
|
|
270
|
+
"description": "JSON Schema for validating the step's value payload. None means any JSON value is accepted.",
|
|
351
271
|
"default": null,
|
|
352
272
|
"anyOf": [
|
|
353
273
|
{
|
|
@@ -362,11 +282,11 @@
|
|
|
362
282
|
"additionalProperties": false
|
|
363
283
|
},
|
|
364
284
|
"StepOptions": {
|
|
365
|
-
"description": "Per-step
|
|
285
|
+
"description": "Per-step options that override global defaults.",
|
|
366
286
|
"type": "object",
|
|
367
287
|
"properties": {
|
|
368
288
|
"max_retries": {
|
|
369
|
-
"description": "Maximum retries for
|
|
289
|
+
"description": "Maximum retries for this step (overrides global).",
|
|
370
290
|
"default": null,
|
|
371
291
|
"type": [
|
|
372
292
|
"integer",
|
|
@@ -376,7 +296,7 @@
|
|
|
376
296
|
"minimum": 0.0
|
|
377
297
|
},
|
|
378
298
|
"retry_on_invalid_response": {
|
|
379
|
-
"description": "Whether to retry
|
|
299
|
+
"description": "Whether to retry on invalid response for this step (overrides global).",
|
|
380
300
|
"default": null,
|
|
381
301
|
"type": [
|
|
382
302
|
"boolean",
|
|
@@ -384,7 +304,7 @@
|
|
|
384
304
|
]
|
|
385
305
|
},
|
|
386
306
|
"retry_on_timeout": {
|
|
387
|
-
"description": "Whether to retry
|
|
307
|
+
"description": "Whether to retry on timeout for this step (overrides global).",
|
|
388
308
|
"default": null,
|
|
389
309
|
"type": [
|
|
390
310
|
"boolean",
|
|
@@ -392,7 +312,7 @@
|
|
|
392
312
|
]
|
|
393
313
|
},
|
|
394
314
|
"timeout": {
|
|
395
|
-
"description": "Timeout in seconds for
|
|
315
|
+
"description": "Timeout in seconds for this step (overrides global).",
|
|
396
316
|
"default": null,
|
|
397
317
|
"type": [
|
|
398
318
|
"integer",
|