agentweaver 0.1.10 → 0.1.12
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.
- package/README.md +218 -224
- package/dist/artifacts.js +109 -55
- package/dist/executors/{codex-local-executor.js → codex-executor.js} +6 -5
- package/dist/executors/configs/{codex-local-config.js → codex-config.js} +1 -1
- package/dist/executors/configs/jira-fetch-config.js +2 -0
- package/dist/executors/configs/telegram-notifier-config.js +3 -0
- package/dist/executors/fetch-gitlab-diff-executor.js +1 -1
- package/dist/executors/fetch-gitlab-review-executor.js +1 -1
- package/dist/executors/git-commit-executor.js +25 -0
- package/dist/executors/jira-fetch-executor.js +1 -0
- package/dist/executors/opencode-executor.js +22 -11
- package/dist/executors/process-executor.js +3 -0
- package/dist/executors/telegram-notifier-executor.js +54 -0
- package/dist/flow-state.js +46 -1
- package/dist/gitlab.js +13 -8
- package/dist/index.js +477 -514
- package/dist/interactive-ui.js +609 -88
- package/dist/jira.js +109 -5
- package/dist/pipeline/auto-flow.js +6 -6
- package/dist/pipeline/context.js +1 -0
- package/dist/pipeline/flow-catalog.js +34 -4
- package/dist/pipeline/flow-model-settings.js +77 -0
- package/dist/pipeline/flow-specs/auto-common.json +446 -0
- package/dist/pipeline/flow-specs/auto-golang.json +563 -0
- package/dist/pipeline/flow-specs/{bug-analyze.json → bugz/bug-analyze.json} +43 -25
- package/dist/pipeline/flow-specs/{bug-fix.json → bugz/bug-fix.json} +5 -4
- package/dist/pipeline/flow-specs/git-commit.json +196 -0
- package/dist/pipeline/flow-specs/{gitlab-diff-review.json → gitlab/gitlab-diff-review.json} +20 -50
- package/dist/pipeline/flow-specs/{gitlab-review.json → gitlab/gitlab-review.json} +65 -133
- package/dist/pipeline/flow-specs/{mr-description.json → gitlab/mr-description.json} +17 -10
- package/dist/pipeline/flow-specs/{run-go-linter-loop.json → go/run-go-linter-loop.json} +40 -14
- package/dist/pipeline/flow-specs/{run-go-tests-loop.json → go/run-go-tests-loop.json} +40 -14
- package/dist/pipeline/flow-specs/implement.json +5 -4
- package/dist/pipeline/flow-specs/plan.json +40 -148
- package/dist/pipeline/flow-specs/{review-fix.json → review/review-fix.json} +74 -13
- package/dist/pipeline/flow-specs/review/review-loop.json +282 -0
- package/dist/pipeline/flow-specs/review/review-project.json +87 -0
- package/dist/pipeline/flow-specs/review/review.json +126 -0
- package/dist/pipeline/flow-specs/task-describe.json +252 -11
- package/dist/pipeline/launch-profile-config.js +38 -0
- package/dist/pipeline/node-registry.js +75 -45
- package/dist/pipeline/nodes/build-failure-summary-node.js +16 -29
- package/dist/pipeline/nodes/build-review-fix-prompt-node.js +36 -0
- package/dist/pipeline/nodes/codex-prompt-node.js +41 -0
- package/dist/pipeline/nodes/commit-message-form-node.js +79 -0
- package/dist/pipeline/nodes/git-commit-form-node.js +138 -0
- package/dist/pipeline/nodes/git-commit-node.js +28 -0
- package/dist/pipeline/nodes/git-status-node.js +221 -0
- package/dist/pipeline/nodes/gitlab-review-artifacts-node.js +10 -6
- package/dist/pipeline/nodes/jira-context-node.js +10 -0
- package/dist/pipeline/nodes/jira-fetch-node.js +3 -0
- package/dist/pipeline/nodes/llm-prompt-node.js +62 -0
- package/dist/pipeline/nodes/plan-codex-node.js +1 -1
- package/dist/pipeline/nodes/read-file-node.js +11 -0
- package/dist/pipeline/nodes/review-findings-form-node.js +48 -14
- package/dist/pipeline/nodes/select-files-form-node.js +72 -0
- package/dist/pipeline/nodes/telegram-notifier-node.js +28 -0
- package/dist/pipeline/nodes/user-input-node.js +43 -8
- package/dist/pipeline/nodes/write-selection-file-node.js +46 -0
- package/dist/pipeline/prompt-registry.js +3 -4
- package/dist/pipeline/prompt-runtime.js +13 -3
- package/dist/pipeline/registry.js +6 -8
- package/dist/pipeline/spec-compiler.js +5 -0
- package/dist/pipeline/spec-types.js +9 -3
- package/dist/pipeline/spec-validator.js +4 -0
- package/dist/pipeline/types.js +1 -0
- package/dist/pipeline/value-resolver.js +50 -38
- package/dist/prompts.js +119 -110
- package/dist/runtime/agentweaver-home.js +8 -0
- package/dist/runtime/command-resolution.js +0 -38
- package/dist/runtime/env-loader.js +43 -0
- package/dist/runtime/process-runner.js +9 -3
- package/dist/structured-artifact-schema-registry.js +54 -0
- package/dist/structured-artifact-schemas.json +22 -20
- package/dist/structured-artifacts.js +3 -43
- package/dist/user-input.js +38 -3
- package/package.json +2 -6
- package/Dockerfile.codex +0 -56
- package/dist/executors/claude-executor.js +0 -46
- package/dist/executors/codex-docker-executor.js +0 -27
- package/dist/executors/configs/claude-config.js +0 -12
- package/dist/executors/configs/codex-docker-config.js +0 -10
- package/dist/executors/configs/verify-build-config.js +0 -7
- package/dist/executors/verify-build-executor.js +0 -123
- package/dist/pipeline/flow-specs/auto.json +0 -979
- package/dist/pipeline/flow-specs/opencode/auto-opencode.json +0 -1365
- package/dist/pipeline/flow-specs/opencode/bugz/bug-analyze-opencode.json +0 -382
- package/dist/pipeline/flow-specs/opencode/bugz/bug-fix-opencode.json +0 -56
- package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-diff-review-opencode.json +0 -308
- package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-review-opencode.json +0 -437
- package/dist/pipeline/flow-specs/opencode/gitlab/mr-description-opencode.json +0 -117
- package/dist/pipeline/flow-specs/opencode/go/run-go-linter-loop-opencode.json +0 -321
- package/dist/pipeline/flow-specs/opencode/go/run-go-tests-loop-opencode.json +0 -321
- package/dist/pipeline/flow-specs/opencode/implement-opencode.json +0 -64
- package/dist/pipeline/flow-specs/opencode/plan-opencode.json +0 -603
- package/dist/pipeline/flow-specs/opencode/review/review-fix-opencode.json +0 -209
- package/dist/pipeline/flow-specs/opencode/review/review-opencode.json +0 -452
- package/dist/pipeline/flow-specs/opencode/task-describe-opencode.json +0 -148
- package/dist/pipeline/flow-specs/review-project.json +0 -243
- package/dist/pipeline/flow-specs/review.json +0 -312
- package/dist/pipeline/flows/preflight-flow.js +0 -19
- package/dist/pipeline/nodes/claude-prompt-node.js +0 -54
- package/dist/pipeline/nodes/codex-docker-prompt-node.js +0 -32
- package/dist/pipeline/nodes/codex-local-prompt-node.js +0 -32
- package/dist/pipeline/nodes/review-claude-node.js +0 -38
- package/dist/pipeline/nodes/review-reply-codex-node.js +0 -40
- package/dist/pipeline/nodes/verify-build-node.js +0 -15
- package/dist/runtime/docker-runtime.js +0 -51
- package/docker-compose.yml +0 -445
- package/verify_build.sh +0 -105
|
@@ -5,16 +5,115 @@
|
|
|
5
5
|
{
|
|
6
6
|
"id": "task_describe",
|
|
7
7
|
"steps": [
|
|
8
|
+
{
|
|
9
|
+
"id": "collect_task_source",
|
|
10
|
+
"node": "user-input",
|
|
11
|
+
"params": {
|
|
12
|
+
"formId": { "const": "task-describe-source-input" },
|
|
13
|
+
"title": { "const": "Task Describe Source" },
|
|
14
|
+
"description": {
|
|
15
|
+
"const": "Укажи либо Jira issue key / browse URL, либо кратко опиши задачу вручную."
|
|
16
|
+
},
|
|
17
|
+
"submitLabel": { "const": "Generate description" },
|
|
18
|
+
"fields": {
|
|
19
|
+
"list": [
|
|
20
|
+
{
|
|
21
|
+
"const": {
|
|
22
|
+
"id": "jira_ref",
|
|
23
|
+
"type": "text",
|
|
24
|
+
"label": "Jira issue key or browse URL",
|
|
25
|
+
"help": "Например: DEMO-3288 или https://jira.example.ru/browse/DEMO-3288. Оставь пустым, если опишешь задачу вручную.",
|
|
26
|
+
"required": false
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"const": {
|
|
31
|
+
"id": "additional_instructions",
|
|
32
|
+
"type": "text",
|
|
33
|
+
"label": "Additional instructions",
|
|
34
|
+
"help": "Необязательные указания для генерации описания. Например: ссылка на другой локальный репозиторий, связанный проект, ограничения или полезный контекст.",
|
|
35
|
+
"required": false,
|
|
36
|
+
"multiline": true,
|
|
37
|
+
"rows": 4,
|
|
38
|
+
"placeholder": "Например: смотри также ../billing-service, описание API есть в docs/task-templates.md"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"const": {
|
|
43
|
+
"id": "task_description",
|
|
44
|
+
"type": "text",
|
|
45
|
+
"label": "Task description",
|
|
46
|
+
"help": "Кратко опиши задачу своими словами. Заполни это поле только если Jira нет.",
|
|
47
|
+
"required": false,
|
|
48
|
+
"multiline": true,
|
|
49
|
+
"rows": 3,
|
|
50
|
+
"placeholder": "Например: добавить фильтр по статусу в список заказов и сохранить выбранное значение в URL"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"outputFile": {
|
|
56
|
+
"artifact": {
|
|
57
|
+
"kind": "task-describe-input-json-file",
|
|
58
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"expect": [
|
|
63
|
+
{
|
|
64
|
+
"kind": "require-structured-artifacts",
|
|
65
|
+
"items": [
|
|
66
|
+
{
|
|
67
|
+
"path": {
|
|
68
|
+
"artifact": {
|
|
69
|
+
"kind": "task-describe-input-json-file",
|
|
70
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"schemaId": "user-input/v1"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"message": "Task describe source input is missing or invalid."
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "resolve_jira_context",
|
|
82
|
+
"node": "jira-context",
|
|
83
|
+
"when": {
|
|
84
|
+
"ref": "steps.task_describe.collect_task_source.value.values.jira_ref"
|
|
85
|
+
},
|
|
86
|
+
"params": {
|
|
87
|
+
"jiraRef": {
|
|
88
|
+
"ref": "steps.task_describe.collect_task_source.value.values.jira_ref"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
8
92
|
{
|
|
9
93
|
"id": "fetch_jira",
|
|
10
94
|
"node": "jira-fetch",
|
|
95
|
+
"when": {
|
|
96
|
+
"ref": "steps.task_describe.collect_task_source.value.values.jira_ref"
|
|
97
|
+
},
|
|
11
98
|
"params": {
|
|
12
|
-
"jiraApiUrl": { "ref": "
|
|
99
|
+
"jiraApiUrl": { "ref": "steps.task_describe.resolve_jira_context.value.jiraApiUrl" },
|
|
13
100
|
"outputFile": {
|
|
14
101
|
"artifact": {
|
|
15
102
|
"kind": "jira-task-file",
|
|
16
103
|
"taskKey": { "ref": "params.taskKey" }
|
|
17
104
|
}
|
|
105
|
+
},
|
|
106
|
+
"attachmentsManifestFile": {
|
|
107
|
+
"artifact": {
|
|
108
|
+
"kind": "jira-attachments-manifest-file",
|
|
109
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"attachmentsContextFile": {
|
|
113
|
+
"artifact": {
|
|
114
|
+
"kind": "jira-attachments-context-file",
|
|
115
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
116
|
+
}
|
|
18
117
|
}
|
|
19
118
|
},
|
|
20
119
|
"expect": [
|
|
@@ -27,12 +126,35 @@
|
|
|
27
126
|
}
|
|
28
127
|
},
|
|
29
128
|
"message": "Jira fetch node did not produce the Jira task file."
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"kind": "require-file",
|
|
132
|
+
"path": {
|
|
133
|
+
"artifact": {
|
|
134
|
+
"kind": "jira-attachments-manifest-file",
|
|
135
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"message": "Jira fetch node did not produce the Jira attachments manifest file."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"kind": "require-file",
|
|
142
|
+
"path": {
|
|
143
|
+
"artifact": {
|
|
144
|
+
"kind": "jira-attachments-context-file",
|
|
145
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"message": "Jira fetch node did not produce the Jira attachments context file."
|
|
30
149
|
}
|
|
31
150
|
]
|
|
32
151
|
},
|
|
33
152
|
{
|
|
34
|
-
"id": "
|
|
35
|
-
"node": "
|
|
153
|
+
"id": "run_task_describe_from_jira",
|
|
154
|
+
"node": "llm-prompt",
|
|
155
|
+
"when": {
|
|
156
|
+
"ref": "steps.task_describe.collect_task_source.value.values.jira_ref"
|
|
157
|
+
},
|
|
36
158
|
"prompt": {
|
|
37
159
|
"templateRef": "task-describe",
|
|
38
160
|
"vars": {
|
|
@@ -42,37 +164,59 @@
|
|
|
42
164
|
"taskKey": { "ref": "params.taskKey" }
|
|
43
165
|
}
|
|
44
166
|
},
|
|
167
|
+
"jira_attachments_manifest_file": {
|
|
168
|
+
"artifact": {
|
|
169
|
+
"kind": "jira-attachments-manifest-file",
|
|
170
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"jira_attachments_context_file": {
|
|
174
|
+
"artifact": {
|
|
175
|
+
"kind": "jira-attachments-context-file",
|
|
176
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
177
|
+
}
|
|
178
|
+
},
|
|
45
179
|
"jira_description_file": {
|
|
46
180
|
"artifact": {
|
|
47
181
|
"kind": "jira-description-file",
|
|
48
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
182
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
183
|
+
"iteration": { "ref": "params.iteration" }
|
|
49
184
|
}
|
|
50
185
|
},
|
|
51
186
|
"jira_description_json_file": {
|
|
52
187
|
"artifact": {
|
|
53
188
|
"kind": "jira-description-json-file",
|
|
54
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
189
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
190
|
+
"iteration": { "ref": "params.iteration" }
|
|
55
191
|
}
|
|
56
192
|
}
|
|
57
193
|
},
|
|
58
|
-
"extraPrompt": {
|
|
194
|
+
"extraPrompt": {
|
|
195
|
+
"appendPrompt": {
|
|
196
|
+
"base": { "ref": "params.extraPrompt" },
|
|
197
|
+
"suffix": { "ref": "steps.task_describe.collect_task_source.value.promptSuffix" }
|
|
198
|
+
}
|
|
199
|
+
},
|
|
59
200
|
"format": "task-prompt"
|
|
60
201
|
},
|
|
61
202
|
"params": {
|
|
62
|
-
"labelText": { "const": "Running
|
|
63
|
-
"model": { "
|
|
203
|
+
"labelText": { "const": "Running task description mode" },
|
|
204
|
+
"model": { "ref": "params.llmModel" },
|
|
205
|
+
"executor": { "ref": "params.llmExecutor" },
|
|
64
206
|
"requiredArtifacts": {
|
|
65
207
|
"list": [
|
|
66
208
|
{
|
|
67
209
|
"artifact": {
|
|
68
210
|
"kind": "jira-description-file",
|
|
69
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
211
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
212
|
+
"iteration": { "ref": "params.iteration" }
|
|
70
213
|
}
|
|
71
214
|
},
|
|
72
215
|
{
|
|
73
216
|
"artifact": {
|
|
74
217
|
"kind": "jira-description-json-file",
|
|
75
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
218
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
219
|
+
"iteration": { "ref": "params.iteration" }
|
|
76
220
|
}
|
|
77
221
|
}
|
|
78
222
|
]
|
|
@@ -85,9 +229,105 @@
|
|
|
85
229
|
"path": {
|
|
86
230
|
"artifact": {
|
|
87
231
|
"kind": "jira-description-file",
|
|
232
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
233
|
+
"iteration": { "ref": "params.iteration" }
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"message": "Task describe mode did not produce the Jira description artifact."
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"kind": "require-structured-artifacts",
|
|
240
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
241
|
+
"items": [
|
|
242
|
+
{
|
|
243
|
+
"path": {
|
|
244
|
+
"artifact": {
|
|
245
|
+
"kind": "jira-description-json-file",
|
|
246
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
247
|
+
"iteration": { "ref": "params.iteration" }
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"schemaId": "jira-description/v1"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"message": "Task describe mode produced invalid structured artifacts."
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"id": "run_task_describe_from_input",
|
|
259
|
+
"node": "llm-prompt",
|
|
260
|
+
"when": {
|
|
261
|
+
"not": {
|
|
262
|
+
"ref": "steps.task_describe.collect_task_source.value.values.jira_ref"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"prompt": {
|
|
266
|
+
"inlineTemplate": "Review the user-provided task description in {task_input_file}. Use the values.task_description field as source of truth. Study the repository code relevant to the task before writing the description, and use that analysis to add concise context about the current behavior, existing routes/modules, contracts, DTOs, or missing pieces directly related to the request. The result must be richer than a paraphrase of the input, but do not invent requirements that are not supported by the user text or the code. Formulate a typical Jira task description in simple product language, without overloading with technical details. Description structure: Problem, Context, What needs to be done, Acceptance criteria. Add concrete implementation context when it is supported by the code: mention where changes are likely needed, including specific routes, handlers, services, DTOs, API contracts, validation rules, repository methods, events, or UI screens. If the user description lacks details, do not invent them and keep formulations general enough. The source-of-truth JSON must be in English for all generated semantic string values, while verbatim user-provided source text may be preserved as needed. First write the source-of-truth JSON to {jira_description_json_file} as object { summary: string }, then the markdown version to {jira_description_file}.",
|
|
267
|
+
"vars": {
|
|
268
|
+
"task_input_file": {
|
|
269
|
+
"artifact": {
|
|
270
|
+
"kind": "task-describe-input-json-file",
|
|
88
271
|
"taskKey": { "ref": "params.taskKey" }
|
|
89
272
|
}
|
|
90
273
|
},
|
|
274
|
+
"jira_description_file": {
|
|
275
|
+
"artifact": {
|
|
276
|
+
"kind": "jira-description-file",
|
|
277
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
278
|
+
"iteration": { "ref": "params.iteration" }
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"jira_description_json_file": {
|
|
282
|
+
"artifact": {
|
|
283
|
+
"kind": "jira-description-json-file",
|
|
284
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
285
|
+
"iteration": { "ref": "params.iteration" }
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"extraPrompt": {
|
|
290
|
+
"appendPrompt": {
|
|
291
|
+
"base": { "ref": "params.extraPrompt" },
|
|
292
|
+
"suffix": { "ref": "steps.task_describe.collect_task_source.value.promptSuffix" }
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"format": "task-prompt"
|
|
296
|
+
},
|
|
297
|
+
"params": {
|
|
298
|
+
"labelText": { "const": "Running task description mode" },
|
|
299
|
+
"model": { "ref": "params.llmModel" },
|
|
300
|
+
"executor": { "ref": "params.llmExecutor" },
|
|
301
|
+
"requiredArtifacts": {
|
|
302
|
+
"list": [
|
|
303
|
+
{
|
|
304
|
+
"artifact": {
|
|
305
|
+
"kind": "jira-description-file",
|
|
306
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
307
|
+
"iteration": { "ref": "params.iteration" }
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"artifact": {
|
|
312
|
+
"kind": "jira-description-json-file",
|
|
313
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
314
|
+
"iteration": { "ref": "params.iteration" }
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"expect": [
|
|
321
|
+
{
|
|
322
|
+
"kind": "require-file",
|
|
323
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
324
|
+
"path": {
|
|
325
|
+
"artifact": {
|
|
326
|
+
"kind": "jira-description-file",
|
|
327
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
328
|
+
"iteration": { "ref": "params.iteration" }
|
|
329
|
+
}
|
|
330
|
+
},
|
|
91
331
|
"message": "Task describe mode did not produce the Jira description artifact."
|
|
92
332
|
},
|
|
93
333
|
{
|
|
@@ -98,7 +338,8 @@
|
|
|
98
338
|
"path": {
|
|
99
339
|
"artifact": {
|
|
100
340
|
"kind": "jira-description-json-file",
|
|
101
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
341
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
342
|
+
"iteration": { "ref": "params.iteration" }
|
|
102
343
|
}
|
|
103
344
|
},
|
|
104
345
|
"schemaId": "jira-description/v1"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const LLM_EXECUTOR_IDS = ["codex", "opencode"];
|
|
2
|
+
export const ALLOWED_MODELS_BY_EXECUTOR = {
|
|
3
|
+
codex: ["gpt-5.4", "gpt-5.4-mini", "gpt-5.3-codex"],
|
|
4
|
+
opencode: ["opencode/minimax-m2.5-free", "minimax-coding-plan/MiniMax-M2.7", "zhipuai-coding-plan/glm-5.1", "zhipuai-coding-plan/glm-4.7"],
|
|
5
|
+
};
|
|
6
|
+
export const DEFAULT_EXECUTOR = "opencode";
|
|
7
|
+
export const DEFAULT_MODEL_BY_EXECUTOR = {
|
|
8
|
+
codex: "gpt-5.4",
|
|
9
|
+
opencode: "minimax-coding-plan/MiniMax-M2.7",
|
|
10
|
+
};
|
|
11
|
+
export const DEFAULT_LAUNCH_PROFILE = {
|
|
12
|
+
executor: DEFAULT_EXECUTOR,
|
|
13
|
+
model: DEFAULT_MODEL_BY_EXECUTOR[DEFAULT_EXECUTOR],
|
|
14
|
+
};
|
|
15
|
+
export function defaultModelForExecutor(executor) {
|
|
16
|
+
return DEFAULT_MODEL_BY_EXECUTOR[executor];
|
|
17
|
+
}
|
|
18
|
+
export function isLlmExecutorId(value) {
|
|
19
|
+
return LLM_EXECUTOR_IDS.includes(value);
|
|
20
|
+
}
|
|
21
|
+
export function isAllowedModelForExecutor(executor, model) {
|
|
22
|
+
return ALLOWED_MODELS_BY_EXECUTOR[executor].includes(model);
|
|
23
|
+
}
|
|
24
|
+
export function resolveLaunchProfile(selection, fallback = DEFAULT_LAUNCH_PROFILE) {
|
|
25
|
+
const executor = selection.executor === "default" ? fallback.executor : selection.executor;
|
|
26
|
+
const model = selection.model === "default"
|
|
27
|
+
? selection.executor === "default"
|
|
28
|
+
? fallback.model
|
|
29
|
+
: defaultModelForExecutor(executor)
|
|
30
|
+
: selection.model;
|
|
31
|
+
return {
|
|
32
|
+
executor,
|
|
33
|
+
model,
|
|
34
|
+
selectedExecutor: selection.executor,
|
|
35
|
+
selectedModel: selection.model,
|
|
36
|
+
fingerprint: `${executor}::${model}`,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -1,48 +1,60 @@
|
|
|
1
1
|
import { buildFailureSummaryNode } from "./nodes/build-failure-summary-node.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { codexLocalPromptNode } from "./nodes/codex-local-prompt-node.js";
|
|
2
|
+
import { buildReviewFixPromptNode } from "./nodes/build-review-fix-prompt-node.js";
|
|
3
|
+
import { codexPromptNode } from "./nodes/codex-prompt-node.js";
|
|
5
4
|
import { commandCheckNode } from "./nodes/command-check-node.js";
|
|
5
|
+
import { commitMessageFormNode } from "./nodes/commit-message-form-node.js";
|
|
6
6
|
import { fetchGitLabDiffNode } from "./nodes/fetch-gitlab-diff-node.js";
|
|
7
7
|
import { fetchGitLabReviewNode } from "./nodes/fetch-gitlab-review-node.js";
|
|
8
8
|
import { fileCheckNode } from "./nodes/file-check-node.js";
|
|
9
9
|
import { flowRunNode } from "./nodes/flow-run-node.js";
|
|
10
|
+
import { gitCommitFormNode } from "./nodes/git-commit-form-node.js";
|
|
11
|
+
import { gitCommitNode } from "./nodes/git-commit-node.js";
|
|
12
|
+
import { gitStatusNode } from "./nodes/git-status-node.js";
|
|
10
13
|
import { gitlabReviewArtifactsNode } from "./nodes/gitlab-review-artifacts-node.js";
|
|
11
14
|
import { jiraFetchNode } from "./nodes/jira-fetch-node.js";
|
|
15
|
+
import { jiraContextNode } from "./nodes/jira-context-node.js";
|
|
12
16
|
import { jiraIssueCheckNode } from "./nodes/jira-issue-check-node.js";
|
|
13
17
|
import { localScriptCheckNode } from "./nodes/local-script-check-node.js";
|
|
18
|
+
import { llmPromptNode } from "./nodes/llm-prompt-node.js";
|
|
14
19
|
import { opencodePromptNode } from "./nodes/opencode-prompt-node.js";
|
|
15
20
|
import { planCodexNode } from "./nodes/plan-codex-node.js";
|
|
16
21
|
import { planningQuestionsFormNode } from "./nodes/planning-questions-form-node.js";
|
|
17
|
-
import {
|
|
22
|
+
import { readFileNode } from "./nodes/read-file-node.js";
|
|
18
23
|
import { reviewFindingsFormNode } from "./nodes/review-findings-form-node.js";
|
|
19
|
-
import {
|
|
24
|
+
import { selectFilesFormNode } from "./nodes/select-files-form-node.js";
|
|
20
25
|
import { summaryFileLoadNode } from "./nodes/summary-file-load-node.js";
|
|
26
|
+
import { telegramNotifierNode } from "./nodes/telegram-notifier-node.js";
|
|
21
27
|
import { userInputNode } from "./nodes/user-input-node.js";
|
|
22
|
-
import {
|
|
28
|
+
import { writeSelectionFileNode } from "./nodes/write-selection-file-node.js";
|
|
23
29
|
const builtInNodes = {
|
|
24
30
|
"build-failure-summary": buildFailureSummaryNode,
|
|
25
|
-
"
|
|
26
|
-
"codex-
|
|
27
|
-
"codex-local-prompt": codexLocalPromptNode,
|
|
31
|
+
"build-review-fix-prompt": buildReviewFixPromptNode,
|
|
32
|
+
"codex-prompt": codexPromptNode,
|
|
28
33
|
"command-check": commandCheckNode,
|
|
34
|
+
"commit-message-form": commitMessageFormNode,
|
|
29
35
|
"fetch-gitlab-diff": fetchGitLabDiffNode,
|
|
30
36
|
"fetch-gitlab-review": fetchGitLabReviewNode,
|
|
31
37
|
"file-check": fileCheckNode,
|
|
32
38
|
"flow-run": flowRunNode,
|
|
39
|
+
"git-commit": gitCommitNode,
|
|
40
|
+
"git-commit-form": gitCommitFormNode,
|
|
41
|
+
"git-status": gitStatusNode,
|
|
33
42
|
"gitlab-review-artifacts": gitlabReviewArtifactsNode,
|
|
43
|
+
"jira-context": jiraContextNode,
|
|
34
44
|
"jira-fetch": jiraFetchNode,
|
|
35
45
|
"jira-issue-check": jiraIssueCheckNode,
|
|
36
46
|
"local-script-check": localScriptCheckNode,
|
|
47
|
+
"llm-prompt": llmPromptNode,
|
|
37
48
|
"opencode-prompt": opencodePromptNode,
|
|
38
49
|
"plan-codex": planCodexNode,
|
|
39
50
|
"planning-questions-form": planningQuestionsFormNode,
|
|
40
|
-
"
|
|
51
|
+
"read-file": readFileNode,
|
|
41
52
|
"review-findings-form": reviewFindingsFormNode,
|
|
42
|
-
"
|
|
53
|
+
"select-files-form": selectFilesFormNode,
|
|
43
54
|
"summary-file-load": summaryFileLoadNode,
|
|
55
|
+
"telegram-notify": telegramNotifierNode,
|
|
44
56
|
"user-input": userInputNode,
|
|
45
|
-
"
|
|
57
|
+
"write-selection-file": writeSelectionFileNode,
|
|
46
58
|
};
|
|
47
59
|
const builtInNodeMetadata = {
|
|
48
60
|
"build-failure-summary": {
|
|
@@ -50,28 +62,20 @@ const builtInNodeMetadata = {
|
|
|
50
62
|
version: 1,
|
|
51
63
|
prompt: "forbidden",
|
|
52
64
|
requiredParams: ["output"],
|
|
53
|
-
executors: ["
|
|
65
|
+
executors: ["codex"],
|
|
54
66
|
},
|
|
55
|
-
"
|
|
56
|
-
kind: "
|
|
67
|
+
"build-review-fix-prompt": {
|
|
68
|
+
kind: "build-review-fix-prompt",
|
|
57
69
|
version: 1,
|
|
58
|
-
prompt: "
|
|
59
|
-
requiredParams: ["
|
|
60
|
-
executors: ["claude"],
|
|
61
|
-
},
|
|
62
|
-
"codex-docker-prompt": {
|
|
63
|
-
kind: "codex-docker-prompt",
|
|
64
|
-
version: 1,
|
|
65
|
-
prompt: "required",
|
|
66
|
-
requiredParams: ["dockerComposeFile", "labelText"],
|
|
67
|
-
executors: ["codex-docker"],
|
|
70
|
+
prompt: "forbidden",
|
|
71
|
+
requiredParams: ["selectionFile", "autoMode"],
|
|
68
72
|
},
|
|
69
|
-
"codex-
|
|
70
|
-
kind: "codex-
|
|
73
|
+
"codex-prompt": {
|
|
74
|
+
kind: "codex-prompt",
|
|
71
75
|
version: 1,
|
|
72
76
|
prompt: "required",
|
|
73
77
|
requiredParams: ["labelText"],
|
|
74
|
-
executors: ["codex
|
|
78
|
+
executors: ["codex"],
|
|
75
79
|
},
|
|
76
80
|
"command-check": {
|
|
77
81
|
kind: "command-check",
|
|
@@ -80,6 +84,12 @@ const builtInNodeMetadata = {
|
|
|
80
84
|
requiredParams: ["commands"],
|
|
81
85
|
executors: ["command-check"],
|
|
82
86
|
},
|
|
87
|
+
"commit-message-form": {
|
|
88
|
+
kind: "commit-message-form",
|
|
89
|
+
version: 1,
|
|
90
|
+
prompt: "forbidden",
|
|
91
|
+
requiredParams: ["commitMessageFile", "formId", "title", "outputFile"],
|
|
92
|
+
},
|
|
83
93
|
"fetch-gitlab-diff": {
|
|
84
94
|
kind: "fetch-gitlab-diff",
|
|
85
95
|
version: 1,
|
|
@@ -108,6 +118,20 @@ const builtInNodeMetadata = {
|
|
|
108
118
|
prompt: "forbidden",
|
|
109
119
|
requiredParams: ["gitlabReviewJsonFile", "reviewFile", "reviewJsonFile"],
|
|
110
120
|
},
|
|
121
|
+
"git-commit": { kind: "git-commit", version: 1, prompt: "forbidden", requiredParams: ["message", "files"], executors: ["git-commit"] },
|
|
122
|
+
"git-commit-form": {
|
|
123
|
+
kind: "git-commit-form",
|
|
124
|
+
version: 1,
|
|
125
|
+
prompt: "forbidden",
|
|
126
|
+
requiredParams: ["gitStatusJsonFile", "commitMessageFile", "formId", "title", "outputFile"],
|
|
127
|
+
},
|
|
128
|
+
"git-status": { kind: "git-status", version: 1, prompt: "forbidden", requiredParams: ["outputFile"] },
|
|
129
|
+
"jira-context": {
|
|
130
|
+
kind: "jira-context",
|
|
131
|
+
version: 1,
|
|
132
|
+
prompt: "forbidden",
|
|
133
|
+
requiredParams: ["jiraRef"],
|
|
134
|
+
},
|
|
111
135
|
"jira-fetch": {
|
|
112
136
|
kind: "jira-fetch",
|
|
113
137
|
version: 1,
|
|
@@ -122,13 +146,20 @@ const builtInNodeMetadata = {
|
|
|
122
146
|
requiredParams: ["jiraTaskFile", "allowedIssueTypes"],
|
|
123
147
|
},
|
|
124
148
|
"local-script-check": { kind: "local-script-check", version: 1, prompt: "forbidden", requiredParams: ["argv", "labelText"] },
|
|
149
|
+
"llm-prompt": {
|
|
150
|
+
kind: "llm-prompt",
|
|
151
|
+
version: 1,
|
|
152
|
+
prompt: "required",
|
|
153
|
+
requiredParams: ["labelText", "executor"],
|
|
154
|
+
executors: ["codex", "opencode"],
|
|
155
|
+
},
|
|
125
156
|
"opencode-prompt": { kind: "opencode-prompt", version: 1, prompt: "required", requiredParams: ["labelText"] },
|
|
126
157
|
"plan-codex": {
|
|
127
158
|
kind: "plan-codex",
|
|
128
159
|
version: 1,
|
|
129
160
|
prompt: "forbidden",
|
|
130
161
|
requiredParams: ["prompt", "requiredArtifacts"],
|
|
131
|
-
executors: ["codex
|
|
162
|
+
executors: ["codex"],
|
|
132
163
|
},
|
|
133
164
|
"planning-questions-form": {
|
|
134
165
|
kind: "planning-questions-form",
|
|
@@ -136,39 +167,38 @@ const builtInNodeMetadata = {
|
|
|
136
167
|
prompt: "forbidden",
|
|
137
168
|
requiredParams: ["planningQuestionsJsonFile", "formId", "title"],
|
|
138
169
|
},
|
|
139
|
-
"
|
|
140
|
-
kind: "review-claude",
|
|
141
|
-
version: 1,
|
|
142
|
-
prompt: "forbidden",
|
|
143
|
-
requiredParams: ["jiraTaskFile", "taskKey", "iteration", "claudeCmd"],
|
|
144
|
-
executors: ["claude"],
|
|
145
|
-
},
|
|
170
|
+
"read-file": { kind: "read-file", version: 1, prompt: "forbidden", requiredParams: ["path"] },
|
|
146
171
|
"review-findings-form": {
|
|
147
172
|
kind: "review-findings-form",
|
|
148
173
|
version: 1,
|
|
149
174
|
prompt: "forbidden",
|
|
150
|
-
requiredParams: ["
|
|
175
|
+
requiredParams: ["reviewFindingsJsonFile", "formId", "title"],
|
|
151
176
|
},
|
|
152
|
-
"
|
|
153
|
-
kind: "
|
|
177
|
+
"select-files-form": {
|
|
178
|
+
kind: "select-files-form",
|
|
154
179
|
version: 1,
|
|
155
180
|
prompt: "forbidden",
|
|
156
|
-
requiredParams: ["
|
|
157
|
-
executors: ["codex-local"],
|
|
181
|
+
requiredParams: ["gitStatusJsonFile", "formId", "title", "outputFile"],
|
|
158
182
|
},
|
|
159
183
|
"summary-file-load": { kind: "summary-file-load", version: 1, prompt: "forbidden", requiredParams: ["path"] },
|
|
184
|
+
"telegram-notify": {
|
|
185
|
+
kind: "telegram-notify",
|
|
186
|
+
version: 1,
|
|
187
|
+
prompt: "forbidden",
|
|
188
|
+
requiredParams: ["message"],
|
|
189
|
+
executors: ["telegram-notifier"],
|
|
190
|
+
},
|
|
160
191
|
"user-input": {
|
|
161
192
|
kind: "user-input",
|
|
162
193
|
version: 1,
|
|
163
194
|
prompt: "forbidden",
|
|
164
195
|
requiredParams: ["formId", "title", "fields", "outputFile"],
|
|
165
196
|
},
|
|
166
|
-
"
|
|
167
|
-
kind: "
|
|
197
|
+
"write-selection-file": {
|
|
198
|
+
kind: "write-selection-file",
|
|
168
199
|
version: 1,
|
|
169
200
|
prompt: "forbidden",
|
|
170
|
-
requiredParams: ["
|
|
171
|
-
executors: ["verify-build"],
|
|
201
|
+
requiredParams: ["outputFile", "reviewFindingsJsonFile", "selectionMode"],
|
|
172
202
|
},
|
|
173
203
|
};
|
|
174
204
|
export function createNodeRegistry() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toExecutorContext } from "../types.js";
|
|
2
|
-
const
|
|
2
|
+
const DEFAULT_CODEX_MODEL = "gpt-5.4-mini";
|
|
3
3
|
function truncateText(text, maxChars = 12000) {
|
|
4
4
|
return text.length <= maxChars ? text.trim() : text.trim().slice(-maxChars);
|
|
5
5
|
}
|
|
@@ -9,10 +9,10 @@ function fallbackBuildFailureSummary(output) {
|
|
|
9
9
|
.map((line) => line.trim())
|
|
10
10
|
.filter(Boolean);
|
|
11
11
|
const tail = lines.length > 0 ? lines.slice(-8) : ["No build output captured."];
|
|
12
|
-
return
|
|
12
|
+
return `Failed to get summary via Codex.\n\nLast log lines:\n${tail.join("\n")}`;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return env.
|
|
14
|
+
function codexModel(env) {
|
|
15
|
+
return env.CODEX_MODEL?.trim() || DEFAULT_CODEX_MODEL;
|
|
16
16
|
}
|
|
17
17
|
export const buildFailureSummaryNode = {
|
|
18
18
|
kind: "build-failure-summary",
|
|
@@ -25,34 +25,21 @@ export const buildFailureSummaryNode = {
|
|
|
25
25
|
},
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
const model = codexModel(context.env);
|
|
29
|
+
const prompt = "Below is the log from a failing build verification.\n" +
|
|
30
|
+
"Provide a brief summary in English, no fluff.\n" +
|
|
31
|
+
"Must highlight:\n" +
|
|
32
|
+
"1. Where exactly it failed.\n" +
|
|
33
|
+
"2. The main cause of the failure.\n" +
|
|
34
|
+
"3. What needs to be fixed next, if obvious.\n" +
|
|
35
|
+
"Respond with at most 5 short bullet points.\n\n" +
|
|
36
|
+
`Log:\n${truncateText(params.output)}`;
|
|
29
37
|
try {
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
catch {
|
|
33
|
-
return {
|
|
34
|
-
value: {
|
|
35
|
-
summaryText: fallbackBuildFailureSummary(params.output),
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
const model = claudeModel(context.env);
|
|
40
|
-
const prompt = "Ниже лог упавшей build verification.\n" +
|
|
41
|
-
"Сделай краткое резюме на русском языке, без воды.\n" +
|
|
42
|
-
"Нужно обязательно выделить:\n" +
|
|
43
|
-
"1. Где именно упало.\n" +
|
|
44
|
-
"2. Главную причину падения.\n" +
|
|
45
|
-
"3. Что нужно исправить дальше, если это очевидно.\n" +
|
|
46
|
-
"Ответ дай максимум 5 короткими пунктами.\n\n" +
|
|
47
|
-
`Лог:\n${truncateText(params.output)}`;
|
|
48
|
-
try {
|
|
49
|
-
const executor = context.executors.get("process");
|
|
38
|
+
const executor = context.executors.get("codex");
|
|
50
39
|
const result = await executor.execute(toExecutorContext(context), {
|
|
51
|
-
|
|
40
|
+
prompt,
|
|
41
|
+
model,
|
|
52
42
|
env: { ...context.env },
|
|
53
|
-
dryRun: false,
|
|
54
|
-
verbose: false,
|
|
55
|
-
label: `claude:${model}`,
|
|
56
43
|
}, executor.defaultConfig);
|
|
57
44
|
return {
|
|
58
45
|
value: {
|