@oisincoveney/pipeline 3.15.4 → 3.15.5

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.
@@ -503,8 +503,8 @@ declare const configSchema: z.ZodObject<{
503
503
  schedules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
504
504
  description: z.ZodOptional<z.ZodString>;
505
505
  baseline: z.ZodEnum<{
506
- quick: "quick";
507
506
  execute: "execute";
507
+ quick: "quick";
508
508
  }>;
509
509
  max_parallel_nodes: z.ZodOptional<z.ZodNumber>;
510
510
  node_catalog: z.ZodOptional<z.ZodString>;
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
- fail: "fail";
17
16
  pass: "pass";
17
+ fail: "fail";
18
18
  skip: "skip";
19
19
  }>;
20
20
  summary: z.ZodOptional<z.ZodString>;
@@ -41,13 +41,13 @@ declare const mokaSubmitDirectHookSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
41
41
  }, z.core.$strict>], "kind">;
42
42
  declare const mokaSubmitDirectHooksSchema: z.ZodRecord<z.ZodEnum<{
43
43
  "workflow.start": "workflow.start";
44
- "node.finish": "node.finish";
45
- "node.start": "node.start";
46
44
  "workflow.success": "workflow.success";
47
45
  "workflow.failure": "workflow.failure";
48
46
  "workflow.complete": "workflow.complete";
47
+ "node.start": "node.start";
49
48
  "node.success": "node.success";
50
49
  "node.error": "node.error";
50
+ "node.finish": "node.finish";
51
51
  "gate.failure": "gate.failure";
52
52
  }> & z.core.$partial, z.ZodDiscriminatedUnion<[z.ZodObject<{
53
53
  failure: z.ZodDefault<z.ZodEnum<{
@@ -139,13 +139,13 @@ declare const mokaSubmitBaseOptionsSchema: z.ZodObject<{
139
139
  }, z.core.$strict>>;
140
140
  hooks: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
141
141
  "workflow.start": "workflow.start";
142
- "node.finish": "node.finish";
143
- "node.start": "node.start";
144
142
  "workflow.success": "workflow.success";
145
143
  "workflow.failure": "workflow.failure";
146
144
  "workflow.complete": "workflow.complete";
145
+ "node.start": "node.start";
147
146
  "node.success": "node.success";
148
147
  "node.error": "node.error";
148
+ "node.finish": "node.finish";
149
149
  "gate.failure": "gate.failure";
150
150
  }> & z.core.$partial, z.ZodDiscriminatedUnion<[z.ZodObject<{
151
151
  failure: z.ZodDefault<z.ZodEnum<{
@@ -244,13 +244,13 @@ declare const mokaGraphSubmitOptionsSchema: z.ZodObject<{
244
244
  }, z.core.$strict>>;
245
245
  hooks: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
246
246
  "workflow.start": "workflow.start";
247
- "node.finish": "node.finish";
248
- "node.start": "node.start";
249
247
  "workflow.success": "workflow.success";
250
248
  "workflow.failure": "workflow.failure";
251
249
  "workflow.complete": "workflow.complete";
250
+ "node.start": "node.start";
252
251
  "node.success": "node.success";
253
252
  "node.error": "node.error";
253
+ "node.finish": "node.finish";
254
254
  "gate.failure": "gate.failure";
255
255
  }> & z.core.$partial, z.ZodDiscriminatedUnion<[z.ZodObject<{
256
256
  failure: z.ZodDefault<z.ZodEnum<{
@@ -310,8 +310,8 @@ declare const mokaGraphSubmitOptionsSchema: z.ZodObject<{
310
310
  }, z.core.$strict>>;
311
311
  serviceAccountName: z.ZodOptional<z.ZodString>;
312
312
  mode: z.ZodEnum<{
313
- full: "full";
314
313
  quick: "quick";
314
+ full: "full";
315
315
  }>;
316
316
  schedulePath: z.ZodOptional<z.ZodString>;
317
317
  scheduleYaml: z.ZodOptional<z.ZodString>;
@@ -366,13 +366,13 @@ declare const mokaCommandSubmitOptionsSchema: z.ZodObject<{
366
366
  }, z.core.$strict>>;
367
367
  hooks: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
368
368
  "workflow.start": "workflow.start";
369
- "node.finish": "node.finish";
370
- "node.start": "node.start";
371
369
  "workflow.success": "workflow.success";
372
370
  "workflow.failure": "workflow.failure";
373
371
  "workflow.complete": "workflow.complete";
372
+ "node.start": "node.start";
374
373
  "node.success": "node.success";
375
374
  "node.error": "node.error";
375
+ "node.finish": "node.finish";
376
376
  "gate.failure": "gate.failure";
377
377
  }> & z.core.$partial, z.ZodDiscriminatedUnion<[z.ZodObject<{
378
378
  failure: z.ZodDefault<z.ZodEnum<{
@@ -483,13 +483,13 @@ declare const mokaSubmitOptionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
483
483
  }, z.core.$strict>>;
484
484
  hooks: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
485
485
  "workflow.start": "workflow.start";
486
- "node.finish": "node.finish";
487
- "node.start": "node.start";
488
486
  "workflow.success": "workflow.success";
489
487
  "workflow.failure": "workflow.failure";
490
488
  "workflow.complete": "workflow.complete";
489
+ "node.start": "node.start";
491
490
  "node.success": "node.success";
492
491
  "node.error": "node.error";
492
+ "node.finish": "node.finish";
493
493
  "gate.failure": "gate.failure";
494
494
  }> & z.core.$partial, z.ZodDiscriminatedUnion<[z.ZodObject<{
495
495
  failure: z.ZodDefault<z.ZodEnum<{
@@ -549,8 +549,8 @@ declare const mokaSubmitOptionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
549
549
  }, z.core.$strict>>;
550
550
  serviceAccountName: z.ZodOptional<z.ZodString>;
551
551
  mode: z.ZodEnum<{
552
- full: "full";
553
552
  quick: "quick";
553
+ full: "full";
554
554
  }>;
555
555
  schedulePath: z.ZodOptional<z.ZodString>;
556
556
  scheduleYaml: z.ZodOptional<z.ZodString>;
@@ -604,13 +604,13 @@ declare const mokaSubmitOptionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
604
604
  }, z.core.$strict>>;
605
605
  hooks: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
606
606
  "workflow.start": "workflow.start";
607
- "node.finish": "node.finish";
608
- "node.start": "node.start";
609
607
  "workflow.success": "workflow.success";
610
608
  "workflow.failure": "workflow.failure";
611
609
  "workflow.complete": "workflow.complete";
610
+ "node.start": "node.start";
612
611
  "node.success": "node.success";
613
612
  "node.error": "node.error";
613
+ "node.finish": "node.finish";
614
614
  "gate.failure": "gate.failure";
615
615
  }> & z.core.$partial, z.ZodDiscriminatedUnion<[z.ZodObject<{
616
616
  failure: z.ZodDefault<z.ZodEnum<{
@@ -48,8 +48,8 @@ declare const runnerDeliverySchema: z.ZodObject<{
48
48
  declare const mokaSubmissionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
49
49
  kind: z.ZodLiteral<"graph">;
50
50
  mode: z.ZodEnum<{
51
- full: "full";
52
51
  quick: "quick";
52
+ full: "full";
53
53
  }>;
54
54
  }, z.core.$strict>, z.ZodObject<{
55
55
  argv: z.ZodArray<z.ZodString>;
@@ -114,8 +114,8 @@ declare const runnerCommandPayloadSchema: z.ZodObject<{
114
114
  submission: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
115
115
  kind: z.ZodLiteral<"graph">;
116
116
  mode: z.ZodEnum<{
117
- full: "full";
118
117
  quick: "quick";
118
+ full: "full";
119
119
  }>;
120
120
  }, z.core.$strict>, z.ZodObject<{
121
121
  argv: z.ZodArray<z.ZodString>;
@@ -11,8 +11,8 @@ declare const runnerEventRecordSchema: z.ZodUnion<readonly [z.ZodObject<{
11
11
  runId: z.ZodString;
12
12
  sequence: z.ZodNumber;
13
13
  type: z.ZodEnum<{
14
- "workflow.planned": "workflow.planned";
15
14
  "workflow.start": "workflow.start";
15
+ "workflow.planned": "workflow.planned";
16
16
  }>;
17
17
  workflowPlan: z.ZodObject<{
18
18
  edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -58,10 +58,10 @@ declare const runnerEventRecordSchema: z.ZodUnion<readonly [z.ZodObject<{
58
58
  }>;
59
59
  }, z.core.$strip>;
60
60
  type: z.ZodEnum<{
61
+ "node.start": "node.start";
62
+ "node.finish": "node.finish";
61
63
  "agent.finish": "agent.finish";
62
64
  "agent.start": "agent.start";
63
- "node.finish": "node.finish";
64
- "node.start": "node.start";
65
65
  }>;
66
66
  }, z.core.$strip>, z.ZodObject<{
67
67
  at: z.ZodOptional<z.ZodString>;
@@ -108,8 +108,8 @@ declare const runnerEventRecordSchema: z.ZodUnion<readonly [z.ZodObject<{
108
108
  nodeId: z.ZodOptional<z.ZodString>;
109
109
  outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
110
110
  status: z.ZodEnum<{
111
- fail: "fail";
112
111
  pass: "pass";
112
+ fail: "fail";
113
113
  skip: "skip";
114
114
  }>;
115
115
  summary: z.ZodOptional<z.ZodString>;
@@ -256,8 +256,8 @@ declare const runnerEventBatchSchema: z.ZodObject<{
256
256
  runId: z.ZodString;
257
257
  sequence: z.ZodNumber;
258
258
  type: z.ZodEnum<{
259
- "workflow.planned": "workflow.planned";
260
259
  "workflow.start": "workflow.start";
260
+ "workflow.planned": "workflow.planned";
261
261
  }>;
262
262
  workflowPlan: z.ZodObject<{
263
263
  edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -303,10 +303,10 @@ declare const runnerEventBatchSchema: z.ZodObject<{
303
303
  }>;
304
304
  }, z.core.$strip>;
305
305
  type: z.ZodEnum<{
306
+ "node.start": "node.start";
307
+ "node.finish": "node.finish";
306
308
  "agent.finish": "agent.finish";
307
309
  "agent.start": "agent.start";
308
- "node.finish": "node.finish";
309
- "node.start": "node.start";
310
310
  }>;
311
311
  }, z.core.$strip>, z.ZodObject<{
312
312
  at: z.ZodOptional<z.ZodString>;
@@ -353,8 +353,8 @@ declare const runnerEventBatchSchema: z.ZodObject<{
353
353
  nodeId: z.ZodOptional<z.ZodString>;
354
354
  outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
355
355
  status: z.ZodEnum<{
356
- fail: "fail";
357
356
  pass: "pass";
357
+ fail: "fail";
358
358
  skip: "skip";
359
359
  }>;
360
360
  summary: z.ZodOptional<z.ZodString>;
@@ -7,6 +7,7 @@ import { renderHandoff } from "../handoff.js";
7
7
  import { gatewayServerForProfile } from "../../mcp/gateway-config.js";
8
8
  import { Effect } from "effect";
9
9
  //#region src/runtime/agent-node/prompt-rendering.ts
10
+ const OPEN_PULL_REQUEST_BUILTIN = "open-pull-request";
10
11
  const PROFILE_GRANT_DESCRIPTORS = [
11
12
  {
12
13
  label: "tools",
@@ -66,6 +67,7 @@ function agentPromptSections(inputs) {
66
67
  ...runtimeInstructionSections(instructions, repoMap),
67
68
  ...nodeIdentitySections(context, node),
68
69
  renderTaskContext(effectiveTaskContext(node, context)),
70
+ renderDeferredDeliverySection(node, context),
69
71
  renderProfileOutputContract(profile, context.worktreePath),
70
72
  renderGateOutputContract(node),
71
73
  "",
@@ -109,9 +111,11 @@ function renderDependencySection(nodeId, context) {
109
111
  return handoff ? renderHandoff(nodeId, handoff) : `## ${nodeId}\n${context.nodeStateStore.outputText(nodeId)}`;
110
112
  }
111
113
  function renderGateOutputContract(node) {
112
- const gates = node.gates ?? [];
113
- if (gates.some((gate) => gate.kind === "acceptance" && (gate.target === void 0 || gate.target === "stdout"))) return acceptanceGateOutputContract();
114
- return gates.some((gate) => gate.kind === "verdict" && (gate.target === void 0 || gate.target === "stdout")) ? verdictGateOutputContract() : "";
114
+ if (hasStdoutAcceptanceGate(node)) return acceptanceGateOutputContract();
115
+ return (node.gates ?? []).some((gate) => gate.kind === "verdict" && (gate.target === void 0 || gate.target === "stdout")) ? verdictGateOutputContract() : "";
116
+ }
117
+ function hasStdoutAcceptanceGate(node) {
118
+ return (node.gates ?? []).some((gate) => gate.kind === "acceptance" && (gate.target === void 0 || gate.target === "stdout"));
115
119
  }
116
120
  function acceptanceGateOutputContract() {
117
121
  return [
@@ -123,6 +127,35 @@ function acceptanceGateOutputContract() {
123
127
  "Use top-level \"verdict\":\"PASS\" only when every required acceptance criterion passes with evidence."
124
128
  ].join("\n");
125
129
  }
130
+ function renderDeferredDeliverySection(node, context) {
131
+ if (hasStdoutAcceptanceGate(node)) return "";
132
+ const deliveryNodeIds = downstreamBuiltinIds(node, context.plan.topologicalOrder, OPEN_PULL_REQUEST_BUILTIN);
133
+ if (deliveryNodeIds.length === 0) return "";
134
+ return [
135
+ "",
136
+ "Deferred delivery checks:",
137
+ `- Downstream node(s) ${deliveryNodeIds.join(", ")} own pull-request creation after this node.`,
138
+ "- Do not fail this node solely because a pull request does not exist yet.",
139
+ "- Verify only code, tests, review evidence, and artifacts available before delivery.",
140
+ "- Leave PR existence/URL evidence to downstream delivery or acceptance nodes."
141
+ ].join("\n");
142
+ }
143
+ function downstreamBuiltinIds(node, topologicalOrder, builtin) {
144
+ const nodesById = new Map(topologicalOrder.map((candidate) => [candidate.id, candidate]));
145
+ const seen = /* @__PURE__ */ new Set();
146
+ const pending = [...node.dependents];
147
+ const matches = [];
148
+ while (pending.length > 0) {
149
+ const id = pending.shift();
150
+ if (!id || seen.has(id)) continue;
151
+ seen.add(id);
152
+ const candidate = nodesById.get(id);
153
+ if (!candidate) continue;
154
+ if (candidate.kind === "builtin" && candidate.builtin === builtin) matches.push(candidate.id);
155
+ pending.push(...candidate.dependents);
156
+ }
157
+ return matches;
158
+ }
126
159
  function verdictGateOutputContract() {
127
160
  return [
128
161
  "",
package/package.json CHANGED
@@ -130,7 +130,7 @@
130
130
  "prepack": "bun run build:cli"
131
131
  },
132
132
  "type": "module",
133
- "version": "3.15.4",
133
+ "version": "3.15.5",
134
134
  "description": "Config-driven multi-agent pipeline runner for repository work",
135
135
  "main": "./dist/index.js",
136
136
  "types": "./dist/index.d.ts",