agentweaver 0.1.8 → 0.1.9

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 (38) hide show
  1. package/README.md +20 -6
  2. package/dist/artifacts.js +24 -0
  3. package/dist/executors/configs/fetch-gitlab-diff-config.js +3 -0
  4. package/dist/executors/configs/opencode-config.js +6 -0
  5. package/dist/executors/fetch-gitlab-diff-executor.js +26 -0
  6. package/dist/executors/jira-fetch-executor.js +8 -2
  7. package/dist/executors/opencode-executor.js +35 -0
  8. package/dist/gitlab.js +199 -5
  9. package/dist/index.js +155 -116
  10. package/dist/interactive-ui.js +21 -2
  11. package/dist/jira.js +116 -14
  12. package/dist/pipeline/auto-flow.js +1 -1
  13. package/dist/pipeline/declarative-flows.js +41 -6
  14. package/dist/pipeline/flow-catalog.js +66 -0
  15. package/dist/pipeline/flow-specs/auto.json +183 -1
  16. package/dist/pipeline/flow-specs/gitlab-diff-review.json +226 -0
  17. package/dist/pipeline/flow-specs/gitlab-review.json +1 -31
  18. package/dist/pipeline/flow-specs/plan-opencode.json +603 -0
  19. package/dist/pipeline/flow-specs/plan.json +183 -1
  20. package/dist/pipeline/node-registry.js +80 -8
  21. package/dist/pipeline/nodes/fetch-gitlab-diff-node.js +34 -0
  22. package/dist/pipeline/nodes/flow-run-node.js +2 -2
  23. package/dist/pipeline/nodes/jira-fetch-node.js +26 -2
  24. package/dist/pipeline/nodes/opencode-prompt-node.js +32 -0
  25. package/dist/pipeline/nodes/planning-questions-form-node.js +69 -0
  26. package/dist/pipeline/nodes/user-input-node.js +9 -1
  27. package/dist/pipeline/prompt-registry.js +3 -1
  28. package/dist/pipeline/registry.js +10 -0
  29. package/dist/pipeline/spec-loader.js +37 -3
  30. package/dist/pipeline/spec-types.js +43 -1
  31. package/dist/pipeline/spec-validator.js +53 -7
  32. package/dist/pipeline/value-resolver.js +15 -1
  33. package/dist/prompts.js +47 -12
  34. package/dist/scope.js +24 -32
  35. package/dist/structured-artifact-schemas.json +154 -1
  36. package/dist/structured-artifacts.js +2 -0
  37. package/dist/user-input.js +7 -0
  38. package/package.json +1 -1
