agentweaver 0.1.9 → 0.1.11

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 (101) hide show
  1. package/README.md +226 -200
  2. package/dist/artifacts.js +101 -56
  3. package/dist/errors.js +7 -0
  4. package/dist/executors/{codex-local-executor.js → codex-executor.js} +4 -4
  5. package/dist/executors/configs/{codex-local-config.js → codex-config.js} +1 -1
  6. package/dist/executors/configs/jira-fetch-config.js +2 -0
  7. package/dist/executors/configs/telegram-notifier-config.js +3 -0
  8. package/dist/executors/fetch-gitlab-diff-executor.js +1 -1
  9. package/dist/executors/fetch-gitlab-review-executor.js +1 -1
  10. package/dist/executors/git-commit-executor.js +25 -0
  11. package/dist/executors/telegram-notifier-executor.js +54 -0
  12. package/dist/flow-state.js +46 -1
  13. package/dist/gitlab.js +13 -8
  14. package/dist/index.js +507 -520
  15. package/dist/interactive-ui.js +495 -87
  16. package/dist/jira.js +52 -5
  17. package/dist/pipeline/auto-flow.js +6 -6
  18. package/dist/pipeline/context.js +1 -0
  19. package/dist/pipeline/declarative-flows.js +7 -4
  20. package/dist/pipeline/flow-catalog.js +60 -23
  21. package/dist/pipeline/flow-model-settings.js +77 -0
  22. package/dist/pipeline/flow-specs/auto-common.json +446 -0
  23. package/dist/pipeline/flow-specs/auto-golang.json +563 -0
  24. package/dist/pipeline/flow-specs/{bug-analyze.json → bugz/bug-analyze.json} +43 -25
  25. package/dist/pipeline/flow-specs/{bug-fix.json → bugz/bug-fix.json} +5 -4
  26. package/dist/pipeline/flow-specs/git-commit.json +196 -0
  27. package/dist/pipeline/flow-specs/{gitlab-diff-review.json → gitlab/gitlab-diff-review.json} +20 -50
  28. package/dist/pipeline/flow-specs/gitlab/gitlab-review.json +165 -0
  29. package/dist/pipeline/flow-specs/{mr-description.json → gitlab/mr-description.json} +17 -10
  30. package/dist/pipeline/flow-specs/{run-go-linter-loop.json → go/run-go-linter-loop.json} +40 -14
  31. package/dist/pipeline/flow-specs/{run-go-tests-loop.json → go/run-go-tests-loop.json} +40 -14
  32. package/dist/pipeline/flow-specs/implement.json +5 -4
  33. package/dist/pipeline/flow-specs/plan.json +40 -148
  34. package/dist/pipeline/flow-specs/{review-fix.json → review/review-fix.json} +73 -13
  35. package/dist/pipeline/flow-specs/review/review-loop.json +280 -0
  36. package/dist/pipeline/flow-specs/review/review-project.json +87 -0
  37. package/dist/pipeline/flow-specs/review/review.json +126 -0
  38. package/dist/pipeline/flow-specs/task-describe.json +191 -11
  39. package/dist/pipeline/launch-profile-config.js +38 -0
  40. package/dist/pipeline/node-registry.js +75 -45
  41. package/dist/pipeline/nodes/build-failure-summary-node.js +16 -29
  42. package/dist/pipeline/nodes/build-review-fix-prompt-node.js +36 -0
  43. package/dist/pipeline/nodes/codex-prompt-node.js +41 -0
  44. package/dist/pipeline/nodes/commit-message-form-node.js +79 -0
  45. package/dist/pipeline/nodes/git-commit-form-node.js +138 -0
  46. package/dist/pipeline/nodes/git-commit-node.js +28 -0
  47. package/dist/pipeline/nodes/git-status-node.js +221 -0
  48. package/dist/pipeline/nodes/gitlab-review-artifacts-node.js +10 -6
  49. package/dist/pipeline/nodes/jira-context-node.js +10 -0
  50. package/dist/pipeline/nodes/llm-prompt-node.js +62 -0
  51. package/dist/pipeline/nodes/plan-codex-node.js +1 -1
  52. package/dist/pipeline/nodes/read-file-node.js +11 -0
  53. package/dist/pipeline/nodes/review-findings-form-node.js +18 -14
  54. package/dist/pipeline/nodes/select-files-form-node.js +72 -0
  55. package/dist/pipeline/nodes/telegram-notifier-node.js +28 -0
  56. package/dist/pipeline/nodes/user-input-node.js +29 -8
  57. package/dist/pipeline/nodes/write-selection-file-node.js +46 -0
  58. package/dist/pipeline/prompt-registry.js +2 -4
  59. package/dist/pipeline/prompt-runtime.js +13 -3
  60. package/dist/pipeline/registry.js +6 -8
  61. package/dist/pipeline/spec-compiler.js +5 -0
  62. package/dist/pipeline/spec-loader.js +18 -7
  63. package/dist/pipeline/spec-types.js +7 -3
  64. package/dist/pipeline/spec-validator.js +4 -0
  65. package/dist/pipeline/types.js +1 -0
  66. package/dist/pipeline/value-resolver.js +40 -38
  67. package/dist/prompts.js +104 -110
  68. package/dist/runtime/agentweaver-home.js +8 -0
  69. package/dist/runtime/command-resolution.js +0 -38
  70. package/dist/runtime/env-loader.js +43 -0
  71. package/dist/runtime/process-runner.js +45 -1
  72. package/dist/structured-artifact-schema-registry.js +53 -0
  73. package/dist/structured-artifact-schemas.json +0 -20
  74. package/dist/structured-artifacts.js +3 -43
  75. package/dist/user-input.js +30 -2
  76. package/package.json +2 -6
  77. package/Dockerfile.codex +0 -56
  78. package/dist/executors/claude-executor.js +0 -46
  79. package/dist/executors/codex-docker-executor.js +0 -27
  80. package/dist/executors/configs/claude-config.js +0 -12
  81. package/dist/executors/configs/codex-docker-config.js +0 -10
  82. package/dist/executors/configs/verify-build-config.js +0 -7
  83. package/dist/executors/verify-build-executor.js +0 -123
  84. package/dist/pipeline/flow-specs/auto.json +0 -979
  85. package/dist/pipeline/flow-specs/gitlab-review.json +0 -317
  86. package/dist/pipeline/flow-specs/plan-opencode.json +0 -603
  87. package/dist/pipeline/flow-specs/preflight.json +0 -206
  88. package/dist/pipeline/flow-specs/review-project.json +0 -243
  89. package/dist/pipeline/flow-specs/review.json +0 -312
  90. package/dist/pipeline/flow-specs/run-linter-loop.json +0 -155
  91. package/dist/pipeline/flow-specs/run-tests-loop.json +0 -155
  92. package/dist/pipeline/flows/preflight-flow.js +0 -19
  93. package/dist/pipeline/nodes/claude-prompt-node.js +0 -54
  94. package/dist/pipeline/nodes/codex-docker-prompt-node.js +0 -32
  95. package/dist/pipeline/nodes/codex-local-prompt-node.js +0 -32
  96. package/dist/pipeline/nodes/review-claude-node.js +0 -38
  97. package/dist/pipeline/nodes/review-reply-codex-node.js +0 -40
  98. package/dist/pipeline/nodes/verify-build-node.js +0 -15
  99. package/dist/runtime/docker-runtime.js +0 -51
  100. package/docker-compose.yml +0 -445
  101. package/verify_build.sh +0 -105
