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
@@ -0,0 +1,280 @@
1
+ {
2
+ "kind": "review-loop-flow",
3
+ "version": 1,
4
+ "constants": {
5
+ "autoReviewFixExtraPrompt": "Fix only blockers and criticals. Skip minor and warning severity."
6
+ },
7
+ "phases": [
8
+ {
9
+ "id": "review_iteration_1",
10
+ "steps": [
11
+ {
12
+ "id": "run_review",
13
+ "node": "flow-run",
14
+ "params": {
15
+ "fileName": { "const": "review.json" },
16
+ "labelText": { "const": "Running review (iteration 1)" },
17
+ "taskKey": { "ref": "params.taskKey" },
18
+ "iteration": { "const": 1 },
19
+ "extraPrompt": { "ref": "params.extraPrompt" },
20
+ "llmModel": { "ref": "params.llmModel" },
21
+ "llmExecutor": { "ref": "params.llmExecutor" }
22
+ }
23
+ },
24
+ {
25
+ "id": "notify_review_complete",
26
+ "node": "telegram-notify",
27
+ "params": {
28
+ "message": {
29
+ "template": "Review for {taskKey} complete.",
30
+ "vars": {
31
+ "taskKey": { "ref": "params.taskKey" }
32
+ }
33
+ }
34
+ }
35
+ },
36
+ {
37
+ "id": "check_ready_to_merge",
38
+ "node": "file-check",
39
+ "params": {
40
+ "path": {
41
+ "artifact": {
42
+ "kind": "ready-to-merge-file",
43
+ "taskKey": { "ref": "params.taskKey" }
44
+ }
45
+ },
46
+ "panelTitle": { "const": "Ready To Merge" },
47
+ "foundMessage": { "const": "Changes are ready to merge.\nready-to-merge.md file created." },
48
+ "tone": { "const": "green" }
49
+ },
50
+ "stopFlowIf": {
51
+ "equals": [
52
+ { "ref": "steps.review_iteration_1.check_ready_to_merge.value.exists" },
53
+ { "const": true }
54
+ ]
55
+ }
56
+ },
57
+ {
58
+ "id": "write_auto_selection",
59
+ "node": "write-selection-file",
60
+ "when": {
61
+ "equals": [
62
+ { "ref": "steps.review_iteration_1.check_ready_to_merge.value.exists" },
63
+ { "const": false }
64
+ ]
65
+ },
66
+ "params": {
67
+ "outputFile": {
68
+ "template": "{workspace}/review-fix-selection-{taskKey}-iter-{iteration}.json",
69
+ "vars": {
70
+ "workspace": { "ref": "params.workspaceDir" },
71
+ "taskKey": { "ref": "params.taskKey" },
72
+ "iteration": { "const": 1 }
73
+ }
74
+ },
75
+ "reviewFindingsJsonFile": {
76
+ "artifact": {
77
+ "kind": "review-json-file",
78
+ "taskKey": { "ref": "params.taskKey" },
79
+ "iteration": { "const": 1 }
80
+ }
81
+ },
82
+ "selectionMode": { "const": "auto-blockers-criticals" }
83
+ }
84
+ },
85
+ {
86
+ "id": "run_review_fix",
87
+ "node": "flow-run",
88
+ "when": {
89
+ "equals": [
90
+ { "ref": "steps.review_iteration_1.check_ready_to_merge.value.exists" },
91
+ { "const": false }
92
+ ]
93
+ },
94
+ "params": {
95
+ "fileName": { "const": "review-fix.json" },
96
+ "labelText": {
97
+ "template": "Running review-fix (iteration 1)"
98
+ },
99
+ "taskKey": { "ref": "params.taskKey" },
100
+ "latestIteration": { "const": 1 },
101
+ "reviewFixSelectionJsonFile": {
102
+ "template": "{workspace}/review-fix-selection-{taskKey}-iter-{iteration}.json",
103
+ "vars": {
104
+ "workspace": { "ref": "params.workspaceDir" },
105
+ "taskKey": { "ref": "params.taskKey" },
106
+ "iteration": { "const": 1 }
107
+ }
108
+ },
109
+ "reviewFixPoints": { "ref": "params.reviewFixPoints" },
110
+ "extraPrompt": {
111
+ "appendPrompt": {
112
+ "base": { "ref": "params.extraPrompt" },
113
+ "suffix": { "const": "Fix only blockers and criticals." }
114
+ }
115
+ },
116
+ "llmModel": { "ref": "params.llmModel" },
117
+ "llmExecutor": { "ref": "params.llmExecutor" }
118
+ }
119
+ },
120
+ {
121
+ "id": "notify_review_fix_complete",
122
+ "node": "telegram-notify",
123
+ "params": {
124
+ "message": {
125
+ "template": "Review fix for {taskKey} complete.",
126
+ "vars": {
127
+ "taskKey": { "ref": "params.taskKey" }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "repeat": {
136
+ "var": "iteration",
137
+ "from": 2,
138
+ "to": 5
139
+ },
140
+ "phases": [
141
+ {
142
+ "id": "review_iteration_${iteration}",
143
+ "steps": [
144
+ {
145
+ "id": "run_review",
146
+ "node": "flow-run",
147
+ "params": {
148
+ "fileName": { "const": "review.json" },
149
+ "labelText": {
150
+ "template": "Running review (iteration ${iteration})"
151
+ },
152
+ "taskKey": { "ref": "params.taskKey" },
153
+ "iteration": { "ref": "repeat.iteration" },
154
+ "extraPrompt": { "ref": "params.extraPrompt" },
155
+ "llmModel": { "ref": "params.llmModel" },
156
+ "llmExecutor": { "ref": "params.llmExecutor" }
157
+ }
158
+ },
159
+ {
160
+ "id": "notify_review_complete",
161
+ "node": "telegram-notify",
162
+ "params": {
163
+ "message": {
164
+ "template": "Review iteration ${iteration} for {taskKey} complete.",
165
+ "vars": {
166
+ "taskKey": { "ref": "params.taskKey" },
167
+ "iteration": { "ref": "repeat.iteration" }
168
+ }
169
+ }
170
+ }
171
+ },
172
+ {
173
+ "id": "check_ready_to_merge",
174
+ "node": "file-check",
175
+ "params": {
176
+ "path": {
177
+ "artifact": {
178
+ "kind": "ready-to-merge-file",
179
+ "taskKey": { "ref": "params.taskKey" }
180
+ }
181
+ },
182
+ "panelTitle": { "const": "Ready To Merge" },
183
+ "foundMessage": { "const": "Changes are ready to merge.\nready-to-merge.md file created." },
184
+ "tone": { "const": "green" }
185
+ },
186
+ "stopFlowIf": {
187
+ "equals": [
188
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
189
+ { "const": true }
190
+ ]
191
+ }
192
+ },
193
+ {
194
+ "id": "write_auto_selection",
195
+ "node": "write-selection-file",
196
+ "when": {
197
+ "equals": [
198
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
199
+ { "const": false }
200
+ ]
201
+ },
202
+ "params": {
203
+ "outputFile": {
204
+ "template": "{workspace}/review-fix-selection-{taskKey}-iter-{iteration}.json",
205
+ "vars": {
206
+ "workspace": { "ref": "params.workspaceDir" },
207
+ "taskKey": { "ref": "params.taskKey" },
208
+ "iteration": { "ref": "repeat.iteration" }
209
+ }
210
+ },
211
+ "reviewFindingsJsonFile": {
212
+ "artifact": {
213
+ "kind": "review-json-file",
214
+ "taskKey": { "ref": "params.taskKey" },
215
+ "iteration": { "ref": "repeat.iteration" }
216
+ }
217
+ },
218
+ "selectionMode": { "const": "auto-blockers-criticals" }
219
+ }
220
+ },
221
+ {
222
+ "id": "run_review_fix",
223
+ "when": {
224
+ "equals": [
225
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
226
+ { "const": false }
227
+ ]
228
+ },
229
+ "node": "flow-run",
230
+ "params": {
231
+ "fileName": { "const": "review-fix.json" },
232
+ "labelText": {
233
+ "template": "Running review-fix (iteration ${iteration})"
234
+ },
235
+ "taskKey": { "ref": "params.taskKey" },
236
+ "latestIteration": { "ref": "repeat.iteration" },
237
+ "reviewFixSelectionJsonFile": {
238
+ "template": "{workspace}/review-fix-selection-{taskKey}-iter-{iteration}.json",
239
+ "vars": {
240
+ "workspace": { "ref": "params.workspaceDir" },
241
+ "taskKey": { "ref": "params.taskKey" },
242
+ "iteration": { "ref": "repeat.iteration" }
243
+ }
244
+ },
245
+ "reviewFixPoints": { "ref": "params.reviewFixPoints" },
246
+ "extraPrompt": {
247
+ "appendPrompt": {
248
+ "base": { "ref": "params.extraPrompt" },
249
+ "suffix": { "const": "Fix only blockers and criticals." }
250
+ }
251
+ },
252
+ "llmModel": { "ref": "params.llmModel" },
253
+ "llmExecutor": { "ref": "params.llmExecutor" }
254
+ }
255
+ },
256
+ {
257
+ "id": "notify_review_fix_complete",
258
+ "node": "telegram-notify",
259
+ "when": {
260
+ "equals": [
261
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
262
+ { "const": false }
263
+ ]
264
+ },
265
+ "params": {
266
+ "message": {
267
+ "template": "Review fix iteration ${iteration} for {taskKey} complete.",
268
+ "vars": {
269
+ "taskKey": { "ref": "params.taskKey" },
270
+ "iteration": { "ref": "repeat.iteration" }
271
+ }
272
+ }
273
+ }
274
+ }
275
+ ]
276
+ }
277
+ ]
278
+ }
279
+ ]
280
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "kind": "review-project-flow",
3
+ "version": 1,
4
+ "phases": [
5
+ {
6
+ "id": "review",
7
+ "steps": [
8
+ {
9
+ "id": "run_review",
10
+ "node": "llm-prompt",
11
+ "prompt": {
12
+ "templateRef": "review-project",
13
+ "vars": {
14
+ "review_file": {
15
+ "artifact": {
16
+ "kind": "review-file",
17
+ "taskKey": { "ref": "params.taskKey" },
18
+ "iteration": { "ref": "params.iteration" }
19
+ }
20
+ },
21
+ "review_json_file": {
22
+ "artifact": {
23
+ "kind": "review-json-file",
24
+ "taskKey": { "ref": "params.taskKey" },
25
+ "iteration": { "ref": "params.iteration" }
26
+ }
27
+ },
28
+ "ready_to_merge_file": {
29
+ "artifact": {
30
+ "kind": "ready-to-merge-file",
31
+ "taskKey": { "ref": "params.taskKey" }
32
+ }
33
+ }
34
+ },
35
+ "extraPrompt": { "ref": "params.extraPrompt" },
36
+ "format": "task-prompt"
37
+ },
38
+ "params": {
39
+ "labelText": {
40
+ "template": "Running project review mode (iteration {iteration})",
41
+ "vars": {
42
+ "iteration": { "ref": "params.iteration" }
43
+ }
44
+ },
45
+ "model": { "ref": "params.llmModel" },
46
+ "executor": { "ref": "params.llmExecutor" }
47
+ },
48
+ "expect": [
49
+ {
50
+ "kind": "require-artifacts",
51
+ "when": { "not": { "ref": "context.dryRun" } },
52
+ "paths": {
53
+ "list": [
54
+ {
55
+ "artifact": {
56
+ "kind": "review-file",
57
+ "taskKey": { "ref": "params.taskKey" },
58
+ "iteration": { "ref": "params.iteration" }
59
+ }
60
+ }
61
+ ]
62
+ },
63
+ "message": "Project review did not produce the required review artifact."
64
+ },
65
+ {
66
+ "kind": "require-structured-artifacts",
67
+ "when": { "not": { "ref": "context.dryRun" } },
68
+ "items": [
69
+ {
70
+ "path": {
71
+ "artifact": {
72
+ "kind": "review-json-file",
73
+ "taskKey": { "ref": "params.taskKey" },
74
+ "iteration": { "ref": "params.iteration" }
75
+ }
76
+ },
77
+ "schemaId": "review-findings/v1"
78
+ }
79
+ ],
80
+ "message": "Project review produced invalid structured artifacts."
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,126 @@
1
+ {
2
+ "kind": "review-flow",
3
+ "version": 1,
4
+ "phases": [
5
+ {
6
+ "id": "review",
7
+ "steps": [
8
+ {
9
+ "id": "run_review",
10
+ "node": "llm-prompt",
11
+ "prompt": {
12
+ "templateRef": "review",
13
+ "vars": {
14
+ "jira_task_file": {
15
+ "artifact": {
16
+ "kind": "jira-task-file",
17
+ "taskKey": { "ref": "params.taskKey" }
18
+ }
19
+ },
20
+ "design_file": {
21
+ "artifact": {
22
+ "kind": "design-file",
23
+ "taskKey": { "ref": "params.taskKey" }
24
+ }
25
+ },
26
+ "design_json_file": {
27
+ "artifact": {
28
+ "kind": "design-json-file",
29
+ "taskKey": { "ref": "params.taskKey" }
30
+ }
31
+ },
32
+ "plan_file": {
33
+ "artifact": {
34
+ "kind": "plan-file",
35
+ "taskKey": { "ref": "params.taskKey" }
36
+ }
37
+ },
38
+ "plan_json_file": {
39
+ "artifact": {
40
+ "kind": "plan-json-file",
41
+ "taskKey": { "ref": "params.taskKey" }
42
+ }
43
+ },
44
+ "review_file": {
45
+ "artifact": {
46
+ "kind": "review-file",
47
+ "taskKey": { "ref": "params.taskKey" },
48
+ "iteration": { "ref": "params.iteration" }
49
+ }
50
+ },
51
+ "review_json_file": {
52
+ "artifact": {
53
+ "kind": "review-json-file",
54
+ "taskKey": { "ref": "params.taskKey" },
55
+ "iteration": { "ref": "params.iteration" }
56
+ }
57
+ }
58
+ },
59
+ "extraPrompt": { "ref": "params.extraPrompt" },
60
+ "format": "task-prompt"
61
+ },
62
+ "params": {
63
+ "labelText": {
64
+ "template": "Running review mode (iteration {iteration})",
65
+ "vars": {
66
+ "iteration": { "ref": "params.iteration" }
67
+ }
68
+ },
69
+ "model": { "ref": "params.llmModel" },
70
+ "executor": { "ref": "params.llmExecutor" }
71
+ },
72
+ "expect": [
73
+ {
74
+ "kind": "require-artifacts",
75
+ "when": { "not": { "ref": "context.dryRun" } },
76
+ "paths": {
77
+ "list": [
78
+ {
79
+ "artifact": {
80
+ "kind": "review-file",
81
+ "taskKey": { "ref": "params.taskKey" },
82
+ "iteration": { "ref": "params.iteration" }
83
+ }
84
+ }
85
+ ]
86
+ },
87
+ "message": "Review did not produce the required review artifact."
88
+ },
89
+ {
90
+ "kind": "require-structured-artifacts",
91
+ "when": { "not": { "ref": "context.dryRun" } },
92
+ "items": [
93
+ {
94
+ "path": {
95
+ "artifact": {
96
+ "kind": "review-json-file",
97
+ "taskKey": { "ref": "params.taskKey" },
98
+ "iteration": { "ref": "params.iteration" }
99
+ }
100
+ },
101
+ "schemaId": "review-findings/v1"
102
+ }
103
+ ],
104
+ "message": "Review produced invalid structured artifacts."
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "id": "check_ready_to_merge",
110
+ "node": "file-check",
111
+ "params": {
112
+ "path": {
113
+ "artifact": {
114
+ "kind": "ready-to-merge-file",
115
+ "taskKey": { "ref": "params.taskKey" }
116
+ }
117
+ },
118
+ "panelTitle": { "const": "Ready To Merge" },
119
+ "foundMessage": { "const": "Изменения готовы к merge\nФайл ready-to-merge.md создан." },
120
+ "tone": { "const": "green" }
121
+ }
122
+ }
123
+ ]
124
+ }
125
+ ]
126
+ }