agentweaver 0.1.9 → 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.
Files changed (26) hide show
  1. package/README.md +60 -28
  2. package/dist/artifacts.js +1 -1
  3. package/dist/errors.js +7 -0
  4. package/dist/index.js +66 -34
  5. package/dist/interactive-ui.js +351 -44
  6. package/dist/pipeline/declarative-flows.js +7 -4
  7. package/dist/pipeline/flow-catalog.js +28 -21
  8. package/dist/pipeline/flow-specs/opencode/auto-opencode.json +1365 -0
  9. package/dist/pipeline/flow-specs/opencode/bugz/bug-analyze-opencode.json +382 -0
  10. package/dist/pipeline/flow-specs/opencode/bugz/bug-fix-opencode.json +56 -0
  11. package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-diff-review-opencode.json +308 -0
  12. package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-review-opencode.json +437 -0
  13. package/dist/pipeline/flow-specs/opencode/gitlab/mr-description-opencode.json +117 -0
  14. package/dist/pipeline/flow-specs/opencode/go/run-go-linter-loop-opencode.json +321 -0
  15. package/dist/pipeline/flow-specs/opencode/go/run-go-tests-loop-opencode.json +321 -0
  16. package/dist/pipeline/flow-specs/opencode/implement-opencode.json +64 -0
  17. package/dist/pipeline/flow-specs/{plan-opencode.json → opencode/plan-opencode.json} +4 -4
  18. package/dist/pipeline/flow-specs/opencode/review/review-fix-opencode.json +209 -0
  19. package/dist/pipeline/flow-specs/opencode/review/review-opencode.json +452 -0
  20. package/dist/pipeline/flow-specs/opencode/task-describe-opencode.json +148 -0
  21. package/dist/pipeline/spec-loader.js +18 -7
  22. package/dist/runtime/process-runner.js +45 -1
  23. package/package.json +1 -1
  24. package/dist/pipeline/flow-specs/preflight.json +0 -206
  25. package/dist/pipeline/flow-specs/run-linter-loop.json +0 -155
  26. package/dist/pipeline/flow-specs/run-tests-loop.json +0 -155