@@ -62,142 +62,9 @@
62
62
  }
63
63
  ]
64
64
  },
65
- {
66
- "id": "load_existing_task_summary",
67
- "when": {
68
- "all": [
69
- { "not": { "ref": "params.forceRefresh" } },
70
- {
71
- "exists": {
72
- "artifact": {
73
- "kind": "task-summary-file",
74
- "taskKey": { "ref": "params.taskKey" }
75
- }
76
- }
77
- }
78
- ]
79
- },
80
- "node": "summary-file-load",
81
- "params": {
82
- "path": {
83
- "artifact": {
84
- "kind": "task-summary-file",
85
- "taskKey": { "ref": "params.taskKey" }
86
- }
87
- }
88
- }
89
- },
90
- {
91
- "id": "generate_task_summary",
92
- "when": {
93
- "any": [
94
- { "ref": "params.forceRefresh" },
95
- {
96
- "not": {
97
- "exists": {
98
- "artifact": {
99
- "kind": "task-summary-file",
100
- "taskKey": { "ref": "params.taskKey" }
101
- }
102
- }
103
- }
104
- }
105
- ]
106
- },
107
- "node": "claude-prompt",
108
- "prompt": {
109
- "templateRef": "task-summary",
110
- "vars": {
111
- "jira_task_file": {
112
- "artifact": {
113
- "kind": "jira-task-file",
114
- "taskKey": { "ref": "params.taskKey" }
115
- }
116
- },
117
- "task_summary_file": {
118
- "artifact": {
119
- "kind": "task-summary-file",
120
- "taskKey": { "ref": "params.taskKey" }
121
- }
122
- },
123
- "task_summary_json_file": {
124
- "artifact": {
125
- "kind": "task-summary-json-file",
126
- "taskKey": { "ref": "params.taskKey" }
127
- }
128
- }
129
- },
130
- "format": "plain"
131
- },
132
- "params": {
133
- "labelText": { "const": "Preparing task summary" },
134
- "outputFile": {
135
- "artifact": {
136
- "kind": "task-summary-file",
137
- "taskKey": { "ref": "params.taskKey" }
138
- }
139
- },
140
- "requiredArtifacts": {
141
- "list": [
142
- {
143
- "artifact": {
144
- "kind": "task-summary-json-file",
145
- "taskKey": { "ref": "params.taskKey" }
146
- }
147
- }
148
- ]
149
- },
150
- "model": { "const": "haiku" }
151
- },
152
- "expect": [
153
- {
154
- "kind": "require-artifacts",
155
- "when": { "not": { "ref": "context.dryRun" } },
156
- "paths": {
157
- "list": [
158
- {
159
- "artifact": {
160
- "kind": "task-summary-file",
161
- "taskKey": { "ref": "params.taskKey" }
162
- }
163
- }
164
- ]
165
- },
166
- "message": "Claude summary did not produce the task summary artifact."
167
- },
168
- {
169
- "kind": "require-structured-artifacts",
170
- "when": { "not": { "ref": "context.dryRun" } },
171
- "items": [
172
- {
173
- "path": {
174
- "artifact": {
175
- "kind": "task-summary-json-file",
176
- "taskKey": { "ref": "params.taskKey" }
177
- }
178
- },
179
- "schemaId": "task-summary/v1"
180
- }
181
- ],
182
- "message": "Claude summary produced invalid structured artifacts."
183
- }
184
- ],
185
- "after": [
186
- {
187
- "kind": "set-summary-from-file",
188
- "when": { "not": { "ref": "context.dryRun" } },
189
- "path": {
190
- "artifact": {
191
- "kind": "task-summary-file",
192
- "taskKey": { "ref": "params.taskKey" }
193
- }
194
- }
195
- }
196
- ]
197
- },
198
65
  {
199
66
  "id": "generate_planning_questions",
200
- "node": "codex-local-prompt",
67
+ "node": "llm-prompt",
201
68
  "prompt": {
202
69
  "templateRef": "plan-questions",
203
70
  "vars": {
@@ -231,7 +98,8 @@
231
98
  },
232
99
  "params": {
233
100
  "labelText": { "const": "Generating planning questions" },
234
- "model": { "const": "gpt-5.4" },
101
+ "model": { "ref": "params.llmModel" },
102
+ "executor": { "ref": "params.llmExecutor" },
235
103
  "requiredArtifacts": {
236
104
  "list": [
237
105
  {
@@ -294,6 +162,13 @@
294
162
  }
295
163
  }
296
164
  },
165
+ {
166
+ "id": "notify_questions_need_answering",
167
+ "node": "telegram-notify",
168
+ "params": {
169
+ "message": { "const": "Questions need answering" }
170
+ }
171
+ },
297
172
  {
298
173
  "id": "collect_planning_answers",
299
174
  "node": "user-input",
@@ -329,8 +204,8 @@
329
204
  ]
330
205
  },
331
206
  {
332
- "id": "run_codex_plan",
333
- "node": "codex-local-prompt",
207
+ "id": "run_plan",
208
+ "node": "llm-prompt",
334
209
  "prompt": {
335
210
  "templateRef": "plan",
336
211
  "vars": {
@@ -355,37 +230,43 @@
355
230
  "design_file": {
356
231
  "artifact": {
357
232
  "kind": "design-file",
358
- "taskKey": { "ref": "params.taskKey" }
233
+ "taskKey": { "ref": "params.taskKey" },
234
+ "iteration": { "ref": "params.designIteration" }
359
235
  }
360
236
  },
361
237
  "design_json_file": {
362
238
  "artifact": {
363
239
  "kind": "design-json-file",
364
- "taskKey": { "ref": "params.taskKey" }
240
+ "taskKey": { "ref": "params.taskKey" },
241
+ "iteration": { "ref": "params.designIteration" }
365
242
  }
366
243
  },
367
244
  "plan_file": {
368
245
  "artifact": {
369
246
  "kind": "plan-file",
370
- "taskKey": { "ref": "params.taskKey" }
247
+ "taskKey": { "ref": "params.taskKey" },
248
+ "iteration": { "ref": "params.planIteration" }
371
249
  }
372
250
  },
373
251
  "plan_json_file": {
374
252
  "artifact": {
375
253
  "kind": "plan-json-file",
376
- "taskKey": { "ref": "params.taskKey" }
254
+ "taskKey": { "ref": "params.taskKey" },
255
+ "iteration": { "ref": "params.planIteration" }
377
256
  }
378
257
  },
379
258
  "qa_file": {
380
259
  "artifact": {
381
260
  "kind": "qa-file",
382
- "taskKey": { "ref": "params.taskKey" }
261
+ "taskKey": { "ref": "params.taskKey" },
262
+ "iteration": { "ref": "params.qaIteration" }
383
263
  }
384
264
  },
385
265
  "qa_json_file": {
386
266
  "artifact": {
387
267
  "kind": "qa-json-file",
388
- "taskKey": { "ref": "params.taskKey" }
268
+ "taskKey": { "ref": "params.taskKey" },
269
+ "iteration": { "ref": "params.qaIteration" }
389
270
  }
390
271
  }
391
272
  },
@@ -398,8 +279,9 @@
398
279
  "format": "task-prompt"
399
280
  },
400
281
  "params": {
401
- "labelText": { "const": "Running Codex planning mode" },
402
- "model": { "const": "gpt-5.4" }
282
+ "labelText": { "const": "Running planning mode" },
283
+ "model": { "ref": "params.llmModel" },
284
+ "executor": { "ref": "params.llmExecutor" }
403
285
  },
404
286
  "expect": [
405
287
  {
@@ -421,7 +303,8 @@
421
303
  "path": {
422
304
  "artifact": {
423
305
  "kind": "design-json-file",
424
- "taskKey": { "ref": "params.taskKey" }
306
+ "taskKey": { "ref": "params.taskKey" },
307
+ "iteration": { "ref": "params.designIteration" }
425
308
  }
426
309
  },
427
310
  "schemaId": "implementation-design/v1"
@@ -430,7 +313,8 @@
430
313
  "path": {
431
314
  "artifact": {
432
315
  "kind": "plan-json-file",
433
- "taskKey": { "ref": "params.taskKey" }
316
+ "taskKey": { "ref": "params.taskKey" },
317
+ "iteration": { "ref": "params.planIteration" }
434
318
  }
435
319
  },
436
320
  "schemaId": "implementation-plan/v1"
@@ -439,7 +323,8 @@
439
323
  "path": {
440
324
  "artifact": {
441
325
  "kind": "qa-json-file",
442
- "taskKey": { "ref": "params.taskKey" }
326
+ "taskKey": { "ref": "params.taskKey" },
327
+ "iteration": { "ref": "params.qaIteration" }
443
328
  }
444
329
  },
445
330
  "schemaId": "qa-plan/v1"
@@ -448,6 +333,13 @@
448
333
  "message": "Plan mode produced invalid structured artifacts."
449
334
  }
450
335
  ]
336
+ },
337
+ {
338
+ "id": "notify_plan_complete",
339
+ "node": "telegram-notify",
340
+ "params": {
341
+ "message": { "const": "Plan phase complete" }
342
+ }
451
343
  }
452
344
  ]
453
345
  }
