agentweaver 0.1.8 → 0.1.10
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/README.md +71 -25
- package/dist/artifacts.js +25 -1
- package/dist/errors.js +7 -0
- package/dist/executors/configs/fetch-gitlab-diff-config.js +3 -0
- package/dist/executors/configs/opencode-config.js +6 -0
- package/dist/executors/fetch-gitlab-diff-executor.js +26 -0
- package/dist/executors/jira-fetch-executor.js +8 -2
- package/dist/executors/opencode-executor.js +35 -0
- package/dist/gitlab.js +199 -5
- package/dist/index.js +215 -144
- package/dist/interactive-ui.js +363 -37
- package/dist/jira.js +116 -14
- package/dist/pipeline/auto-flow.js +1 -1
- package/dist/pipeline/declarative-flows.js +44 -6
- package/dist/pipeline/flow-catalog.js +73 -0
- package/dist/pipeline/flow-specs/auto.json +183 -1
- package/dist/pipeline/flow-specs/gitlab-diff-review.json +226 -0
- package/dist/pipeline/flow-specs/gitlab-review.json +1 -31
- package/dist/pipeline/flow-specs/opencode/auto-opencode.json +1365 -0
- package/dist/pipeline/flow-specs/opencode/bugz/bug-analyze-opencode.json +382 -0
- package/dist/pipeline/flow-specs/opencode/bugz/bug-fix-opencode.json +56 -0
- package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-diff-review-opencode.json +308 -0
- package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-review-opencode.json +437 -0
- package/dist/pipeline/flow-specs/opencode/gitlab/mr-description-opencode.json +117 -0
- package/dist/pipeline/flow-specs/opencode/go/run-go-linter-loop-opencode.json +321 -0
- package/dist/pipeline/flow-specs/opencode/go/run-go-tests-loop-opencode.json +321 -0
- package/dist/pipeline/flow-specs/opencode/implement-opencode.json +64 -0
- package/dist/pipeline/flow-specs/opencode/plan-opencode.json +603 -0
- package/dist/pipeline/flow-specs/opencode/review/review-fix-opencode.json +209 -0
- package/dist/pipeline/flow-specs/opencode/review/review-opencode.json +452 -0
- package/dist/pipeline/flow-specs/opencode/task-describe-opencode.json +148 -0
- package/dist/pipeline/flow-specs/plan.json +183 -1
- package/dist/pipeline/node-registry.js +80 -8
- package/dist/pipeline/nodes/fetch-gitlab-diff-node.js +34 -0
- package/dist/pipeline/nodes/flow-run-node.js +2 -2
- package/dist/pipeline/nodes/jira-fetch-node.js +26 -2
- package/dist/pipeline/nodes/opencode-prompt-node.js +32 -0
- package/dist/pipeline/nodes/planning-questions-form-node.js +69 -0
- package/dist/pipeline/nodes/user-input-node.js +9 -1
- package/dist/pipeline/prompt-registry.js +3 -1
- package/dist/pipeline/registry.js +10 -0
- package/dist/pipeline/spec-loader.js +48 -3
- package/dist/pipeline/spec-types.js +43 -1
- package/dist/pipeline/spec-validator.js +53 -7
- package/dist/pipeline/value-resolver.js +15 -1
- package/dist/prompts.js +47 -12
- package/dist/runtime/process-runner.js +45 -1
- package/dist/scope.js +24 -32
- package/dist/structured-artifact-schemas.json +154 -1
- package/dist/structured-artifacts.js +2 -0
- package/dist/user-input.js +7 -0
- package/package.json +1 -1
- package/dist/pipeline/flow-specs/preflight.json +0 -206
- package/dist/pipeline/flow-specs/run-linter-loop.json +0 -155
- package/dist/pipeline/flow-specs/run-tests-loop.json +0 -155
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kind": "task-describe-flow",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"phases": [
|
|
5
|
+
{
|
|
6
|
+
"id": "task_describe",
|
|
7
|
+
"steps": [
|
|
8
|
+
{
|
|
9
|
+
"id": "fetch_jira",
|
|
10
|
+
"node": "jira-fetch",
|
|
11
|
+
"params": {
|
|
12
|
+
"jiraApiUrl": {
|
|
13
|
+
"ref": "params.jiraApiUrl"
|
|
14
|
+
},
|
|
15
|
+
"outputFile": {
|
|
16
|
+
"artifact": {
|
|
17
|
+
"kind": "jira-task-file",
|
|
18
|
+
"taskKey": {
|
|
19
|
+
"ref": "params.taskKey"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"expect": [
|
|
25
|
+
{
|
|
26
|
+
"kind": "require-file",
|
|
27
|
+
"path": {
|
|
28
|
+
"artifact": {
|
|
29
|
+
"kind": "jira-task-file",
|
|
30
|
+
"taskKey": {
|
|
31
|
+
"ref": "params.taskKey"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"message": "Jira fetch node did not produce the Jira task file."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "run_codex_task_describe",
|
|
41
|
+
"node": "opencode-prompt",
|
|
42
|
+
"prompt": {
|
|
43
|
+
"templateRef": "task-describe",
|
|
44
|
+
"vars": {
|
|
45
|
+
"jira_task_file": {
|
|
46
|
+
"artifact": {
|
|
47
|
+
"kind": "jira-task-file",
|
|
48
|
+
"taskKey": {
|
|
49
|
+
"ref": "params.taskKey"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"jira_description_file": {
|
|
54
|
+
"artifact": {
|
|
55
|
+
"kind": "jira-description-file",
|
|
56
|
+
"taskKey": {
|
|
57
|
+
"ref": "params.taskKey"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"jira_description_json_file": {
|
|
62
|
+
"artifact": {
|
|
63
|
+
"kind": "jira-description-json-file",
|
|
64
|
+
"taskKey": {
|
|
65
|
+
"ref": "params.taskKey"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"extraPrompt": {
|
|
71
|
+
"ref": "params.extraPrompt"
|
|
72
|
+
},
|
|
73
|
+
"format": "task-prompt"
|
|
74
|
+
},
|
|
75
|
+
"params": {
|
|
76
|
+
"labelText": {
|
|
77
|
+
"const": "Running OpenCode task description mode"
|
|
78
|
+
},
|
|
79
|
+
"model": {
|
|
80
|
+
"const": "minimax-coding-plan/MiniMax-M2.7"
|
|
81
|
+
},
|
|
82
|
+
"requiredArtifacts": {
|
|
83
|
+
"list": [
|
|
84
|
+
{
|
|
85
|
+
"artifact": {
|
|
86
|
+
"kind": "jira-description-file",
|
|
87
|
+
"taskKey": {
|
|
88
|
+
"ref": "params.taskKey"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"artifact": {
|
|
94
|
+
"kind": "jira-description-json-file",
|
|
95
|
+
"taskKey": {
|
|
96
|
+
"ref": "params.taskKey"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"expect": [
|
|
104
|
+
{
|
|
105
|
+
"kind": "require-file",
|
|
106
|
+
"when": {
|
|
107
|
+
"not": {
|
|
108
|
+
"ref": "context.dryRun"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"path": {
|
|
112
|
+
"artifact": {
|
|
113
|
+
"kind": "jira-description-file",
|
|
114
|
+
"taskKey": {
|
|
115
|
+
"ref": "params.taskKey"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"message": "Task describe mode did not produce the Jira description artifact."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"kind": "require-structured-artifacts",
|
|
123
|
+
"when": {
|
|
124
|
+
"not": {
|
|
125
|
+
"ref": "context.dryRun"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"items": [
|
|
129
|
+
{
|
|
130
|
+
"path": {
|
|
131
|
+
"artifact": {
|
|
132
|
+
"kind": "jira-description-json-file",
|
|
133
|
+
"taskKey": {
|
|
134
|
+
"ref": "params.taskKey"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"schemaId": "jira-description/v1"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"message": "Task describe mode produced invalid structured artifacts."
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
@@ -15,6 +15,18 @@
|
|
|
15
15
|
"kind": "jira-task-file",
|
|
16
16
|
"taskKey": { "ref": "params.taskKey" }
|
|
17
17
|
}
|
|
18
|
+
},
|
|
19
|
+
"attachmentsManifestFile": {
|
|
20
|
+
"artifact": {
|
|
21
|
+
"kind": "jira-attachments-manifest-file",
|
|
22
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"attachmentsContextFile": {
|
|
26
|
+
"artifact": {
|
|
27
|
+
"kind": "jira-attachments-context-file",
|
|
28
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
29
|
+
}
|
|
18
30
|
}
|
|
19
31
|
},
|
|
20
32
|
"expect": [
|
|
@@ -27,6 +39,26 @@
|
|
|
27
39
|
}
|
|
28
40
|
},
|
|
29
41
|
"message": "Jira fetch node did not produce the Jira task file."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"kind": "require-file",
|
|
45
|
+
"path": {
|
|
46
|
+
"artifact": {
|
|
47
|
+
"kind": "jira-attachments-manifest-file",
|
|
48
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"message": "Jira fetch node did not produce the Jira attachments manifest file."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"kind": "require-file",
|
|
55
|
+
"path": {
|
|
56
|
+
"artifact": {
|
|
57
|
+
"kind": "jira-attachments-context-file",
|
|
58
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"message": "Jira fetch node did not produce the Jira attachments context file."
|
|
30
62
|
}
|
|
31
63
|
]
|
|
32
64
|
},
|
|
@@ -163,6 +195,139 @@
|
|
|
163
195
|
}
|
|
164
196
|
]
|
|
165
197
|
},
|
|
198
|
+
{
|
|
199
|
+
"id": "generate_planning_questions",
|
|
200
|
+
"node": "codex-local-prompt",
|
|
201
|
+
"prompt": {
|
|
202
|
+
"templateRef": "plan-questions",
|
|
203
|
+
"vars": {
|
|
204
|
+
"jira_task_file": {
|
|
205
|
+
"artifact": {
|
|
206
|
+
"kind": "jira-task-file",
|
|
207
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"jira_attachments_manifest_file": {
|
|
211
|
+
"artifact": {
|
|
212
|
+
"kind": "jira-attachments-manifest-file",
|
|
213
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"jira_attachments_context_file": {
|
|
217
|
+
"artifact": {
|
|
218
|
+
"kind": "jira-attachments-context-file",
|
|
219
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"planning_questions_json_file": {
|
|
223
|
+
"artifact": {
|
|
224
|
+
"kind": "planning-questions-json-file",
|
|
225
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
230
|
+
"format": "task-prompt"
|
|
231
|
+
},
|
|
232
|
+
"params": {
|
|
233
|
+
"labelText": { "const": "Generating planning questions" },
|
|
234
|
+
"model": { "const": "gpt-5.4" },
|
|
235
|
+
"requiredArtifacts": {
|
|
236
|
+
"list": [
|
|
237
|
+
{
|
|
238
|
+
"artifact": {
|
|
239
|
+
"kind": "planning-questions-json-file",
|
|
240
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"expect": [
|
|
247
|
+
{
|
|
248
|
+
"kind": "require-artifacts",
|
|
249
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
250
|
+
"paths": {
|
|
251
|
+
"list": [
|
|
252
|
+
{
|
|
253
|
+
"artifact": {
|
|
254
|
+
"kind": "planning-questions-json-file",
|
|
255
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"message": "Planning questions step did not produce the questions artifact."
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"kind": "require-structured-artifacts",
|
|
264
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
265
|
+
"items": [
|
|
266
|
+
{
|
|
267
|
+
"path": {
|
|
268
|
+
"artifact": {
|
|
269
|
+
"kind": "planning-questions-json-file",
|
|
270
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"schemaId": "planning-questions/v1"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"message": "Planning questions step produced invalid structured artifacts."
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"id": "build_planning_questions_form",
|
|
282
|
+
"node": "planning-questions-form",
|
|
283
|
+
"params": {
|
|
284
|
+
"planningQuestionsJsonFile": {
|
|
285
|
+
"artifact": {
|
|
286
|
+
"kind": "planning-questions-json-file",
|
|
287
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"formId": { "const": "planning-questions" },
|
|
291
|
+
"title": { "const": "Planning Questions" },
|
|
292
|
+
"description": {
|
|
293
|
+
"const": "Ответьте на вопросы модели, если они нужны для точного design/plan. Если вопросов нет, шаг завершится автоматически."
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"id": "collect_planning_answers",
|
|
299
|
+
"node": "user-input",
|
|
300
|
+
"params": {
|
|
301
|
+
"formId": { "ref": "steps.plan.build_planning_questions_form.value.formId" },
|
|
302
|
+
"title": { "ref": "steps.plan.build_planning_questions_form.value.title" },
|
|
303
|
+
"description": { "ref": "steps.plan.build_planning_questions_form.value.description" },
|
|
304
|
+
"submitLabel": { "const": "Continue planning" },
|
|
305
|
+
"fields": { "ref": "steps.plan.build_planning_questions_form.value.fields" },
|
|
306
|
+
"outputFile": {
|
|
307
|
+
"artifact": {
|
|
308
|
+
"kind": "planning-answers-json-file",
|
|
309
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"expect": [
|
|
314
|
+
{
|
|
315
|
+
"kind": "require-structured-artifacts",
|
|
316
|
+
"items": [
|
|
317
|
+
{
|
|
318
|
+
"path": {
|
|
319
|
+
"artifact": {
|
|
320
|
+
"kind": "planning-answers-json-file",
|
|
321
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"schemaId": "user-input/v1"
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
"message": "Planning answers input is missing or invalid."
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
},
|
|
166
331
|
{
|
|
167
332
|
"id": "run_codex_plan",
|
|
168
333
|
"node": "codex-local-prompt",
|
|
@@ -175,6 +340,18 @@
|
|
|
175
340
|
"taskKey": { "ref": "params.taskKey" }
|
|
176
341
|
}
|
|
177
342
|
},
|
|
343
|
+
"jira_attachments_manifest_file": {
|
|
344
|
+
"artifact": {
|
|
345
|
+
"kind": "jira-attachments-manifest-file",
|
|
346
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"jira_attachments_context_file": {
|
|
350
|
+
"artifact": {
|
|
351
|
+
"kind": "jira-attachments-context-file",
|
|
352
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
353
|
+
}
|
|
354
|
+
},
|
|
178
355
|
"design_file": {
|
|
179
356
|
"artifact": {
|
|
180
357
|
"kind": "design-file",
|
|
@@ -212,7 +389,12 @@
|
|
|
212
389
|
}
|
|
213
390
|
}
|
|
214
391
|
},
|
|
215
|
-
"extraPrompt": {
|
|
392
|
+
"extraPrompt": {
|
|
393
|
+
"appendPrompt": {
|
|
394
|
+
"base": { "ref": "params.extraPrompt" },
|
|
395
|
+
"suffix": { "ref": "steps.plan.collect_planning_answers.value.promptSuffix" }
|
|
396
|
+
}
|
|
397
|
+
},
|
|
216
398
|
"format": "task-prompt"
|
|
217
399
|
},
|
|
218
400
|
"params": {
|
|
@@ -3,6 +3,7 @@ import { claudePromptNode } from "./nodes/claude-prompt-node.js";
|
|
|
3
3
|
import { codexDockerPromptNode } from "./nodes/codex-docker-prompt-node.js";
|
|
4
4
|
import { codexLocalPromptNode } from "./nodes/codex-local-prompt-node.js";
|
|
5
5
|
import { commandCheckNode } from "./nodes/command-check-node.js";
|
|
6
|
+
import { fetchGitLabDiffNode } from "./nodes/fetch-gitlab-diff-node.js";
|
|
6
7
|
import { fetchGitLabReviewNode } from "./nodes/fetch-gitlab-review-node.js";
|
|
7
8
|
import { fileCheckNode } from "./nodes/file-check-node.js";
|
|
8
9
|
import { flowRunNode } from "./nodes/flow-run-node.js";
|
|
@@ -10,7 +11,9 @@ import { gitlabReviewArtifactsNode } from "./nodes/gitlab-review-artifacts-node.
|
|
|
10
11
|
import { jiraFetchNode } from "./nodes/jira-fetch-node.js";
|
|
11
12
|
import { jiraIssueCheckNode } from "./nodes/jira-issue-check-node.js";
|
|
12
13
|
import { localScriptCheckNode } from "./nodes/local-script-check-node.js";
|
|
14
|
+
import { opencodePromptNode } from "./nodes/opencode-prompt-node.js";
|
|
13
15
|
import { planCodexNode } from "./nodes/plan-codex-node.js";
|
|
16
|
+
import { planningQuestionsFormNode } from "./nodes/planning-questions-form-node.js";
|
|
14
17
|
import { reviewClaudeNode } from "./nodes/review-claude-node.js";
|
|
15
18
|
import { reviewFindingsFormNode } from "./nodes/review-findings-form-node.js";
|
|
16
19
|
import { reviewReplyCodexNode } from "./nodes/review-reply-codex-node.js";
|
|
@@ -23,6 +26,7 @@ const builtInNodes = {
|
|
|
23
26
|
"codex-docker-prompt": codexDockerPromptNode,
|
|
24
27
|
"codex-local-prompt": codexLocalPromptNode,
|
|
25
28
|
"command-check": commandCheckNode,
|
|
29
|
+
"fetch-gitlab-diff": fetchGitLabDiffNode,
|
|
26
30
|
"fetch-gitlab-review": fetchGitLabReviewNode,
|
|
27
31
|
"file-check": fileCheckNode,
|
|
28
32
|
"flow-run": flowRunNode,
|
|
@@ -30,7 +34,9 @@ const builtInNodes = {
|
|
|
30
34
|
"jira-fetch": jiraFetchNode,
|
|
31
35
|
"jira-issue-check": jiraIssueCheckNode,
|
|
32
36
|
"local-script-check": localScriptCheckNode,
|
|
37
|
+
"opencode-prompt": opencodePromptNode,
|
|
33
38
|
"plan-codex": planCodexNode,
|
|
39
|
+
"planning-questions-form": planningQuestionsFormNode,
|
|
34
40
|
"review-claude": reviewClaudeNode,
|
|
35
41
|
"review-findings-form": reviewFindingsFormNode,
|
|
36
42
|
"review-reply-codex": reviewReplyCodexNode,
|
|
@@ -39,31 +45,76 @@ const builtInNodes = {
|
|
|
39
45
|
"verify-build": verifyBuildNode,
|
|
40
46
|
};
|
|
41
47
|
const builtInNodeMetadata = {
|
|
42
|
-
"build-failure-summary": {
|
|
43
|
-
|
|
48
|
+
"build-failure-summary": {
|
|
49
|
+
kind: "build-failure-summary",
|
|
50
|
+
version: 1,
|
|
51
|
+
prompt: "forbidden",
|
|
52
|
+
requiredParams: ["output"],
|
|
53
|
+
executors: ["process"],
|
|
54
|
+
},
|
|
55
|
+
"claude-prompt": {
|
|
56
|
+
kind: "claude-prompt",
|
|
57
|
+
version: 1,
|
|
58
|
+
prompt: "required",
|
|
59
|
+
requiredParams: ["labelText"],
|
|
60
|
+
executors: ["claude"],
|
|
61
|
+
},
|
|
44
62
|
"codex-docker-prompt": {
|
|
45
63
|
kind: "codex-docker-prompt",
|
|
46
64
|
version: 1,
|
|
47
65
|
prompt: "required",
|
|
48
66
|
requiredParams: ["dockerComposeFile", "labelText"],
|
|
67
|
+
executors: ["codex-docker"],
|
|
68
|
+
},
|
|
69
|
+
"codex-local-prompt": {
|
|
70
|
+
kind: "codex-local-prompt",
|
|
71
|
+
version: 1,
|
|
72
|
+
prompt: "required",
|
|
73
|
+
requiredParams: ["labelText"],
|
|
74
|
+
executors: ["codex-local"],
|
|
75
|
+
},
|
|
76
|
+
"command-check": {
|
|
77
|
+
kind: "command-check",
|
|
78
|
+
version: 1,
|
|
79
|
+
prompt: "forbidden",
|
|
80
|
+
requiredParams: ["commands"],
|
|
81
|
+
executors: ["command-check"],
|
|
82
|
+
},
|
|
83
|
+
"fetch-gitlab-diff": {
|
|
84
|
+
kind: "fetch-gitlab-diff",
|
|
85
|
+
version: 1,
|
|
86
|
+
prompt: "forbidden",
|
|
87
|
+
requiredParams: ["mergeRequestUrl", "outputFile", "outputJsonFile"],
|
|
88
|
+
executors: ["fetch-gitlab-diff"],
|
|
49
89
|
},
|
|
50
|
-
"codex-local-prompt": { kind: "codex-local-prompt", version: 1, prompt: "required", requiredParams: ["labelText"] },
|
|
51
|
-
"command-check": { kind: "command-check", version: 1, prompt: "forbidden", requiredParams: ["commands"] },
|
|
52
90
|
"fetch-gitlab-review": {
|
|
53
91
|
kind: "fetch-gitlab-review",
|
|
54
92
|
version: 1,
|
|
55
93
|
prompt: "forbidden",
|
|
56
94
|
requiredParams: ["mergeRequestUrl", "outputFile", "outputJsonFile"],
|
|
95
|
+
executors: ["fetch-gitlab-review"],
|
|
57
96
|
},
|
|
58
97
|
"file-check": { kind: "file-check", version: 1, prompt: "forbidden", requiredParams: ["path"] },
|
|
59
|
-
"flow-run": {
|
|
98
|
+
"flow-run": {
|
|
99
|
+
kind: "flow-run",
|
|
100
|
+
version: 1,
|
|
101
|
+
prompt: "forbidden",
|
|
102
|
+
requiredParams: ["fileName"],
|
|
103
|
+
nestedFlowParam: "fileName",
|
|
104
|
+
},
|
|
60
105
|
"gitlab-review-artifacts": {
|
|
61
106
|
kind: "gitlab-review-artifacts",
|
|
62
107
|
version: 1,
|
|
63
108
|
prompt: "forbidden",
|
|
64
109
|
requiredParams: ["gitlabReviewJsonFile", "reviewFile", "reviewJsonFile"],
|
|
65
110
|
},
|
|
66
|
-
"jira-fetch": {
|
|
111
|
+
"jira-fetch": {
|
|
112
|
+
kind: "jira-fetch",
|
|
113
|
+
version: 1,
|
|
114
|
+
prompt: "forbidden",
|
|
115
|
+
requiredParams: ["jiraApiUrl", "outputFile"],
|
|
116
|
+
executors: ["jira-fetch"],
|
|
117
|
+
},
|
|
67
118
|
"jira-issue-check": {
|
|
68
119
|
kind: "jira-issue-check",
|
|
69
120
|
version: 1,
|
|
@@ -71,12 +122,26 @@ const builtInNodeMetadata = {
|
|
|
71
122
|
requiredParams: ["jiraTaskFile", "allowedIssueTypes"],
|
|
72
123
|
},
|
|
73
124
|
"local-script-check": { kind: "local-script-check", version: 1, prompt: "forbidden", requiredParams: ["argv", "labelText"] },
|
|
74
|
-
"
|
|
125
|
+
"opencode-prompt": { kind: "opencode-prompt", version: 1, prompt: "required", requiredParams: ["labelText"] },
|
|
126
|
+
"plan-codex": {
|
|
127
|
+
kind: "plan-codex",
|
|
128
|
+
version: 1,
|
|
129
|
+
prompt: "forbidden",
|
|
130
|
+
requiredParams: ["prompt", "requiredArtifacts"],
|
|
131
|
+
executors: ["codex-local"],
|
|
132
|
+
},
|
|
133
|
+
"planning-questions-form": {
|
|
134
|
+
kind: "planning-questions-form",
|
|
135
|
+
version: 1,
|
|
136
|
+
prompt: "forbidden",
|
|
137
|
+
requiredParams: ["planningQuestionsJsonFile", "formId", "title"],
|
|
138
|
+
},
|
|
75
139
|
"review-claude": {
|
|
76
140
|
kind: "review-claude",
|
|
77
141
|
version: 1,
|
|
78
142
|
prompt: "forbidden",
|
|
79
143
|
requiredParams: ["jiraTaskFile", "taskKey", "iteration", "claudeCmd"],
|
|
144
|
+
executors: ["claude"],
|
|
80
145
|
},
|
|
81
146
|
"review-findings-form": {
|
|
82
147
|
kind: "review-findings-form",
|
|
@@ -89,6 +154,7 @@ const builtInNodeMetadata = {
|
|
|
89
154
|
version: 1,
|
|
90
155
|
prompt: "forbidden",
|
|
91
156
|
requiredParams: ["jiraTaskFile", "taskKey", "iteration", "codexCmd"],
|
|
157
|
+
executors: ["codex-local"],
|
|
92
158
|
},
|
|
93
159
|
"summary-file-load": { kind: "summary-file-load", version: 1, prompt: "forbidden", requiredParams: ["path"] },
|
|
94
160
|
"user-input": {
|
|
@@ -97,7 +163,13 @@ const builtInNodeMetadata = {
|
|
|
97
163
|
prompt: "forbidden",
|
|
98
164
|
requiredParams: ["formId", "title", "fields", "outputFile"],
|
|
99
165
|
},
|
|
100
|
-
"verify-build": {
|
|
166
|
+
"verify-build": {
|
|
167
|
+
kind: "verify-build",
|
|
168
|
+
version: 1,
|
|
169
|
+
prompt: "forbidden",
|
|
170
|
+
requiredParams: ["dockerComposeFile", "labelText"],
|
|
171
|
+
executors: ["verify-build"],
|
|
172
|
+
},
|
|
101
173
|
};
|
|
102
174
|
export function createNodeRegistry() {
|
|
103
175
|
return {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { toExecutorContext } from "../types.js";
|
|
2
|
+
export const fetchGitLabDiffNode = {
|
|
3
|
+
kind: "fetch-gitlab-diff",
|
|
4
|
+
version: 1,
|
|
5
|
+
async run(context, params) {
|
|
6
|
+
const executor = context.executors.get("fetch-gitlab-diff");
|
|
7
|
+
const value = await executor.execute(toExecutorContext(context), {
|
|
8
|
+
mergeRequestUrl: params.mergeRequestUrl,
|
|
9
|
+
outputFile: params.outputFile,
|
|
10
|
+
outputJsonFile: params.outputJsonFile,
|
|
11
|
+
}, executor.defaultConfig);
|
|
12
|
+
return {
|
|
13
|
+
value,
|
|
14
|
+
outputs: [
|
|
15
|
+
{ kind: "artifact", path: params.outputFile, required: true },
|
|
16
|
+
{ kind: "artifact", path: params.outputJsonFile, required: true },
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
checks(_context, params) {
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
kind: "require-file",
|
|
24
|
+
path: params.outputFile,
|
|
25
|
+
message: `Fetch GitLab diff node did not produce ${params.outputFile}.`,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
kind: "require-file",
|
|
29
|
+
path: params.outputJsonFile,
|
|
30
|
+
message: `Fetch GitLab diff node did not produce ${params.outputJsonFile}.`,
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { printInfo } from "../../tui.js";
|
|
2
2
|
import { runExpandedPhase } from "../declarative-flow-runner.js";
|
|
3
|
-
import {
|
|
3
|
+
import { loadNamedDeclarativeFlow } from "../declarative-flows.js";
|
|
4
4
|
export const flowRunNode = {
|
|
5
5
|
kind: "flow-run",
|
|
6
6
|
version: 1,
|
|
@@ -12,7 +12,7 @@ export const flowRunNode = {
|
|
|
12
12
|
if (labelText) {
|
|
13
13
|
printInfo(String(labelText));
|
|
14
14
|
}
|
|
15
|
-
const flow =
|
|
15
|
+
const flow = loadNamedDeclarativeFlow(fileName, context.cwd);
|
|
16
16
|
const executionState = {
|
|
17
17
|
flowKind: flow.kind,
|
|
18
18
|
flowVersion: flow.version,
|
|
@@ -7,19 +7,43 @@ export const jiraFetchNode = {
|
|
|
7
7
|
const value = await executor.execute(toExecutorContext(context), {
|
|
8
8
|
jiraApiUrl: params.jiraApiUrl,
|
|
9
9
|
outputFile: params.outputFile,
|
|
10
|
+
...(params.attachmentsManifestFile ? { attachmentsManifestFile: params.attachmentsManifestFile } : {}),
|
|
11
|
+
...(params.attachmentsContextFile ? { attachmentsContextFile: params.attachmentsContextFile } : {}),
|
|
10
12
|
}, executor.defaultConfig);
|
|
13
|
+
const outputs = [{ kind: "file", path: params.outputFile, required: true }];
|
|
14
|
+
if (params.attachmentsManifestFile) {
|
|
15
|
+
outputs.push({ kind: "artifact", path: params.attachmentsManifestFile, required: true });
|
|
16
|
+
}
|
|
17
|
+
if (params.attachmentsContextFile) {
|
|
18
|
+
outputs.push({ kind: "artifact", path: params.attachmentsContextFile, required: true });
|
|
19
|
+
}
|
|
11
20
|
return {
|
|
12
21
|
value,
|
|
13
|
-
outputs
|
|
22
|
+
outputs,
|
|
14
23
|
};
|
|
15
24
|
},
|
|
16
25
|
checks(_context, params) {
|
|
17
|
-
|
|
26
|
+
const checks = [
|
|
18
27
|
{
|
|
19
28
|
kind: "require-file",
|
|
20
29
|
path: params.outputFile,
|
|
21
30
|
message: `Jira fetch node did not produce ${params.outputFile}.`,
|
|
22
31
|
},
|
|
23
32
|
];
|
|
33
|
+
if (params.attachmentsManifestFile) {
|
|
34
|
+
checks.push({
|
|
35
|
+
kind: "require-file",
|
|
36
|
+
path: params.attachmentsManifestFile,
|
|
37
|
+
message: `Jira fetch node did not produce ${params.attachmentsManifestFile}.`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (params.attachmentsContextFile) {
|
|
41
|
+
checks.push({
|
|
42
|
+
kind: "require-file",
|
|
43
|
+
path: params.attachmentsContextFile,
|
|
44
|
+
message: `Jira fetch node did not produce ${params.attachmentsContextFile}.`,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return checks;
|
|
24
48
|
},
|
|
25
49
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { printInfo, printPrompt } from "../../tui.js";
|
|
2
|
+
import { toExecutorContext } from "../types.js";
|
|
3
|
+
export const opencodePromptNode = {
|
|
4
|
+
kind: "opencode-prompt",
|
|
5
|
+
version: 1,
|
|
6
|
+
async run(context, params) {
|
|
7
|
+
printInfo(params.labelText);
|
|
8
|
+
printPrompt("OpenCode", params.prompt);
|
|
9
|
+
const executor = context.executors.get("opencode");
|
|
10
|
+
const value = await executor.execute(toExecutorContext(context), {
|
|
11
|
+
prompt: params.prompt,
|
|
12
|
+
...(params.model ? { model: params.model } : {}),
|
|
13
|
+
env: { ...context.env },
|
|
14
|
+
}, executor.defaultConfig);
|
|
15
|
+
return {
|
|
16
|
+
value,
|
|
17
|
+
outputs: (params.requiredArtifacts ?? []).map((path) => ({ kind: "artifact", path, required: true })),
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
checks(_context, params) {
|
|
21
|
+
if (!params.requiredArtifacts || params.requiredArtifacts.length === 0) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
return [
|
|
25
|
+
{
|
|
26
|
+
kind: "require-artifacts",
|
|
27
|
+
paths: params.requiredArtifacts,
|
|
28
|
+
message: params.missingArtifactsMessage ?? "OpenCode node did not produce required artifacts.",
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
},
|
|
32
|
+
};
|