@oisincoveney/pipeline 1.15.0 → 1.15.1
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/hooks.d.ts +1 -1
- package/dist/install-commands.js +1 -0
- package/dist/pipeline-init.js +1 -1
- package/dist/pipeline-runtime.d.ts +3 -227
- package/dist/pipeline-runtime.js +31 -1614
- package/dist/runner-job-contract.d.ts +1 -1
- package/dist/runtime/agent-node/agent-node.js +271 -0
- package/dist/runtime/agent-node/index.js +2 -0
- package/dist/runtime/builtins/builtins.js +48 -0
- package/dist/runtime/builtins/index.js +2 -0
- package/dist/runtime/changed-files/changed-files.js +34 -0
- package/dist/runtime/changed-files/index.js +2 -0
- package/dist/runtime/command-executor/command-executor.js +53 -0
- package/dist/runtime/command-executor/index.js +2 -0
- package/dist/runtime/context/context.js +93 -0
- package/dist/runtime/context/index.js +2 -0
- package/dist/runtime/contracts/contracts.d.ts +229 -0
- package/dist/runtime/contracts/index.d.ts +1 -0
- package/dist/runtime/drain-merge/drain-merge.js +154 -0
- package/dist/runtime/drain-merge/index.js +2 -0
- package/dist/runtime/events/events.js +259 -0
- package/dist/runtime/events/index.js +2 -0
- package/dist/runtime/gates/gates.js +296 -0
- package/dist/runtime/gates/index.js +2 -0
- package/dist/runtime/hooks/hooks.js +261 -0
- package/dist/runtime/hooks/index.js +2 -0
- package/dist/runtime/json-validation/index.js +2 -0
- package/dist/runtime/json-validation/json-validation.js +82 -0
- package/dist/runtime/parallel-node/index.js +2 -0
- package/dist/runtime/parallel-node/parallel-node.js +105 -0
- package/dist/runtime/worktrees/index.js +2 -0
- package/dist/runtime/worktrees/worktrees.js +55 -0
- package/dist/runtime-machines/contracts.d.ts +1 -2
- package/dist/runtime-machines/node-machine.d.ts +1 -0
- package/dist/runtime-machines/workflow-machine.d.ts +1 -0
- package/dist/schedule-planner.js +47 -1
- package/package.json +1 -1
package/dist/hooks.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ declare const hookResultSchema: z.ZodObject<{
|
|
|
13
13
|
taskContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
14
|
}, z.core.$strict>>;
|
|
15
15
|
status: z.ZodEnum<{
|
|
16
|
-
pass: "pass";
|
|
17
16
|
fail: "fail";
|
|
17
|
+
pass: "pass";
|
|
18
18
|
skip: "skip";
|
|
19
19
|
}>;
|
|
20
20
|
summary: z.ZodOptional<z.ZodString>;
|
package/dist/install-commands.js
CHANGED
|
@@ -145,6 +145,7 @@ function orchestratorBlock(config) {
|
|
|
145
145
|
return [
|
|
146
146
|
"Configured orchestrator:",
|
|
147
147
|
grants(orchestratorProfile(config)),
|
|
148
|
+
`hooks: ${Object.keys(config.hooks.functions).join(", ") || "none"}`,
|
|
148
149
|
"",
|
|
149
150
|
instructionsPointer(orchestratorProfile(config))
|
|
150
151
|
].join("\n");
|
package/dist/pipeline-init.js
CHANGED
|
@@ -568,7 +568,7 @@ const EPIC_TRACK_ITEM_SCHEMA = z.object({
|
|
|
568
568
|
title: z.string().optional()
|
|
569
569
|
});
|
|
570
570
|
function zodJsonSchema(schema) {
|
|
571
|
-
return JSON.stringify(z.toJSONSchema(schema, { target: "draft-
|
|
571
|
+
return JSON.stringify(z.toJSONSchema(schema, { target: "draft-2020-12" }), null, 2);
|
|
572
572
|
}
|
|
573
573
|
const RESEARCH_SCHEMA = zodJsonSchema(z.object({
|
|
574
574
|
ac: STRING_ARRAY_SCHEMA,
|
|
@@ -1,231 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AgentResult, RunnerExecutionOptions, RunnerLaunchPlan } from "./runner.js";
|
|
4
|
-
import { RuntimeActorDescriptor, RuntimeObservabilityEvent } from "./runtime-machines/contracts.js";
|
|
5
|
-
import { PlannedWorkflowNode, WorkflowExecutionPlan } from "./workflow-planner.js";
|
|
6
|
-
|
|
1
|
+
import { PipelineConfigError } from "./config.js";
|
|
2
|
+
import { AcceptanceCriterion, HookRuntimePolicy, NodeExecutionState, NodeStatus, PipelineRuntimeEvent, PipelineRuntimeObservabilityLevel, PipelineRuntimeOptions, PipelineRuntimeResult, PipelineTaskContext, RuntimeFailure, RuntimeGateResult, RuntimeNodeResult } from "./runtime/contracts/contracts.js";
|
|
7
3
|
//#region src/pipeline-runtime.d.ts
|
|
8
|
-
interface AcceptanceCriterion {
|
|
9
|
-
id: string;
|
|
10
|
-
text: string;
|
|
11
|
-
}
|
|
12
|
-
interface PipelineTaskContext {
|
|
13
|
-
acceptanceCriteria?: AcceptanceCriterion[];
|
|
14
|
-
description?: string;
|
|
15
|
-
id?: string;
|
|
16
|
-
title?: string;
|
|
17
|
-
}
|
|
18
|
-
interface HookRuntimePolicy {
|
|
19
|
-
allowCommandHooks?: boolean;
|
|
20
|
-
allowUntrustedCommandHooks?: boolean;
|
|
21
|
-
env?: Record<string, string>;
|
|
22
|
-
envPassthrough?: string[];
|
|
23
|
-
outputLimitBytes?: number;
|
|
24
|
-
timeoutMs?: number;
|
|
25
|
-
}
|
|
26
|
-
interface RuntimeFailure {
|
|
27
|
-
evidence: string[];
|
|
28
|
-
gate: string;
|
|
29
|
-
nodeId?: string;
|
|
30
|
-
reason: string;
|
|
31
|
-
}
|
|
32
|
-
interface RuntimeGateResult {
|
|
33
|
-
evidence: string[];
|
|
34
|
-
gateId: string;
|
|
35
|
-
kind: string;
|
|
36
|
-
nodeId: string;
|
|
37
|
-
passed: boolean;
|
|
38
|
-
reason?: string;
|
|
39
|
-
}
|
|
40
|
-
interface RuntimeNodeResult {
|
|
41
|
-
attempts: number;
|
|
42
|
-
evidence: string[];
|
|
43
|
-
exitCode: number;
|
|
44
|
-
nodeId: string;
|
|
45
|
-
output: string;
|
|
46
|
-
status: "failed" | "passed";
|
|
47
|
-
}
|
|
48
|
-
type NodeStatus = "cancelled" | "failed" | "gating" | "passed" | "pending" | "ready" | "running" | "skipped";
|
|
49
|
-
interface NodeExecutionState {
|
|
50
|
-
attempts: number;
|
|
51
|
-
evidence: string[];
|
|
52
|
-
exitCode?: number;
|
|
53
|
-
failure?: RuntimeFailure;
|
|
54
|
-
finishedAt?: string;
|
|
55
|
-
gates: RuntimeGateResult[];
|
|
56
|
-
id: string;
|
|
57
|
-
output?: string;
|
|
58
|
-
retry?: {
|
|
59
|
-
attempt: number;
|
|
60
|
-
delayMs: number;
|
|
61
|
-
evidence: string[];
|
|
62
|
-
exhausted: boolean;
|
|
63
|
-
gate: string;
|
|
64
|
-
reason: string;
|
|
65
|
-
retryReason: string;
|
|
66
|
-
scheduled: boolean;
|
|
67
|
-
};
|
|
68
|
-
startedAt?: string;
|
|
69
|
-
status: NodeStatus;
|
|
70
|
-
}
|
|
71
|
-
interface PipelineRuntimeResult {
|
|
72
|
-
agentInvocations: RunnerLaunchPlan[];
|
|
73
|
-
failureDetails: RuntimeFailure[];
|
|
74
|
-
gates: RuntimeGateResult[];
|
|
75
|
-
hookFailures: RuntimeFailure[];
|
|
76
|
-
nodeStates: Record<string, NodeExecutionState>;
|
|
77
|
-
nodes: RuntimeNodeResult[];
|
|
78
|
-
outcome: "CANCELLED" | "FAIL" | "PASS";
|
|
79
|
-
plan: WorkflowExecutionPlan;
|
|
80
|
-
}
|
|
81
|
-
type PipelineRuntimeObservabilityLevel = "info" | "warn";
|
|
82
|
-
type PipelineRuntimeEvent = {
|
|
83
|
-
parentNodeId?: string;
|
|
84
|
-
} & ({
|
|
85
|
-
edges: {
|
|
86
|
-
source: string;
|
|
87
|
-
target: string;
|
|
88
|
-
}[];
|
|
89
|
-
nodes: {
|
|
90
|
-
id: string;
|
|
91
|
-
kind: PlannedWorkflowNode["kind"];
|
|
92
|
-
needs: string[];
|
|
93
|
-
profile?: string;
|
|
94
|
-
runnerId?: string;
|
|
95
|
-
}[];
|
|
96
|
-
type: "workflow.planned";
|
|
97
|
-
workflowId: string;
|
|
98
|
-
} | {
|
|
99
|
-
nodeIds: string[];
|
|
100
|
-
type: "workflow.start";
|
|
101
|
-
workflowId: string;
|
|
102
|
-
} | {
|
|
103
|
-
attempt: number;
|
|
104
|
-
nodeId: string;
|
|
105
|
-
profile?: string;
|
|
106
|
-
runnerId?: string;
|
|
107
|
-
type: "node.start";
|
|
108
|
-
} | {
|
|
109
|
-
attempt: number;
|
|
110
|
-
exitCode: number;
|
|
111
|
-
nodeId: string;
|
|
112
|
-
profile?: string;
|
|
113
|
-
runnerId?: string;
|
|
114
|
-
status: RuntimeNodeResult["status"];
|
|
115
|
-
type: "node.finish";
|
|
116
|
-
} | {
|
|
117
|
-
attempt: number;
|
|
118
|
-
format: string;
|
|
119
|
-
nodeId: string;
|
|
120
|
-
output: unknown;
|
|
121
|
-
parseError?: string;
|
|
122
|
-
profile?: string;
|
|
123
|
-
schemaPath?: string;
|
|
124
|
-
type: "node.output.recorded";
|
|
125
|
-
} | {
|
|
126
|
-
attempt: number;
|
|
127
|
-
nodeId: string;
|
|
128
|
-
profile?: string;
|
|
129
|
-
runnerId?: string;
|
|
130
|
-
type: "agent.start";
|
|
131
|
-
} | {
|
|
132
|
-
attempt: number;
|
|
133
|
-
exitCode: number;
|
|
134
|
-
nodeId: string;
|
|
135
|
-
profile?: string;
|
|
136
|
-
runnerId?: string;
|
|
137
|
-
type: "agent.finish";
|
|
138
|
-
} | {
|
|
139
|
-
gateId: string;
|
|
140
|
-
kind: string;
|
|
141
|
-
nodeId: string;
|
|
142
|
-
type: "gate.start";
|
|
143
|
-
} | {
|
|
144
|
-
evidence?: string[];
|
|
145
|
-
gateId: string;
|
|
146
|
-
kind: string;
|
|
147
|
-
nodeId: string;
|
|
148
|
-
passed: boolean;
|
|
149
|
-
reason?: string;
|
|
150
|
-
type: "gate.finish";
|
|
151
|
-
} | {
|
|
152
|
-
nodeId: string;
|
|
153
|
-
path: string;
|
|
154
|
-
required: boolean;
|
|
155
|
-
type: "artifact.check.start";
|
|
156
|
-
} | {
|
|
157
|
-
nodeId: string;
|
|
158
|
-
passed: boolean;
|
|
159
|
-
path: string;
|
|
160
|
-
reason?: string;
|
|
161
|
-
required: boolean;
|
|
162
|
-
type: "artifact.check.finish";
|
|
163
|
-
} | {
|
|
164
|
-
event: HookEvent;
|
|
165
|
-
functionId: string;
|
|
166
|
-
gateId?: string;
|
|
167
|
-
hookId: string;
|
|
168
|
-
nodeId?: string;
|
|
169
|
-
required: boolean;
|
|
170
|
-
type: "hook.start";
|
|
171
|
-
workflowId: string;
|
|
172
|
-
} | {
|
|
173
|
-
event: HookEvent;
|
|
174
|
-
functionId: string;
|
|
175
|
-
gateId?: string;
|
|
176
|
-
hookId: string;
|
|
177
|
-
nodeId?: string;
|
|
178
|
-
passed: boolean;
|
|
179
|
-
reason?: string;
|
|
180
|
-
required: boolean;
|
|
181
|
-
type: "hook.finish";
|
|
182
|
-
workflowId: string;
|
|
183
|
-
} | {
|
|
184
|
-
artifacts?: HookResult["artifacts"];
|
|
185
|
-
event: HookEvent;
|
|
186
|
-
functionId: string;
|
|
187
|
-
gateId?: string;
|
|
188
|
-
hookId: string;
|
|
189
|
-
nodeId?: string;
|
|
190
|
-
outputs?: Record<string, unknown>;
|
|
191
|
-
status: HookResult["status"];
|
|
192
|
-
summary?: string;
|
|
193
|
-
type: "hook.result";
|
|
194
|
-
workflowId: string;
|
|
195
|
-
} | {
|
|
196
|
-
attempt: number;
|
|
197
|
-
nodeId: string;
|
|
198
|
-
passed: boolean;
|
|
199
|
-
reason?: string;
|
|
200
|
-
type: "output.repair";
|
|
201
|
-
} | {
|
|
202
|
-
actor: RuntimeActorDescriptor;
|
|
203
|
-
level: PipelineRuntimeObservabilityLevel;
|
|
204
|
-
name: RuntimeObservabilityEvent["type"];
|
|
205
|
-
nodeId?: string;
|
|
206
|
-
summary: string;
|
|
207
|
-
type: "runtime.observability";
|
|
208
|
-
workflowId: string;
|
|
209
|
-
} | {
|
|
210
|
-
outcome: PipelineRuntimeResult["outcome"];
|
|
211
|
-
type: "workflow.finish";
|
|
212
|
-
workflowId: string;
|
|
213
|
-
});
|
|
214
|
-
interface PipelineRuntimeOptions {
|
|
215
|
-
config?: PipelineConfig;
|
|
216
|
-
entrypoint?: string;
|
|
217
|
-
executor?: (plan: RunnerLaunchPlan, options: RunnerExecutionOptions) => AgentResult | Promise<AgentResult>;
|
|
218
|
-
hookPolicy?: HookRuntimePolicy;
|
|
219
|
-
maxParallelNodes?: number;
|
|
220
|
-
reporter?: (event: PipelineRuntimeEvent) => void;
|
|
221
|
-
runId?: string;
|
|
222
|
-
signal?: AbortSignal;
|
|
223
|
-
task: string;
|
|
224
|
-
taskContext?: PipelineTaskContext;
|
|
225
|
-
workflowId?: string;
|
|
226
|
-
worktreePath?: string;
|
|
227
|
-
}
|
|
228
4
|
declare function runPipelineFromConfig(options: PipelineRuntimeOptions): Promise<PipelineRuntimeResult>;
|
|
229
5
|
declare function formatConfigError(err: PipelineConfigError): string;
|
|
230
6
|
//#endregion
|
|
231
|
-
export { AcceptanceCriterion, HookRuntimePolicy, NodeExecutionState, NodeStatus, PipelineRuntimeEvent, PipelineRuntimeObservabilityLevel, PipelineRuntimeOptions, PipelineRuntimeResult, PipelineTaskContext, RuntimeFailure, RuntimeGateResult, RuntimeNodeResult, formatConfigError, runPipelineFromConfig };
|
|
7
|
+
export { type AcceptanceCriterion, type HookRuntimePolicy, type NodeExecutionState, type NodeStatus, type PipelineRuntimeEvent, type PipelineRuntimeObservabilityLevel, type PipelineRuntimeOptions, type PipelineRuntimeResult, type PipelineTaskContext, type RuntimeFailure, type RuntimeGateResult, type RuntimeNodeResult, formatConfigError, runPipelineFromConfig };
|