@oisincoveney/pipeline 3.15.4 → 3.15.6
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/defaults/profiles.yaml
CHANGED
|
@@ -154,7 +154,7 @@ profiles:
|
|
|
154
154
|
runner: opencode
|
|
155
155
|
scheduling_roles: [implementation]
|
|
156
156
|
description: Add focused failing tests for the requested behavior.
|
|
157
|
-
timeout_ms:
|
|
157
|
+
timeout_ms: 1800000
|
|
158
158
|
instructions: { inline: "This scheduled node is already dispatched by Moka; do direct repository work inside the current workspace. Do not invoke `moka run`, `moka submit`, `$dispatch`, `$scope`, `$execute`, or any nested Moka/workflow supervisor from this node. Add focused failing tests for the requested behavior only. Do not change production code. Only edit files matching test paths such as **/*.test.*, **/*.spec.*, **/*_test.*, **/__tests__/**, test/**, or tests/**. Tool findings about lint, types, complexity, or dead code must be resolved at source; comments must not hide them. If a gate flags your test, restructure the test (e.g. move restricted imports into shared support/fixture helpers). Return only valid JSON with top-level changes and verification. Every changes entry must include summary, why, and files. Include risks, followups, and lessons when present. Do not use Markdown fences or prose outside the JSON object." }
|
|
159
159
|
skills: [test]
|
|
160
160
|
mcp_servers: [pipeline-gateway]
|
|
@@ -169,7 +169,7 @@ profiles:
|
|
|
169
169
|
runner: opencode
|
|
170
170
|
scheduling_roles: [implementation]
|
|
171
171
|
description: Implement production code until the failing tests pass.
|
|
172
|
-
timeout_ms:
|
|
172
|
+
timeout_ms: 1800000
|
|
173
173
|
instructions: { inline: "This scheduled node is already dispatched by Moka; do direct repository work inside the current workspace. Do not invoke `moka run`, `moka submit`, `$dispatch`, `$scope`, `$execute`, or any nested Moka/workflow supervisor from this node. Implement the smallest production change that makes the failing tests pass. Tool findings about lint, types, complexity, or dead code must be resolved at source; comments must not hide them. Reduce complexity by extracting helpers, remove genuinely dead code, and migrate off deprecated APIs rather than hiding the warning. Return only valid JSON with top-level changes and verification. Every changes entry must include summary, why, and files. Include risks, followups, and lessons when present. Do not use Markdown fences or prose outside the JSON object." }
|
|
174
174
|
skills: [trace, test, fix, library-first-development]
|
|
175
175
|
mcp_servers: [pipeline-gateway]
|
package/dist/config/schemas.d.ts
CHANGED
|
@@ -226,8 +226,8 @@ declare const configSchema: z.ZodObject<{
|
|
|
226
226
|
policy: z.ZodOptional<z.ZodObject<{
|
|
227
227
|
commands: z.ZodOptional<z.ZodEnum<{
|
|
228
228
|
allow: "allow";
|
|
229
|
-
deny: "deny";
|
|
230
229
|
"trusted-only": "trusted-only";
|
|
230
|
+
deny: "deny";
|
|
231
231
|
}>>;
|
|
232
232
|
modules: z.ZodOptional<z.ZodEnum<{
|
|
233
233
|
allow: "allow";
|
|
@@ -255,8 +255,8 @@ declare const configSchema: z.ZodObject<{
|
|
|
255
255
|
global: "global";
|
|
256
256
|
}>>;
|
|
257
257
|
mode: z.ZodEnum<{
|
|
258
|
-
local: "local";
|
|
259
258
|
hosted: "hosted";
|
|
259
|
+
local: "local";
|
|
260
260
|
}>;
|
|
261
261
|
provider: z.ZodLiteral<"toolhive">;
|
|
262
262
|
authorization_env: z.ZodDefault<z.ZodString>;
|
|
@@ -300,10 +300,10 @@ declare const configSchema: z.ZodObject<{
|
|
|
300
300
|
}, z.core.$strict>>;
|
|
301
301
|
output: z.ZodOptional<z.ZodObject<{
|
|
302
302
|
format: z.ZodEnum<{
|
|
303
|
-
json_schema: "json_schema";
|
|
304
303
|
text: "text";
|
|
305
304
|
json: "json";
|
|
306
305
|
jsonl: "jsonl";
|
|
306
|
+
json_schema: "json_schema";
|
|
307
307
|
}>;
|
|
308
308
|
repair: z.ZodOptional<z.ZodObject<{
|
|
309
309
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -379,10 +379,10 @@ declare const configSchema: z.ZodObject<{
|
|
|
379
379
|
disabled: "disabled";
|
|
380
380
|
}>>>;
|
|
381
381
|
output_formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
382
|
-
json_schema: "json_schema";
|
|
383
382
|
text: "text";
|
|
384
383
|
json: "json";
|
|
385
384
|
jsonl: "jsonl";
|
|
385
|
+
json_schema: "json_schema";
|
|
386
386
|
}>>>;
|
|
387
387
|
rules: z.ZodOptional<z.ZodBoolean>;
|
|
388
388
|
skills: z.ZodOptional<z.ZodBoolean>;
|
package/dist/moka-submit.d.ts
CHANGED
|
@@ -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<{
|
|
@@ -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<{
|
|
@@ -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<{
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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.
|
|
133
|
+
"version": "3.15.6",
|
|
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",
|