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
@@ -1,312 +0,0 @@
1
- {
2
- "kind": "review-flow",
3
- "version": 1,
4
- "phases": [
5
- {
6
- "id": "review",
7
- "steps": [
8
- {
9
- "id": "run_claude_review",
10
- "node": "claude-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 Claude review mode (iteration {iteration})",
65
- "vars": {
66
- "iteration": { "ref": "params.iteration" }
67
- }
68
- },
69
- "model": { "const": "opus" }
70
- },
71
- "expect": [
72
- {
73
- "kind": "require-artifacts",
74
- "when": { "not": { "ref": "context.dryRun" } },
75
- "paths": {
76
- "list": [
77
- {
78
- "artifact": {
79
- "kind": "review-file",
80
- "taskKey": { "ref": "params.taskKey" },
81
- "iteration": { "ref": "params.iteration" }
82
- }
83
- }
84
- ]
85
- },
86
- "message": "Claude review did not produce the required review artifact."
87
- },
88
- {
89
- "kind": "require-structured-artifacts",
90
- "when": { "not": { "ref": "context.dryRun" } },
91
- "items": [
92
- {
93
- "path": {
94
- "artifact": {
95
- "kind": "review-json-file",
96
- "taskKey": { "ref": "params.taskKey" },
97
- "iteration": { "ref": "params.iteration" }
98
- }
99
- },
100
- "schemaId": "review-findings/v1"
101
- }
102
- ],
103
- "message": "Claude review produced invalid structured artifacts."
104
- }
105
- ]
106
- },
107
- {
108
- "id": "summarize_review",
109
- "when": { "not": { "ref": "context.dryRun" } },
110
- "node": "claude-prompt",
111
- "prompt": {
112
- "templateRef": "review-summary",
113
- "vars": {
114
- "review_file": {
115
- "artifact": {
116
- "kind": "review-file",
117
- "taskKey": { "ref": "params.taskKey" },
118
- "iteration": { "ref": "params.iteration" }
119
- }
120
- },
121
- "review_summary_file": {
122
- "artifact": {
123
- "kind": "review-summary-file",
124
- "taskKey": { "ref": "params.taskKey" },
125
- "iteration": { "ref": "params.iteration" }
126
- }
127
- }
128
- },
129
- "format": "plain"
130
- },
131
- "params": {
132
- "labelText": { "const": "Preparing Claude review summary" },
133
- "summaryTitle": { "const": "Claude Comments" },
134
- "model": { "const": "haiku" },
135
- "outputFile": {
136
- "artifact": {
137
- "kind": "review-summary-file",
138
- "taskKey": { "ref": "params.taskKey" },
139
- "iteration": { "ref": "params.iteration" }
140
- }
141
- }
142
- }
143
- },
144
- {
145
- "id": "run_codex_review_reply",
146
- "node": "codex-local-prompt",
147
- "prompt": {
148
- "templateRef": "review-reply",
149
- "vars": {
150
- "review_file": {
151
- "artifact": {
152
- "kind": "review-file",
153
- "taskKey": { "ref": "params.taskKey" },
154
- "iteration": { "ref": "params.iteration" }
155
- }
156
- },
157
- "review_json_file": {
158
- "artifact": {
159
- "kind": "review-json-file",
160
- "taskKey": { "ref": "params.taskKey" },
161
- "iteration": { "ref": "params.iteration" }
162
- }
163
- },
164
- "jira_task_file": {
165
- "artifact": {
166
- "kind": "jira-task-file",
167
- "taskKey": { "ref": "params.taskKey" }
168
- }
169
- },
170
- "design_file": {
171
- "artifact": {
172
- "kind": "design-file",
173
- "taskKey": { "ref": "params.taskKey" }
174
- }
175
- },
176
- "design_json_file": {
177
- "artifact": {
178
- "kind": "design-json-file",
179
- "taskKey": { "ref": "params.taskKey" }
180
- }
181
- },
182
- "plan_file": {
183
- "artifact": {
184
- "kind": "plan-file",
185
- "taskKey": { "ref": "params.taskKey" }
186
- }
187
- },
188
- "plan_json_file": {
189
- "artifact": {
190
- "kind": "plan-json-file",
191
- "taskKey": { "ref": "params.taskKey" }
192
- }
193
- },
194
- "review_reply_file": {
195
- "artifact": {
196
- "kind": "review-reply-file",
197
- "taskKey": { "ref": "params.taskKey" },
198
- "iteration": { "ref": "params.iteration" }
199
- }
200
- },
201
- "review_reply_json_file": {
202
- "artifact": {
203
- "kind": "review-reply-json-file",
204
- "taskKey": { "ref": "params.taskKey" },
205
- "iteration": { "ref": "params.iteration" }
206
- }
207
- }
208
- },
209
- "extraPrompt": { "ref": "params.extraPrompt" },
210
- "format": "task-prompt"
211
- },
212
- "params": {
213
- "labelText": {
214
- "template": "Running Codex review reply mode (iteration {iteration})",
215
- "vars": {
216
- "iteration": { "ref": "params.iteration" }
217
- }
218
- },
219
- "model": { "const": "gpt-5.4" }
220
- },
221
- "expect": [
222
- {
223
- "kind": "require-artifacts",
224
- "when": { "not": { "ref": "context.dryRun" } },
225
- "paths": {
226
- "list": [
227
- {
228
- "artifact": {
229
- "kind": "review-reply-file",
230
- "taskKey": { "ref": "params.taskKey" },
231
- "iteration": { "ref": "params.iteration" }
232
- }
233
- }
234
- ]
235
- },
236
- "message": "Codex review reply did not produce the required review-reply artifact."
237
- },
238
- {
239
- "kind": "require-structured-artifacts",
240
- "when": { "not": { "ref": "context.dryRun" } },
241
- "items": [
242
- {
243
- "path": {
244
- "artifact": {
245
- "kind": "review-reply-json-file",
246
- "taskKey": { "ref": "params.taskKey" },
247
- "iteration": { "ref": "params.iteration" }
248
- }
249
- },
250
- "schemaId": "review-reply/v1"
251
- }
252
- ],
253
- "message": "Codex review reply produced invalid structured artifacts."
254
- }
255
- ]
256
- },
257
- {
258
- "id": "summarize_review_reply",
259
- "when": { "not": { "ref": "context.dryRun" } },
260
- "node": "claude-prompt",
261
- "prompt": {
262
- "templateRef": "review-reply-summary",
263
- "vars": {
264
- "review_reply_file": {
265
- "artifact": {
266
- "kind": "review-reply-file",
267
- "taskKey": { "ref": "params.taskKey" },
268
- "iteration": { "ref": "params.iteration" }
269
- }
270
- },
271
- "review_reply_summary_file": {
272
- "artifact": {
273
- "kind": "review-reply-summary-file",
274
- "taskKey": { "ref": "params.taskKey" },
275
- "iteration": { "ref": "params.iteration" }
276
- }
277
- }
278
- },
279
- "format": "plain"
280
- },
281
- "params": {
282
- "labelText": { "const": "Preparing Codex reply summary" },
283
- "summaryTitle": { "const": "Codex Reply Summary" },
284
- "model": { "const": "haiku" },
285
- "outputFile": {
286
- "artifact": {
287
- "kind": "review-reply-summary-file",
288
- "taskKey": { "ref": "params.taskKey" },
289
- "iteration": { "ref": "params.iteration" }
290
- }
291
- }
292
- }
293
- },
294
- {
295
- "id": "check_ready_to_merge",
296
- "node": "file-check",
297
- "params": {
298
- "path": {
299
- "artifact": {
300
- "kind": "ready-to-merge-file",
301
- "taskKey": { "ref": "params.taskKey" }
302
- }
303
- },
304
- "panelTitle": { "const": "Ready To Merge" },
305
- "foundMessage": { "const": "Изменения готовы к merge\nФайл ready-to-merge.md создан." },
306
- "tone": { "const": "green" }
307
- }
308
- }
309
- ]
310
- }
311
- ]
312
- }
@@ -1,155 +0,0 @@
1
- {
2
- "kind": "run-linter-loop-flow",
3
- "version": 1,
4
- "phases": [
5
- {
6
- "id": "run_linter_try_1",
7
- "steps": [
8
- {
9
- "id": "run_linter",
10
- "node": "local-script-check",
11
- "params": {
12
- "argv": {
13
- "list": [
14
- { "ref": "params.runLinterScript" }
15
- ]
16
- },
17
- "labelText": {
18
- "const": "Running run_linter.sh locally (attempt 1)"
19
- }
20
- },
21
- "stopFlowIf": {
22
- "equals": [
23
- { "ref": "steps.run_linter_try_1.run_linter.outputs.parsed.ok" },
24
- { "const": true }
25
- ]
26
- }
27
- },
28
- {
29
- "id": "fix_linter",
30
- "when": {
31
- "equals": [
32
- { "ref": "steps.run_linter_try_1.run_linter.outputs.parsed.ok" },
33
- { "const": false }
34
- ]
35
- },
36
- "node": "codex-local-prompt",
37
- "prompt": {
38
- "templateRef": "run-linter-loop-fix",
39
- "extraPrompt": {
40
- "appendPrompt": {
41
- "base": { "ref": "params.extraPrompt" },
42
- "suffix": {
43
- "template": "Последний результат run_linter.sh: exitCode={exit_code}, summary={summary}. Исправь только то, что мешает успешному прохождению проверки.",
44
- "vars": {
45
- "exit_code": { "ref": "steps.run_linter_try_1.run_linter.outputs.parsed.exitCode" },
46
- "summary": { "ref": "steps.run_linter_try_1.run_linter.outputs.parsed.summary" }
47
- }
48
- }
49
- }
50
- },
51
- "format": "task-prompt"
52
- },
53
- "params": {
54
- "labelText": {
55
- "const": "Running Codex linter loop fix (attempt 1)"
56
- },
57
- "model": { "const": "gpt-5.4" }
58
- }
59
- }
60
- ]
61
- },
62
- {
63
- "repeat": {
64
- "var": "attempt",
65
- "from": 2,
66
- "to": 5
67
- },
68
- "phases": [
69
- {
70
- "id": "run_linter_try_${attempt}",
71
- "when": {
72
- "equals": [
73
- { "ref": "steps.run_linter_try_${attempt_minus_one}.run_linter.outputs.parsed.ok" },
74
- { "const": false }
75
- ]
76
- },
77
- "steps": [
78
- {
79
- "id": "run_linter",
80
- "node": "local-script-check",
81
- "params": {
82
- "argv": {
83
- "list": [
84
- { "ref": "params.runLinterScript" }
85
- ]
86
- },
87
- "labelText": {
88
- "template": "Running run_linter.sh locally (attempt ${attempt})"
89
- }
90
- },
91
- "stopFlowIf": {
92
- "equals": [
93
- { "ref": "steps.run_linter_try_${attempt}.run_linter.outputs.parsed.ok" },
94
- { "const": true }
95
- ]
96
- }
97
- },
98
- {
99
- "id": "fix_linter",
100
- "when": {
101
- "equals": [
102
- { "ref": "steps.run_linter_try_${attempt}.run_linter.outputs.parsed.ok" },
103
- { "const": false }
104
- ]
105
- },
106
- "node": "codex-local-prompt",
107
- "prompt": {
108
- "templateRef": "run-linter-loop-fix",
109
- "extraPrompt": {
110
- "appendPrompt": {
111
- "base": { "ref": "params.extraPrompt" },
112
- "suffix": {
113
- "template": "Последний результат run_linter.sh: exitCode={exit_code}, summary={summary}. Исправь только то, что мешает успешному прохождению проверки.",
114
- "vars": {
115
- "exit_code": { "ref": "steps.run_linter_try_${attempt}.run_linter.outputs.parsed.exitCode" },
116
- "summary": { "ref": "steps.run_linter_try_${attempt}.run_linter.outputs.parsed.summary" }
117
- }
118
- }
119
- }
120
- },
121
- "format": "task-prompt"
122
- },
123
- "params": {
124
- "labelText": {
125
- "template": "Running Codex linter loop fix (attempt ${attempt})"
126
- },
127
- "model": { "const": "gpt-5.4" }
128
- }
129
- }
130
- ]
131
- }
132
- ]
133
- },
134
- {
135
- "id": "run_linter_failed",
136
- "steps": [
137
- {
138
- "id": "assert_run_linter_success",
139
- "node": "file-check",
140
- "params": {
141
- "path": { "ref": "params.runLinterScript" }
142
- },
143
- "expect": [
144
- {
145
- "kind": "step-output",
146
- "value": { "ref": "steps.run_linter_try_5.run_linter.outputs.parsed.ok" },
147
- "equals": { "const": true },
148
- "message": "run-linter-loop exhausted all attempts without a successful run_linter.sh execution."
149
- }
150
- ]
151
- }
152
- ]
153
- }
154
- ]
155
- }
@@ -1,155 +0,0 @@
1
- {
2
- "kind": "run-tests-loop-flow",
3
- "version": 1,
4
- "phases": [
5
- {
6
- "id": "run_tests_try_1",
7
- "steps": [
8
- {
9
- "id": "run_tests",
10
- "node": "local-script-check",
11
- "params": {
12
- "argv": {
13
- "list": [
14
- { "ref": "params.runTestsScript" }
15
- ]
16
- },
17
- "labelText": {
18
- "const": "Running run_tests.sh locally (attempt 1)"
19
- }
20
- },
21
- "stopFlowIf": {
22
- "equals": [
23
- { "ref": "steps.run_tests_try_1.run_tests.outputs.parsed.ok" },
24
- { "const": true }
25
- ]
26
- }
27
- },
28
- {
29
- "id": "fix_tests",
30
- "when": {
31
- "equals": [
32
- { "ref": "steps.run_tests_try_1.run_tests.outputs.parsed.ok" },
33
- { "const": false }
34
- ]
35
- },
36
- "node": "codex-local-prompt",
37
- "prompt": {
38
- "templateRef": "run-tests-loop-fix",
39
- "extraPrompt": {
40
- "appendPrompt": {
41
- "base": { "ref": "params.extraPrompt" },
42
- "suffix": {
43
- "template": "Последний результат run_tests.sh: exitCode={exit_code}, summary={summary}. Исправь только то, что мешает успешному прохождению проверки.",
44
- "vars": {
45
- "exit_code": { "ref": "steps.run_tests_try_1.run_tests.outputs.parsed.exitCode" },
46
- "summary": { "ref": "steps.run_tests_try_1.run_tests.outputs.parsed.summary" }
47
- }
48
- }
49
- }
50
- },
51
- "format": "task-prompt"
52
- },
53
- "params": {
54
- "labelText": {
55
- "const": "Running Codex tests loop fix (attempt 1)"
56
- },
57
- "model": { "const": "gpt-5.4" }
58
- }
59
- }
60
- ]
61
- },
62
- {
63
- "repeat": {
64
- "var": "attempt",
65
- "from": 2,
66
- "to": 5
67
- },
68
- "phases": [
69
- {
70
- "id": "run_tests_try_${attempt}",
71
- "when": {
72
- "equals": [
73
- { "ref": "steps.run_tests_try_${attempt_minus_one}.run_tests.outputs.parsed.ok" },
74
- { "const": false }
75
- ]
76
- },
77
- "steps": [
78
- {
79
- "id": "run_tests",
80
- "node": "local-script-check",
81
- "params": {
82
- "argv": {
83
- "list": [
84
- { "ref": "params.runTestsScript" }
85
- ]
86
- },
87
- "labelText": {
88
- "template": "Running run_tests.sh locally (attempt ${attempt})"
89
- }
90
- },
91
- "stopFlowIf": {
92
- "equals": [
93
- { "ref": "steps.run_tests_try_${attempt}.run_tests.outputs.parsed.ok" },
94
- { "const": true }
95
- ]
96
- }
97
- },
98
- {
99
- "id": "fix_tests",
100
- "when": {
101
- "equals": [
102
- { "ref": "steps.run_tests_try_${attempt}.run_tests.outputs.parsed.ok" },
103
- { "const": false }
104
- ]
105
- },
106
- "node": "codex-local-prompt",
107
- "prompt": {
108
- "templateRef": "run-tests-loop-fix",
109
- "extraPrompt": {
110
- "appendPrompt": {
111
- "base": { "ref": "params.extraPrompt" },
112
- "suffix": {
113
- "template": "Последний результат run_tests.sh: exitCode={exit_code}, summary={summary}. Исправь только то, что мешает успешному прохождению проверки.",
114
- "vars": {
115
- "exit_code": { "ref": "steps.run_tests_try_${attempt}.run_tests.outputs.parsed.exitCode" },
116
- "summary": { "ref": "steps.run_tests_try_${attempt}.run_tests.outputs.parsed.summary" }
117
- }
118
- }
119
- }
120
- },
121
- "format": "task-prompt"
122
- },
123
- "params": {
124
- "labelText": {
125
- "template": "Running Codex tests loop fix (attempt ${attempt})"
126
- },
127
- "model": { "const": "gpt-5.4" }
128
- }
129
- }
130
- ]
131
- }
132
- ]
133
- },
134
- {
135
- "id": "run_tests_failed",
136
- "steps": [
137
- {
138
- "id": "assert_run_tests_success",
139
- "node": "file-check",
140
- "params": {
141
- "path": { "ref": "params.runTestsScript" }
142
- },
143
- "expect": [
144
- {
145
- "kind": "step-output",
146
- "value": { "ref": "steps.run_tests_try_5.run_tests.outputs.parsed.ok" },
147
- "equals": { "const": true },
148
- "message": "run-tests-loop exhausted all attempts without a successful run_tests.sh execution."
149
- }
150
- ]
151
- }
152
- ]
153
- }
154
- ]
155
- }
@@ -1,19 +0,0 @@
1
- import { loadDeclarativeFlow } from "../declarative-flows.js";
2
- import { runExpandedPhase } from "../declarative-flow-runner.js";
3
- export async function runPreflightFlow(context, params) {
4
- const flow = loadDeclarativeFlow("preflight.json");
5
- const executionState = {
6
- flowKind: flow.kind,
7
- flowVersion: flow.version,
8
- terminated: false,
9
- phases: [],
10
- };
11
- for (const phase of flow.phases) {
12
- await runExpandedPhase(phase, context, params, flow.constants, {
13
- executionState,
14
- flowKind: flow.kind,
15
- flowVersion: flow.version,
16
- });
17
- }
18
- return executionState;
19
- }