@@ -2,7 +2,7 @@
2
2
  "kind": "review-fix-flow",
3
3
  "version": 1,
4
4
  "constants": {
5
- "autoReviewFixExtraPrompt": "Исправлять только блокеры, критикалы и важные"
5
+ "autoReviewFixExtraPrompt": "Fix only blockers and criticals"
6
6
  },
7
7
  "phases": [
8
8
  {
@@ -12,9 +12,9 @@
12
12
  "id": "build_review_fix_selection_form",
13
13
  "node": "review-findings-form",
14
14
  "params": {
15
- "reviewReplyJsonFile": {
15
+ "reviewFindingsJsonFile": {
16
16
  "artifact": {
17
- "kind": "review-reply-json-file",
17
+ "kind": "review-json-file",
18
18
  "taskKey": { "ref": "params.taskKey" },
19
19
  "iteration": { "ref": "params.latestIteration" }
20
20
  }
@@ -22,13 +22,50 @@
22
22
  "formId": { "const": "review-fix-selection" },
23
23
  "title": { "const": "Review-Fix Selection" },
24
24
  "description": {
25
- "const": "Отметьте findings, которые нужно исправить в этой итерации review-fix. Можно включить режим исправления всех findings."
25
+ "const": "Mark findings to fix in this review-fix iteration. You can enable fix-all mode."
26
26
  }
27
27
  }
28
28
  },
29
+ {
30
+ "id": "check_existing_selection_file",
31
+ "node": "file-check",
32
+ "params": {
33
+ "path": { "ref": "params.reviewFixSelectionJsonFile" }
34
+ }
35
+ },
36
+ {
37
+ "id": "write_auto_selection_file",
38
+ "node": "write-selection-file",
39
+ "when": {
40
+ "all": [
41
+ { "ref": "params.reviewFixSelectionJsonFile" },
42
+ { "equals": [
43
+ { "ref": "steps.review-fix.check_existing_selection_file.value.exists" },
44
+ { "const": false }
45
+ ]}
46
+ ]
47
+ },
48
+ "params": {
49
+ "outputFile": { "ref": "params.reviewFixSelectionJsonFile" },
50
+ "reviewFindingsJsonFile": {
51
+ "artifact": {
52
+ "kind": "review-json-file",
53
+ "taskKey": { "ref": "params.taskKey" },
54
+ "iteration": { "ref": "params.latestIteration" }
55
+ }
56
+ },
57
+ "selectionMode": { "const": "auto-blockers-criticals" }
58
+ }
59
+ },
29
60
  {
30
61
  "id": "collect_review_fix_selection",
31
62
  "node": "user-input",
63
+ "when": {
64
+ "equals": [
65
+ { "ref": "steps.review-fix.check_existing_selection_file.value.exists" },
66
+ { "const": false }
67
+ ]
68
+ },
32
69
  "params": {
33
70
  "formId": { "ref": "steps.review-fix.build_review_fix_selection_form.value.formId" },
34
71
  "title": { "ref": "steps.review-fix.build_review_fix_selection_form.value.title" },
@@ -51,21 +88,43 @@
51
88
  ]
52
89
  },
53
90
  {
54
- "id": "run_codex_review_fix",
55
- "node": "codex-local-prompt",
91
+ "id": "load_review_fix_selection",
92
+ "node": "read-file",
93
+ "when": {
94
+ "equals": [
95
+ { "ref": "steps.review-fix.check_existing_selection_file.value.exists" },
96
+ { "const": true }
97
+ ]
98
+ },
99
+ "params": {
100
+ "path": { "ref": "params.reviewFixSelectionJsonFile" }
101
+ }
102
+ },
103
+ {
104
+ "id": "build_selection_context",
105
+ "node": "build-review-fix-prompt",
106
+ "when": { "ref": "params.reviewFixSelectionJsonFile" },
107
+ "params": {
108
+ "selectionFile": { "ref": "params.reviewFixSelectionJsonFile" },
109
+ "autoMode": { "const": true }
110
+ }
111
+ },
112
+ {
113
+ "id": "run_review_fix",
114
+ "node": "llm-prompt",
56
115
  "prompt": {
57
116
  "templateRef": "review-fix",
58
117
  "vars": {
59
- "review_reply_file": {
118
+ "review_file": {
60
119
  "artifact": {
61
- "kind": "review-reply-file",
120
+ "kind": "review-file",
62
121
  "taskKey": { "ref": "params.taskKey" },
63
122
  "iteration": { "ref": "params.latestIteration" }
64
123
  }
65
124
  },
66
- "review_reply_json_file": {
125
+ "review_json_file": {
67
126
  "artifact": {
68
- "kind": "review-reply-json-file",
127
+ "kind": "review-json-file",
69
128
  "taskKey": { "ref": "params.taskKey" },
70
129
  "iteration": { "ref": "params.latestIteration" }
71
130
  }
@@ -89,19 +148,20 @@
89
148
  "extraPrompt": {
90
149
  "appendPrompt": {
91
150
  "base": { "ref": "params.extraPrompt" },
92
- "suffix": { "ref": "steps.review-fix.collect_review_fix_selection.value.promptSuffix" }
151
+ "suffix": { "ref": "steps.review-fix.build_selection_context.value.promptSuffix" }
93
152
  }
94
153
  },
95
154
  "format": "task-prompt"
96
155
  },
97
156
  "params": {
98
157
  "labelText": {
99
- "template": "Running Codex review-fix mode locally (iteration {iteration})",
158
+ "template": "Running review-fix mode locally (iteration {iteration})",
100
159
  "vars": {
101
160
  "iteration": { "ref": "params.latestIteration" }
102
161
  }
103
162
  },
104
- "model": { "const": "gpt-5.4" }
163
+ "model": { "ref": "params.llmModel" },
164
+ "executor": { "ref": "params.llmExecutor" }
105
165
  },
106
166
  "expect": [
107
167
  {