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,308 @@
1
+ {
2
+ "kind": "gitlab-diff-review-flow",
3
+ "version": 1,
4
+ "phases": [
5
+ {
6
+ "id": "gitlab_diff_review",
7
+ "steps": [
8
+ {
9
+ "id": "collect_merge_request_url",
10
+ "node": "user-input",
11
+ "params": {
12
+ "formId": {
13
+ "const": "gitlab-diff-review-input"
14
+ },
15
+ "title": {
16
+ "const": "GitLab Diff Review"
17
+ },
18
+ "description": {
19
+ "const": "Укажи ссылку на GitLab merge request, чтобы загрузить diff и запустить код-ревью через Claude Opus."
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-diff-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-diff-review-input-json-file",
50
+ "taskKey": {
51
+ "ref": "params.taskKey"
52
+ }
53
+ }
54
+ },
55
+ "schemaId": "user-input/v1"
56
+ }
57
+ ],
58
+ "message": "GitLab diff review input form produced invalid structured artifacts."
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "id": "fetch_gitlab_diff",
64
+ "node": "fetch-gitlab-diff",
65
+ "params": {
66
+ "mergeRequestUrl": {
67
+ "ref": "steps.gitlab_diff_review.collect_merge_request_url.value.values.merge_request_url"
68
+ },
69
+ "outputFile": {
70
+ "artifact": {
71
+ "kind": "gitlab-diff-file",
72
+ "taskKey": {
73
+ "ref": "params.taskKey"
74
+ }
75
+ }
76
+ },
77
+ "outputJsonFile": {
78
+ "artifact": {
79
+ "kind": "gitlab-diff-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-diff-file",
92
+ "taskKey": {
93
+ "ref": "params.taskKey"
94
+ }
95
+ }
96
+ },
97
+ "message": "Fetch GitLab diff node did not produce the markdown artifact."
98
+ },
99
+ {
100
+ "kind": "require-structured-artifacts",
101
+ "items": [
102
+ {
103
+ "path": {
104
+ "artifact": {
105
+ "kind": "gitlab-diff-json-file",
106
+ "taskKey": {
107
+ "ref": "params.taskKey"
108
+ }
109
+ }
110
+ },
111
+ "schemaId": "gitlab-mr-diff/v1"
112
+ }
113
+ ],
114
+ "message": "Fetch GitLab diff node produced invalid structured artifacts."
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ "id": "run_claude_diff_review",
120
+ "when": {
121
+ "not": {
122
+ "ref": "context.dryRun"
123
+ }
124
+ },
125
+ "node": "opencode-prompt",
126
+ "prompt": {
127
+ "templateRef": "gitlab-diff-review",
128
+ "vars": {
129
+ "gitlab_diff_file": {
130
+ "artifact": {
131
+ "kind": "gitlab-diff-file",
132
+ "taskKey": {
133
+ "ref": "params.taskKey"
134
+ }
135
+ }
136
+ },
137
+ "gitlab_diff_json_file": {
138
+ "artifact": {
139
+ "kind": "gitlab-diff-json-file",
140
+ "taskKey": {
141
+ "ref": "params.taskKey"
142
+ }
143
+ }
144
+ },
145
+ "review_file": {
146
+ "artifact": {
147
+ "kind": "review-file",
148
+ "taskKey": {
149
+ "ref": "params.taskKey"
150
+ },
151
+ "iteration": {
152
+ "ref": "params.iteration"
153
+ }
154
+ }
155
+ },
156
+ "review_json_file": {
157
+ "artifact": {
158
+ "kind": "review-json-file",
159
+ "taskKey": {
160
+ "ref": "params.taskKey"
161
+ },
162
+ "iteration": {
163
+ "ref": "params.iteration"
164
+ }
165
+ }
166
+ },
167
+ "ready_to_merge_file": {
168
+ "artifact": {
169
+ "kind": "ready-to-merge-file",
170
+ "taskKey": {
171
+ "ref": "params.taskKey"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "extraPrompt": {
177
+ "ref": "params.extraPrompt"
178
+ },
179
+ "format": "task-prompt"
180
+ },
181
+ "params": {
182
+ "labelText": {
183
+ "template": "Running OpenCode GitLab diff review (iteration {iteration})",
184
+ "vars": {
185
+ "iteration": {
186
+ "ref": "params.iteration"
187
+ }
188
+ }
189
+ },
190
+ "model": {
191
+ "const": "minimax-coding-plan/MiniMax-M2.7"
192
+ }
193
+ },
194
+ "expect": [
195
+ {
196
+ "kind": "require-artifacts",
197
+ "when": {
198
+ "not": {
199
+ "ref": "context.dryRun"
200
+ }
201
+ },
202
+ "paths": {
203
+ "list": [
204
+ {
205
+ "artifact": {
206
+ "kind": "review-file",
207
+ "taskKey": {
208
+ "ref": "params.taskKey"
209
+ },
210
+ "iteration": {
211
+ "ref": "params.iteration"
212
+ }
213
+ }
214
+ }
215
+ ]
216
+ },
217
+ "message": "Claude diff review did not produce the required review artifact."
218
+ },
219
+ {
220
+ "kind": "require-structured-artifacts",
221
+ "when": {
222
+ "not": {
223
+ "ref": "context.dryRun"
224
+ }
225
+ },
226
+ "items": [
227
+ {
228
+ "path": {
229
+ "artifact": {
230
+ "kind": "review-json-file",
231
+ "taskKey": {
232
+ "ref": "params.taskKey"
233
+ },
234
+ "iteration": {
235
+ "ref": "params.iteration"
236
+ }
237
+ }
238
+ },
239
+ "schemaId": "review-findings/v1"
240
+ }
241
+ ],
242
+ "message": "Claude diff review produced invalid structured artifacts."
243
+ }
244
+ ]
245
+ },
246
+ {
247
+ "id": "summarize_review",
248
+ "when": {
249
+ "not": {
250
+ "ref": "context.dryRun"
251
+ }
252
+ },
253
+ "node": "opencode-prompt",
254
+ "prompt": {
255
+ "templateRef": "review-summary",
256
+ "vars": {
257
+ "review_file": {
258
+ "artifact": {
259
+ "kind": "review-file",
260
+ "taskKey": {
261
+ "ref": "params.taskKey"
262
+ },
263
+ "iteration": {
264
+ "ref": "params.iteration"
265
+ }
266
+ }
267
+ },
268
+ "review_summary_file": {
269
+ "artifact": {
270
+ "kind": "review-summary-file",
271
+ "taskKey": {
272
+ "ref": "params.taskKey"
273
+ },
274
+ "iteration": {
275
+ "ref": "params.iteration"
276
+ }
277
+ }
278
+ }
279
+ },
280
+ "format": "plain"
281
+ },
282
+ "params": {
283
+ "labelText": {
284
+ "const": "Preparing GitLab diff review summary"
285
+ },
286
+ "summaryTitle": {
287
+ "const": "GitLab Diff Review"
288
+ },
289
+ "model": {
290
+ "const": "minimax-coding-plan/MiniMax-M2.7"
291
+ },
292
+ "outputFile": {
293
+ "artifact": {
294
+ "kind": "review-summary-file",
295
+ "taskKey": {
296
+ "ref": "params.taskKey"
297
+ },
298
+ "iteration": {
299
+ "ref": "params.iteration"
300
+ }
301
+ }
302
+ }
303
+ }
304
+ }
305
+ ]
306
+ }
307
+ ]
308
+ }