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,382 @@
1
+ {
2
+ "kind": "bug-analyze-flow",
3
+ "version": 1,
4
+ "phases": [
5
+ {
6
+ "id": "bug_analyze",
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": "check_bug_issue_type",
41
+ "node": "jira-issue-check",
42
+ "params": {
43
+ "labelText": {
44
+ "const": "Checking Jira issue type for bug analysis"
45
+ },
46
+ "jiraTaskFile": {
47
+ "artifact": {
48
+ "kind": "jira-task-file",
49
+ "taskKey": {
50
+ "ref": "params.taskKey"
51
+ }
52
+ }
53
+ },
54
+ "allowedIssueTypes": {
55
+ "const": [
56
+ "Bug",
57
+ "Ошибка"
58
+ ]
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "id": "load_existing_task_summary",
64
+ "when": {
65
+ "all": [
66
+ {
67
+ "not": {
68
+ "ref": "params.forceRefresh"
69
+ }
70
+ },
71
+ {
72
+ "exists": {
73
+ "artifact": {
74
+ "kind": "task-summary-file",
75
+ "taskKey": {
76
+ "ref": "params.taskKey"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ ]
82
+ },
83
+ "node": "summary-file-load",
84
+ "params": {
85
+ "path": {
86
+ "artifact": {
87
+ "kind": "task-summary-file",
88
+ "taskKey": {
89
+ "ref": "params.taskKey"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ },
95
+ {
96
+ "id": "generate_task_summary",
97
+ "when": {
98
+ "any": [
99
+ {
100
+ "ref": "params.forceRefresh"
101
+ },
102
+ {
103
+ "not": {
104
+ "exists": {
105
+ "artifact": {
106
+ "kind": "task-summary-file",
107
+ "taskKey": {
108
+ "ref": "params.taskKey"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ ]
115
+ },
116
+ "node": "opencode-prompt",
117
+ "prompt": {
118
+ "templateRef": "task-summary",
119
+ "vars": {
120
+ "jira_task_file": {
121
+ "artifact": {
122
+ "kind": "jira-task-file",
123
+ "taskKey": {
124
+ "ref": "params.taskKey"
125
+ }
126
+ }
127
+ },
128
+ "task_summary_file": {
129
+ "artifact": {
130
+ "kind": "task-summary-file",
131
+ "taskKey": {
132
+ "ref": "params.taskKey"
133
+ }
134
+ }
135
+ },
136
+ "task_summary_json_file": {
137
+ "artifact": {
138
+ "kind": "task-summary-json-file",
139
+ "taskKey": {
140
+ "ref": "params.taskKey"
141
+ }
142
+ }
143
+ }
144
+ },
145
+ "format": "plain"
146
+ },
147
+ "params": {
148
+ "labelText": {
149
+ "const": "Preparing task summary"
150
+ },
151
+ "outputFile": {
152
+ "artifact": {
153
+ "kind": "task-summary-file",
154
+ "taskKey": {
155
+ "ref": "params.taskKey"
156
+ }
157
+ }
158
+ },
159
+ "requiredArtifacts": {
160
+ "list": [
161
+ {
162
+ "artifact": {
163
+ "kind": "task-summary-json-file",
164
+ "taskKey": {
165
+ "ref": "params.taskKey"
166
+ }
167
+ }
168
+ }
169
+ ]
170
+ },
171
+ "model": {
172
+ "const": "minimax-coding-plan/MiniMax-M2.7"
173
+ }
174
+ },
175
+ "expect": [
176
+ {
177
+ "kind": "require-artifacts",
178
+ "when": {
179
+ "not": {
180
+ "ref": "context.dryRun"
181
+ }
182
+ },
183
+ "paths": {
184
+ "list": [
185
+ {
186
+ "artifact": {
187
+ "kind": "task-summary-file",
188
+ "taskKey": {
189
+ "ref": "params.taskKey"
190
+ }
191
+ }
192
+ }
193
+ ]
194
+ },
195
+ "message": "Claude summary did not produce the task summary artifact."
196
+ },
197
+ {
198
+ "kind": "require-structured-artifacts",
199
+ "when": {
200
+ "not": {
201
+ "ref": "context.dryRun"
202
+ }
203
+ },
204
+ "items": [
205
+ {
206
+ "path": {
207
+ "artifact": {
208
+ "kind": "task-summary-json-file",
209
+ "taskKey": {
210
+ "ref": "params.taskKey"
211
+ }
212
+ }
213
+ },
214
+ "schemaId": "task-summary/v1"
215
+ }
216
+ ],
217
+ "message": "Claude summary produced invalid structured artifacts."
218
+ }
219
+ ],
220
+ "after": [
221
+ {
222
+ "kind": "set-summary-from-file",
223
+ "when": {
224
+ "not": {
225
+ "ref": "context.dryRun"
226
+ }
227
+ },
228
+ "path": {
229
+ "artifact": {
230
+ "kind": "task-summary-file",
231
+ "taskKey": {
232
+ "ref": "params.taskKey"
233
+ }
234
+ }
235
+ }
236
+ }
237
+ ]
238
+ },
239
+ {
240
+ "id": "run_codex_bug_analyze",
241
+ "node": "opencode-prompt",
242
+ "prompt": {
243
+ "templateRef": "bug-analyze",
244
+ "vars": {
245
+ "jira_task_file": {
246
+ "artifact": {
247
+ "kind": "jira-task-file",
248
+ "taskKey": {
249
+ "ref": "params.taskKey"
250
+ }
251
+ }
252
+ },
253
+ "bug_analyze_file": {
254
+ "artifact": {
255
+ "kind": "bug-analyze-file",
256
+ "taskKey": {
257
+ "ref": "params.taskKey"
258
+ }
259
+ }
260
+ },
261
+ "bug_analyze_json_file": {
262
+ "artifact": {
263
+ "kind": "bug-analyze-json-file",
264
+ "taskKey": {
265
+ "ref": "params.taskKey"
266
+ }
267
+ }
268
+ },
269
+ "bug_fix_design_file": {
270
+ "artifact": {
271
+ "kind": "bug-fix-design-file",
272
+ "taskKey": {
273
+ "ref": "params.taskKey"
274
+ }
275
+ }
276
+ },
277
+ "bug_fix_design_json_file": {
278
+ "artifact": {
279
+ "kind": "bug-fix-design-json-file",
280
+ "taskKey": {
281
+ "ref": "params.taskKey"
282
+ }
283
+ }
284
+ },
285
+ "bug_fix_plan_file": {
286
+ "artifact": {
287
+ "kind": "bug-fix-plan-file",
288
+ "taskKey": {
289
+ "ref": "params.taskKey"
290
+ }
291
+ }
292
+ },
293
+ "bug_fix_plan_json_file": {
294
+ "artifact": {
295
+ "kind": "bug-fix-plan-json-file",
296
+ "taskKey": {
297
+ "ref": "params.taskKey"
298
+ }
299
+ }
300
+ }
301
+ },
302
+ "extraPrompt": {
303
+ "ref": "params.extraPrompt"
304
+ },
305
+ "format": "task-prompt"
306
+ },
307
+ "params": {
308
+ "labelText": {
309
+ "const": "Running OpenCode bug analysis mode"
310
+ },
311
+ "model": {
312
+ "const": "minimax-coding-plan/MiniMax-M2.7"
313
+ }
314
+ },
315
+ "expect": [
316
+ {
317
+ "kind": "require-artifacts",
318
+ "when": {
319
+ "not": {
320
+ "ref": "context.dryRun"
321
+ }
322
+ },
323
+ "paths": {
324
+ "artifactList": {
325
+ "kind": "bug-analyze-artifacts",
326
+ "taskKey": {
327
+ "ref": "params.taskKey"
328
+ }
329
+ }
330
+ },
331
+ "message": "Bug analyze mode did not produce the required artifacts."
332
+ },
333
+ {
334
+ "kind": "require-structured-artifacts",
335
+ "when": {
336
+ "not": {
337
+ "ref": "context.dryRun"
338
+ }
339
+ },
340
+ "items": [
341
+ {
342
+ "path": {
343
+ "artifact": {
344
+ "kind": "bug-analyze-json-file",
345
+ "taskKey": {
346
+ "ref": "params.taskKey"
347
+ }
348
+ }
349
+ },
350
+ "schemaId": "bug-analysis/v1"
351
+ },
352
+ {
353
+ "path": {
354
+ "artifact": {
355
+ "kind": "bug-fix-design-json-file",
356
+ "taskKey": {
357
+ "ref": "params.taskKey"
358
+ }
359
+ }
360
+ },
361
+ "schemaId": "bug-fix-design/v1"
362
+ },
363
+ {
364
+ "path": {
365
+ "artifact": {
366
+ "kind": "bug-fix-plan-json-file",
367
+ "taskKey": {
368
+ "ref": "params.taskKey"
369
+ }
370
+ }
371
+ },
372
+ "schemaId": "bug-fix-plan/v1"
373
+ }
374
+ ],
375
+ "message": "Bug analyze mode produced invalid structured artifacts."
376
+ }
377
+ ]
378
+ }
379
+ ]
380
+ }
381
+ ]
382
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "kind": "bug-fix-flow",
3
+ "version": 1,
4
+ "phases": [
5
+ {
6
+ "id": "bug_fix",
7
+ "steps": [
8
+ {
9
+ "id": "run_codex_bug_fix",
10
+ "node": "opencode-prompt",
11
+ "prompt": {
12
+ "templateRef": "bug-fix",
13
+ "vars": {
14
+ "bug_analyze_json_file": {
15
+ "artifact": {
16
+ "kind": "bug-analyze-json-file",
17
+ "taskKey": {
18
+ "ref": "params.taskKey"
19
+ }
20
+ }
21
+ },
22
+ "bug_fix_design_json_file": {
23
+ "artifact": {
24
+ "kind": "bug-fix-design-json-file",
25
+ "taskKey": {
26
+ "ref": "params.taskKey"
27
+ }
28
+ }
29
+ },
30
+ "bug_fix_plan_json_file": {
31
+ "artifact": {
32
+ "kind": "bug-fix-plan-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 bug fix mode locally"
47
+ },
48
+ "model": {
49
+ "const": "minimax-coding-plan/MiniMax-M2.7"
50
+ }
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ ]
56
+ }