@oisincoveney/pipeline 1.27.13 → 1.27.14
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/config.d.ts +2 -2
- package/dist/pipeline-runtime.js +52 -0
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -452,7 +452,6 @@ declare const configSchema: z.ZodObject<{
|
|
|
452
452
|
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
453
453
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
454
454
|
tools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
455
|
-
task: "task";
|
|
456
455
|
read: "read";
|
|
457
456
|
list: "list";
|
|
458
457
|
grep: "grep";
|
|
@@ -460,6 +459,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
460
459
|
bash: "bash";
|
|
461
460
|
edit: "edit";
|
|
462
461
|
write: "write";
|
|
462
|
+
task: "task";
|
|
463
463
|
}>>>;
|
|
464
464
|
}, z.core.$strict>>>;
|
|
465
465
|
runner_command: z.ZodDefault<z.ZodObject<{
|
|
@@ -511,7 +511,6 @@ declare const configSchema: z.ZodObject<{
|
|
|
511
511
|
rules: z.ZodOptional<z.ZodBoolean>;
|
|
512
512
|
skills: z.ZodOptional<z.ZodBoolean>;
|
|
513
513
|
tools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
514
|
-
task: "task";
|
|
515
514
|
read: "read";
|
|
516
515
|
list: "list";
|
|
517
516
|
grep: "grep";
|
|
@@ -519,6 +518,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
519
518
|
bash: "bash";
|
|
520
519
|
edit: "edit";
|
|
521
520
|
write: "write";
|
|
521
|
+
task: "task";
|
|
522
522
|
}>>>;
|
|
523
523
|
}, z.core.$strict>;
|
|
524
524
|
command: z.ZodOptional<z.ZodString>;
|
package/dist/pipeline-runtime.js
CHANGED
|
@@ -28,6 +28,7 @@ function runPipelineFromConfig(options) {
|
|
|
28
28
|
function runScheduledWorkflowTask(options) {
|
|
29
29
|
const { dependencyOutputs, nodeId, ...runtimeOptions } = options;
|
|
30
30
|
const context = createRuntimeContext(runtimeOptions);
|
|
31
|
+
hydrateScheduledDependencyStates(context, nodeId);
|
|
31
32
|
hydrateDependencyOutputs(context, dependencyOutputs);
|
|
32
33
|
recordNodeEvent(context, nodeId, {
|
|
33
34
|
at: now(),
|
|
@@ -208,6 +209,57 @@ function hydrateDependencyOutputs(context, dependencyOutputs) {
|
|
|
208
209
|
});
|
|
209
210
|
}
|
|
210
211
|
}
|
|
212
|
+
function hydrateScheduledDependencyStates(context, nodeId) {
|
|
213
|
+
const finishedAt = now();
|
|
214
|
+
for (const dependencyId of scheduledDependencyNodeIds(context, nodeId)) {
|
|
215
|
+
const existing = context.nodeStates.get(dependencyId);
|
|
216
|
+
context.nodeStates.set(dependencyId, scheduledDependencyState(dependencyId, finishedAt, existing));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function scheduledDependencyState(id, finishedAt, existing) {
|
|
220
|
+
return completedScheduledDependencyState(existing ?? emptyScheduledDependencyState(id), finishedAt);
|
|
221
|
+
}
|
|
222
|
+
function emptyScheduledDependencyState(id) {
|
|
223
|
+
return {
|
|
224
|
+
attempts: 0,
|
|
225
|
+
evidence: [],
|
|
226
|
+
gates: [],
|
|
227
|
+
id,
|
|
228
|
+
status: "pending"
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
function completedScheduledDependencyState(base, finishedAt) {
|
|
232
|
+
return {
|
|
233
|
+
...base,
|
|
234
|
+
attempts: positiveAttempts(base),
|
|
235
|
+
evidence: dependencyEvidence(base),
|
|
236
|
+
exitCode: base.exitCode ?? 0,
|
|
237
|
+
finishedAt: base.finishedAt ?? finishedAt,
|
|
238
|
+
output: base.output ?? "",
|
|
239
|
+
status: "passed"
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function positiveAttempts(state) {
|
|
243
|
+
return state.attempts > 0 ? state.attempts : 1;
|
|
244
|
+
}
|
|
245
|
+
function dependencyEvidence(state) {
|
|
246
|
+
return state.evidence.length > 0 ? state.evidence : ["dependency satisfied by scheduled workflow"];
|
|
247
|
+
}
|
|
248
|
+
function scheduledDependencyNodeIds(context, nodeId) {
|
|
249
|
+
const visited = /* @__PURE__ */ new Set();
|
|
250
|
+
const ordered = [];
|
|
251
|
+
const visit = (candidateId) => {
|
|
252
|
+
if (visited.has(candidateId)) return;
|
|
253
|
+
visited.add(candidateId);
|
|
254
|
+
const candidate = context.plan.graph.node(candidateId);
|
|
255
|
+
if (!candidate) return;
|
|
256
|
+
for (const need of candidate.needs) visit(need);
|
|
257
|
+
ordered.push(candidateId);
|
|
258
|
+
};
|
|
259
|
+
const node = context.plan.graph.node(nodeId);
|
|
260
|
+
for (const need of node?.needs ?? []) visit(need);
|
|
261
|
+
return ordered;
|
|
262
|
+
}
|
|
211
263
|
function cancelledFailure() {
|
|
212
264
|
return {
|
|
213
265
|
evidence: ["pipeline cancelled by AbortSignal"],
|
package/package.json
CHANGED
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"prepack": "bun run build:cli"
|
|
121
121
|
},
|
|
122
122
|
"type": "module",
|
|
123
|
-
"version": "1.27.
|
|
123
|
+
"version": "1.27.14",
|
|
124
124
|
"description": "Config-driven multi-agent pipeline runner for repository work",
|
|
125
125
|
"main": "./dist/index.js",
|
|
126
126
|
"types": "./dist/index.d.ts",
|