@@ -0,0 +1,226 @@
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": { "const": "gitlab-diff-review-input" },
13
+ "title": { "const": "GitLab Diff Review" },
14
+ "description": { "const": "Укажи ссылку на GitLab merge request, чтобы загрузить diff и запустить код-ревью через Claude Opus." },
15
+ "fields": {
16
+ "const": [
17
+ {
18
+ "id": "merge_request_url",
19
+ "type": "text",
20
+ "label": "GitLab MR URL",
21
+ "help": "Например: https://gitlab.example.com/group/project/-/merge_requests/123",
22
+ "required": true,
23
+ "placeholder": "https://gitlab.example.com/group/project/-/merge_requests/123"
24
+ }
25
+ ]
26
+ },
27
+ "outputFile": {
28
+ "artifact": {
29
+ "kind": "gitlab-diff-review-input-json-file",
30
+ "taskKey": { "ref": "params.taskKey" }
31
+ }
32
+ }
33
+ },
34
+ "expect": [
35
+ {
36
+ "kind": "require-structured-artifacts",
37
+ "items": [
38
+ {
39
+ "path": {
40
+ "artifact": {
41
+ "kind": "gitlab-diff-review-input-json-file",
42
+ "taskKey": { "ref": "params.taskKey" }
43
+ }
44
+ },
45
+ "schemaId": "user-input/v1"
46
+ }
47
+ ],
48
+ "message": "GitLab diff review input form produced invalid structured artifacts."
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "id": "fetch_gitlab_diff",
54
+ "node": "fetch-gitlab-diff",
55
+ "params": {
56
+ "mergeRequestUrl": { "ref": "steps.gitlab_diff_review.collect_merge_request_url.value.values.merge_request_url" },
57
+ "outputFile": {
58
+ "artifact": {
59
+ "kind": "gitlab-diff-file",
60
+ "taskKey": { "ref": "params.taskKey" }
61
+ }
62
+ },
63
+ "outputJsonFile": {
64
+ "artifact": {
65
+ "kind": "gitlab-diff-json-file",
66
+ "taskKey": { "ref": "params.taskKey" }
67
+ }
68
+ }
69
+ },
70
+ "expect": [
71
+ {
72
+ "kind": "require-file",
73
+ "path": {
74
+ "artifact": {
75
+ "kind": "gitlab-diff-file",
76
+ "taskKey": { "ref": "params.taskKey" }
77
+ }
78
+ },
79
+ "message": "Fetch GitLab diff node did not produce the markdown artifact."
80
+ },
81
+ {
82
+ "kind": "require-structured-artifacts",
83
+ "items": [
84
+ {
85
+ "path": {
86
+ "artifact": {
87
+ "kind": "gitlab-diff-json-file",
88
+ "taskKey": { "ref": "params.taskKey" }
89
+ }
90
+ },
91
+ "schemaId": "gitlab-mr-diff/v1"
92
+ }
93
+ ],
94
+ "message": "Fetch GitLab diff node produced invalid structured artifacts."
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "id": "run_claude_diff_review",
100
+ "when": { "not": { "ref": "context.dryRun" } },
101
+ "node": "claude-prompt",
102
+ "prompt": {
103
+ "templateRef": "gitlab-diff-review",
104
+ "vars": {
105
+ "gitlab_diff_file": {
106
+ "artifact": {
107
+ "kind": "gitlab-diff-file",
108
+ "taskKey": { "ref": "params.taskKey" }
109
+ }
110
+ },
111
+ "gitlab_diff_json_file": {
112
+ "artifact": {
113
+ "kind": "gitlab-diff-json-file",
114
+ "taskKey": { "ref": "params.taskKey" }
115
+ }
116
+ },
117
+ "review_file": {
118
+ "artifact": {
119
+ "kind": "review-file",
120
+ "taskKey": { "ref": "params.taskKey" },
121
+ "iteration": { "ref": "params.iteration" }
122
+ }
123
+ },
124
+ "review_json_file": {
125
+ "artifact": {
126
+ "kind": "review-json-file",
127
+ "taskKey": { "ref": "params.taskKey" },
128
+ "iteration": { "ref": "params.iteration" }
129
+ }
130
+ },
131
+ "ready_to_merge_file": {
132
+ "artifact": {
133
+ "kind": "ready-to-merge-file",
134
+ "taskKey": { "ref": "params.taskKey" }
135
+ }
136
+ }
137
+ },
138
+ "extraPrompt": { "ref": "params.extraPrompt" },
139
+ "format": "task-prompt"
140
+ },
141
+ "params": {
142
+ "labelText": {
143
+ "template": "Running Claude GitLab diff review (iteration {iteration})",
144
+ "vars": {
145
+ "iteration": { "ref": "params.iteration" }
146
+ }
147
+ },
148
+ "model": { "const": "opus" }
149
+ },
150
+ "expect": [
151
+ {
152
+ "kind": "require-artifacts",
153
+ "when": { "not": { "ref": "context.dryRun" } },
154
+ "paths": {
155
+ "list": [
156
+ {
157
+ "artifact": {
158
+ "kind": "review-file",
159
+ "taskKey": { "ref": "params.taskKey" },
160
+ "iteration": { "ref": "params.iteration" }
161
+ }
162
+ }
163
+ ]
164
+ },
165
+ "message": "Claude diff review did not produce the required review artifact."
166
+ },
167
+ {
168
+ "kind": "require-structured-artifacts",
169
+ "when": { "not": { "ref": "context.dryRun" } },
170
+ "items": [
171
+ {
172
+ "path": {
173
+ "artifact": {
174
+ "kind": "review-json-file",
175
+ "taskKey": { "ref": "params.taskKey" },
176
+ "iteration": { "ref": "params.iteration" }
177
+ }
178
+ },
179
+ "schemaId": "review-findings/v1"
180
+ }
181
+ ],
182
+ "message": "Claude diff review produced invalid structured artifacts."
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ "id": "summarize_review",
188
+ "when": { "not": { "ref": "context.dryRun" } },
189
+ "node": "claude-prompt",
190
+ "prompt": {
191
+ "templateRef": "review-summary",
192
+ "vars": {
193
+ "review_file": {
194
+ "artifact": {
195
+ "kind": "review-file",
196
+ "taskKey": { "ref": "params.taskKey" },
197
+ "iteration": { "ref": "params.iteration" }
198
+ }
199
+ },
200
+ "review_summary_file": {
201
+ "artifact": {
202
+ "kind": "review-summary-file",
203
+ "taskKey": { "ref": "params.taskKey" },
204
+ "iteration": { "ref": "params.iteration" }
205
+ }
206
+ }
207
+ },
208
+ "format": "plain"
209
+ },
210
+ "params": {
211
+ "labelText": { "const": "Preparing GitLab diff review summary" },
212
+ "summaryTitle": { "const": "GitLab Diff Review" },
213
+ "model": { "const": "haiku" },
214
+ "outputFile": {
215
+ "artifact": {
216
+ "kind": "review-summary-file",
217
+ "taskKey": { "ref": "params.taskKey" },
218
+ "iteration": { "ref": "params.iteration" }
219
+ }
220
+ }
221
+ }
222
+ }
223
+ ]
224
+ }
225
+ ]
226
+ }
@@ -195,7 +195,7 @@
195
195
  "id": "run_codex_review_reply",
196
196
  "node": "codex-local-prompt",
197
197
  "prompt": {
198
- "templateRef": "review-reply",
198
+ "templateRef": "review-reply-project",
199
199
  "vars": {
200
200
  "review_file": {
201
201
  "artifact": {
@@ -211,36 +211,6 @@
211
211
  "iteration": { "ref": "params.iteration" }
212
212
  }
213
213
  },
214
- "jira_task_file": {
215
- "artifact": {
216
- "kind": "jira-task-file",
217
- "taskKey": { "ref": "params.taskKey" }
218
- }
219
- },
220
- "design_file": {
221
- "artifact": {
222
- "kind": "design-file",
223
- "taskKey": { "ref": "params.taskKey" }
224
- }
225
- },
226
- "design_json_file": {
227
- "artifact": {
228
- "kind": "design-json-file",
229
- "taskKey": { "ref": "params.taskKey" }
230
- }
231
- },
232
- "plan_file": {
233
- "artifact": {
234
- "kind": "plan-file",
235
- "taskKey": { "ref": "params.taskKey" }
236
- }
237
- },
238
- "plan_json_file": {
239
- "artifact": {
240
- "kind": "plan-json-file",
241
- "taskKey": { "ref": "params.taskKey" }
242
- }
243
- },
244
214
  "review_reply_file": {
245
215
  "artifact": {
246
216
  "kind": "review-reply-file",