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.
Files changed (55) hide show
  1. package/README.md +71 -25
  2. package/dist/artifacts.js +25 -1
  3. package/dist/errors.js +7 -0
  4. package/dist/executors/configs/fetch-gitlab-diff-config.js +3 -0
  5. package/dist/executors/configs/opencode-config.js +6 -0
  6. package/dist/executors/fetch-gitlab-diff-executor.js +26 -0
  7. package/dist/executors/jira-fetch-executor.js +8 -2
  8. package/dist/executors/opencode-executor.js +35 -0
  9. package/dist/gitlab.js +199 -5
  10. package/dist/index.js +215 -144
  11. package/dist/interactive-ui.js +363 -37
  12. package/dist/jira.js +116 -14
  13. package/dist/pipeline/auto-flow.js +1 -1
  14. package/dist/pipeline/declarative-flows.js +44 -6
  15. package/dist/pipeline/flow-catalog.js +73 -0
  16. package/dist/pipeline/flow-specs/auto.json +183 -1
  17. package/dist/pipeline/flow-specs/gitlab-diff-review.json +226 -0
  18. package/dist/pipeline/flow-specs/gitlab-review.json +1 -31
  19. package/dist/pipeline/flow-specs/opencode/auto-opencode.json +1365 -0
  20. package/dist/pipeline/flow-specs/opencode/bugz/bug-analyze-opencode.json +382 -0
  21. package/dist/pipeline/flow-specs/opencode/bugz/bug-fix-opencode.json +56 -0
  22. package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-diff-review-opencode.json +308 -0
  23. package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-review-opencode.json +437 -0
  24. package/dist/pipeline/flow-specs/opencode/gitlab/mr-description-opencode.json +117 -0
  25. package/dist/pipeline/flow-specs/opencode/go/run-go-linter-loop-opencode.json +321 -0
  26. package/dist/pipeline/flow-specs/opencode/go/run-go-tests-loop-opencode.json +321 -0
  27. package/dist/pipeline/flow-specs/opencode/implement-opencode.json +64 -0
  28. package/dist/pipeline/flow-specs/opencode/plan-opencode.json +603 -0
  29. package/dist/pipeline/flow-specs/opencode/review/review-fix-opencode.json +209 -0
  30. package/dist/pipeline/flow-specs/opencode/review/review-opencode.json +452 -0
  31. package/dist/pipeline/flow-specs/opencode/task-describe-opencode.json +148 -0
  32. package/dist/pipeline/flow-specs/plan.json +183 -1
  33. package/dist/pipeline/node-registry.js +80 -8
  34. package/dist/pipeline/nodes/fetch-gitlab-diff-node.js +34 -0
  35. package/dist/pipeline/nodes/flow-run-node.js +2 -2
  36. package/dist/pipeline/nodes/jira-fetch-node.js +26 -2
  37. package/dist/pipeline/nodes/opencode-prompt-node.js +32 -0
  38. package/dist/pipeline/nodes/planning-questions-form-node.js +69 -0
  39. package/dist/pipeline/nodes/user-input-node.js +9 -1
  40. package/dist/pipeline/prompt-registry.js +3 -1
  41. package/dist/pipeline/registry.js +10 -0
  42. package/dist/pipeline/spec-loader.js +48 -3
  43. package/dist/pipeline/spec-types.js +43 -1
  44. package/dist/pipeline/spec-validator.js +53 -7
  45. package/dist/pipeline/value-resolver.js +15 -1
  46. package/dist/prompts.js +47 -12
  47. package/dist/runtime/process-runner.js +45 -1
  48. package/dist/scope.js +24 -32
  49. package/dist/structured-artifact-schemas.json +154 -1
  50. package/dist/structured-artifacts.js +2 -0
  51. package/dist/user-input.js +7 -0
  52. package/package.json +1 -1
  53. package/dist/pipeline/flow-specs/preflight.json +0 -206
  54. package/dist/pipeline/flow-specs/run-linter-loop.json +0 -155
  55. 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
+ }