@@ -0,0 +1,437 @@
1
+ {
2
+ "kind": "gitlab-review-flow",
3
+ "version": 1,
4
+ "phases": [
5
+ {
6
+ "id": "gitlab_review",
7
+ "steps": [
8
+ {
9
+ "id": "collect_merge_request_url",
10
+ "node": "user-input",
11
+ "params": {
12
+ "formId": {
13
+ "const": "gitlab-review-input"
14
+ },
15
+ "title": {
16
+ "const": "GitLab Review"
17
+ },
18
+ "description": {
19
+ "const": "Укажи ссылку на GitLab merge request, чтобы загрузить комментарии код-ревью."
20
+ },
21
+ "fields": {
22
+ "const": [
23
+ {
24
+ "id": "merge_request_url",
25
+ "type": "text",
26
+ "label": "GitLab MR URL",
27
+ "help": "Например: https://gitlab.example.com/group/project/-/merge_requests/123",
28
+ "required": true,
29
+ "placeholder": "https://gitlab.example.com/group/project/-/merge_requests/123"
30
+ }
31
+ ]
32
+ },
33
+ "outputFile": {
34
+ "artifact": {
35
+ "kind": "gitlab-review-input-json-file",
36
+ "taskKey": {
37
+ "ref": "params.taskKey"
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "expect": [
43
+ {
44
+ "kind": "require-structured-artifacts",
45
+ "items": [
46
+ {
47
+ "path": {
48
+ "artifact": {
49
+ "kind": "gitlab-review-input-json-file",
50
+ "taskKey": {
51
+ "ref": "params.taskKey"
52
+ }
53
+ }
54
+ },
55
+ "schemaId": "user-input/v1"
56
+ }
57
+ ],
58
+ "message": "GitLab review input form produced invalid structured artifacts."
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "id": "fetch_gitlab_review",
64
+ "node": "fetch-gitlab-review",
65
+ "params": {
66
+ "mergeRequestUrl": {
67
+ "ref": "steps.gitlab_review.collect_merge_request_url.value.values.merge_request_url"
68
+ },
69
+ "outputFile": {
70
+ "artifact": {
71
+ "kind": "gitlab-review-file",
72
+ "taskKey": {
73
+ "ref": "params.taskKey"
74
+ }
75
+ }
76
+ },
77
+ "outputJsonFile": {
78
+ "artifact": {
79
+ "kind": "gitlab-review-json-file",
80
+ "taskKey": {
81
+ "ref": "params.taskKey"
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "expect": [
87
+ {
88
+ "kind": "require-file",
89
+ "path": {
90
+ "artifact": {
91
+ "kind": "gitlab-review-file",
92
+ "taskKey": {
93
+ "ref": "params.taskKey"
94
+ }
95
+ }
96
+ },
97
+ "message": "Fetch GitLab review node did not produce the markdown artifact."
98
+ },
99
+ {
100
+ "kind": "require-structured-artifacts",
101
+ "items": [
102
+ {
103
+ "path": {
104
+ "artifact": {
105
+ "kind": "gitlab-review-json-file",
106
+ "taskKey": {
107
+ "ref": "params.taskKey"
108
+ }
109
+ }
110
+ },
111
+ "schemaId": "gitlab-review/v1"
112
+ }
113
+ ],
114
+ "message": "Fetch GitLab review node produced invalid structured artifacts."
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ "id": "materialize_review_artifacts",
120
+ "node": "gitlab-review-artifacts",
121
+ "params": {
122
+ "gitlabReviewJsonFile": {
123
+ "artifact": {
124
+ "kind": "gitlab-review-json-file",
125
+ "taskKey": {
126
+ "ref": "params.taskKey"
127
+ }
128
+ }
129
+ },
130
+ "reviewFile": {
131
+ "artifact": {
132
+ "kind": "review-file",
133
+ "taskKey": {
134
+ "ref": "params.taskKey"
135
+ },
136
+ "iteration": {
137
+ "ref": "params.iteration"
138
+ }
139
+ }
140
+ },
141
+ "reviewJsonFile": {
142
+ "artifact": {
143
+ "kind": "review-json-file",
144
+ "taskKey": {
145
+ "ref": "params.taskKey"
146
+ },
147
+ "iteration": {
148
+ "ref": "params.iteration"
149
+ }
150
+ }
151
+ }
152
+ },
153
+ "expect": [
154
+ {
155
+ "kind": "require-artifacts",
156
+ "paths": {
157
+ "list": [
158
+ {
159
+ "artifact": {
160
+ "kind": "review-file",
161
+ "taskKey": {
162
+ "ref": "params.taskKey"
163
+ },
164
+ "iteration": {
165
+ "ref": "params.iteration"
166
+ }
167
+ }
168
+ }
169
+ ]
170
+ },
171
+ "message": "GitLab review materialization did not produce the required review artifact."
172
+ },
173
+ {
174
+ "kind": "require-structured-artifacts",
175
+ "items": [
176
+ {
177
+ "path": {
178
+ "artifact": {
179
+ "kind": "review-json-file",
180
+ "taskKey": {
181
+ "ref": "params.taskKey"
182
+ },
183
+ "iteration": {
184
+ "ref": "params.iteration"
185
+ }
186
+ }
187
+ },
188
+ "schemaId": "review-findings/v1"
189
+ }
190
+ ],
191
+ "message": "GitLab review materialization produced invalid structured review artifacts."
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "id": "summarize_review",
197
+ "when": {
198
+ "not": {
199
+ "ref": "context.dryRun"
200
+ }
201
+ },
202
+ "node": "opencode-prompt",
203
+ "prompt": {
204
+ "templateRef": "review-summary",
205
+ "vars": {
206
+ "review_file": {
207
+ "artifact": {
208
+ "kind": "review-file",
209
+ "taskKey": {
210
+ "ref": "params.taskKey"
211
+ },
212
+ "iteration": {
213
+ "ref": "params.iteration"
214
+ }
215
+ }
216
+ },
217
+ "review_summary_file": {
218
+ "artifact": {
219
+ "kind": "review-summary-file",
220
+ "taskKey": {
221
+ "ref": "params.taskKey"
222
+ },
223
+ "iteration": {
224
+ "ref": "params.iteration"
225
+ }
226
+ }
227
+ }
228
+ },
229
+ "format": "plain"
230
+ },
231
+ "params": {
232
+ "labelText": {
233
+ "const": "Preparing imported review summary"
234
+ },
235
+ "summaryTitle": {
236
+ "const": "Imported GitLab Comments"
237
+ },
238
+ "model": {
239
+ "const": "minimax-coding-plan/MiniMax-M2.7"
240
+ },
241
+ "outputFile": {
242
+ "artifact": {
243
+ "kind": "review-summary-file",
244
+ "taskKey": {
245
+ "ref": "params.taskKey"
246
+ },
247
+ "iteration": {
248
+ "ref": "params.iteration"
249
+ }
250
+ }
251
+ }
252
+ }
253
+ },
254
+ {
255
+ "id": "run_codex_review_reply",
256
+ "node": "opencode-prompt",
257
+ "prompt": {
258
+ "templateRef": "review-reply-project",
259
+ "vars": {
260
+ "review_file": {
261
+ "artifact": {
262
+ "kind": "review-file",
263
+ "taskKey": {
264
+ "ref": "params.taskKey"
265
+ },
266
+ "iteration": {
267
+ "ref": "params.iteration"
268
+ }
269
+ }
270
+ },
271
+ "review_json_file": {
272
+ "artifact": {
273
+ "kind": "review-json-file",
274
+ "taskKey": {
275
+ "ref": "params.taskKey"
276
+ },
277
+ "iteration": {
278
+ "ref": "params.iteration"
279
+ }
280
+ }
281
+ },
282
+ "review_reply_file": {
283
+ "artifact": {
284
+ "kind": "review-reply-file",
285
+ "taskKey": {
286
+ "ref": "params.taskKey"
287
+ },
288
+ "iteration": {
289
+ "ref": "params.iteration"
290
+ }
291
+ }
292
+ },
293
+ "review_reply_json_file": {
294
+ "artifact": {
295
+ "kind": "review-reply-json-file",
296
+ "taskKey": {
297
+ "ref": "params.taskKey"
298
+ },
299
+ "iteration": {
300
+ "ref": "params.iteration"
301
+ }
302
+ }
303
+ }
304
+ },
305
+ "extraPrompt": {
306
+ "ref": "params.extraPrompt"
307
+ },
308
+ "format": "task-prompt"
309
+ },
310
+ "params": {
311
+ "labelText": {
312
+ "template": "Running OpenCode review reply mode for imported GitLab review (iteration {iteration})",
313
+ "vars": {
314
+ "iteration": {
315
+ "ref": "params.iteration"
316
+ }
317
+ }
318
+ },
319
+ "model": {
320
+ "const": "minimax-coding-plan/MiniMax-M2.7"
321
+ }
322
+ },
323
+ "expect": [
324
+ {
325
+ "kind": "require-artifacts",
326
+ "when": {
327
+ "not": {
328
+ "ref": "context.dryRun"
329
+ }
330
+ },
331
+ "paths": {
332
+ "list": [
333
+ {
334
+ "artifact": {
335
+ "kind": "review-reply-file",
336
+ "taskKey": {
337
+ "ref": "params.taskKey"
338
+ },
339
+ "iteration": {
340
+ "ref": "params.iteration"
341
+ }
342
+ }
343
+ }
344
+ ]
345
+ },
346
+ "message": "Codex review reply did not produce the required review-reply artifact."
347
+ },
348
+ {
349
+ "kind": "require-structured-artifacts",
350
+ "when": {
351
+ "not": {
352
+ "ref": "context.dryRun"
353
+ }
354
+ },
355
+ "items": [
356
+ {
357
+ "path": {
358
+ "artifact": {
359
+ "kind": "review-reply-json-file",
360
+ "taskKey": {
361
+ "ref": "params.taskKey"
362
+ },
363
+ "iteration": {
364
+ "ref": "params.iteration"
365
+ }
366
+ }
367
+ },
368
+ "schemaId": "review-reply/v1"
369
+ }
370
+ ],
371
+ "message": "Codex review reply produced invalid structured artifacts."
372
+ }
373
+ ]
374
+ },
375
+ {
376
+ "id": "summarize_review_reply",
377
+ "when": {
378
+ "not": {
379
+ "ref": "context.dryRun"
380
+ }
381
+ },
382
+ "node": "opencode-prompt",
383
+ "prompt": {
384
+ "templateRef": "review-reply-summary",
385
+ "vars": {
386
+ "review_reply_file": {
387
+ "artifact": {
388
+ "kind": "review-reply-file",
389
+ "taskKey": {
390
+ "ref": "params.taskKey"
391
+ },
392
+ "iteration": {
393
+ "ref": "params.iteration"
394
+ }
395
+ }
396
+ },
397
+ "review_reply_summary_file": {
398
+ "artifact": {
399
+ "kind": "review-reply-summary-file",
400
+ "taskKey": {
401
+ "ref": "params.taskKey"
402
+ },
403
+ "iteration": {
404
+ "ref": "params.iteration"
405
+ }
406
+ }
407
+ }
408
+ },
409
+ "format": "plain"
410
+ },
411
+ "params": {
412
+ "labelText": {
413
+ "const": "Preparing OpenCode reply summary"
414
+ },
415
+ "summaryTitle": {
416
+ "const": "OpenCode Reply Summary"
417
+ },
418
+ "model": {
419
+ "const": "minimax-coding-plan/MiniMax-M2.7"
420
+ },
421
+ "outputFile": {
422
+ "artifact": {
423
+ "kind": "review-reply-summary-file",
424
+ "taskKey": {
425
+ "ref": "params.taskKey"
426
+ },
427
+ "iteration": {
428
+ "ref": "params.iteration"
429
+ }
430
+ }
431
+ }
432
+ }
433
+ }
434
+ ]
435
+ }
436
+ ]
437
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "kind": "mr-description-flow",
3
+ "version": 1,
4
+ "phases": [
5
+ {
6
+ "id": "mr_description",
7
+ "steps": [
8
+ {
9
+ "id": "run_codex_mr_description",
10
+ "node": "opencode-prompt",
11
+ "prompt": {
12
+ "templateRef": "mr-description",
13
+ "vars": {
14
+ "jira_task_file": {
15
+ "artifact": {
16
+ "kind": "jira-task-file",
17
+ "taskKey": {
18
+ "ref": "params.taskKey"
19
+ }
20
+ }
21
+ },
22
+ "mr_description_file": {
23
+ "artifact": {
24
+ "kind": "mr-description-file",
25
+ "taskKey": {
26
+ "ref": "params.taskKey"
27
+ }
28
+ }
29
+ },
30
+ "mr_description_json_file": {
31
+ "artifact": {
32
+ "kind": "mr-description-json-file",
33
+ "taskKey": {
34
+ "ref": "params.taskKey"
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "extraPrompt": {
40
+ "ref": "params.extraPrompt"
41
+ },
42
+ "format": "task-prompt"
43
+ },
44
+ "params": {
45
+ "labelText": {
46
+ "const": "Running OpenCode MR description mode"
47
+ },
48
+ "model": {
49
+ "const": "minimax-coding-plan/MiniMax-M2.7"
50
+ },
51
+ "requiredArtifacts": {
52
+ "list": [
53
+ {
54
+ "artifact": {
55
+ "kind": "mr-description-file",
56
+ "taskKey": {
57
+ "ref": "params.taskKey"
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "artifact": {
63
+ "kind": "mr-description-json-file",
64
+ "taskKey": {
65
+ "ref": "params.taskKey"
66
+ }
67
+ }
68
+ }
69
+ ]
70
+ }
71
+ },
72
+ "expect": [
73
+ {
74
+ "kind": "require-file",
75
+ "when": {
76
+ "not": {
77
+ "ref": "context.dryRun"
78
+ }
79
+ },
80
+ "path": {
81
+ "artifact": {
82
+ "kind": "mr-description-file",
83
+ "taskKey": {
84
+ "ref": "params.taskKey"
85
+ }
86
+ }
87
+ },
88
+ "message": "MR description mode did not produce the MR description artifact."
89
+ },
90
+ {
91
+ "kind": "require-structured-artifacts",
92
+ "when": {
93
+ "not": {
94
+ "ref": "context.dryRun"
95
+ }
96
+ },
97
+ "items": [
98
+ {
99
+ "path": {
100
+ "artifact": {
101
+ "kind": "mr-description-json-file",
102
+ "taskKey": {
103
+ "ref": "params.taskKey"
104
+ }
105
+ }
106
+ },
107
+ "schemaId": "mr-description/v1"
108
+ }
109
+ ],
110
+ "message": "MR description mode produced invalid structured artifacts."
111
+ }
112
+ ]
113
+ }
114
+ ]
115
+ }
116
+ ]
117
+ }