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,446 @@
1
+ {
2
+ "kind": "auto-flow",
3
+ "version": 1,
4
+ "phases": [
5
+ {
6
+ "id": "plan",
7
+ "steps": [
8
+ {
9
+ "id": "fetch_jira",
10
+ "node": "jira-fetch",
11
+ "params": {
12
+ "jiraApiUrl": { "ref": "params.jiraApiUrl" },
13
+ "outputFile": {
14
+ "artifact": {
15
+ "kind": "jira-task-file",
16
+ "taskKey": { "ref": "params.taskKey" }
17
+ }
18
+ },
19
+ "attachmentsManifestFile": {
20
+ "artifact": {
21
+ "kind": "jira-attachments-manifest-file",
22
+ "taskKey": { "ref": "params.taskKey" }
23
+ }
24
+ },
25
+ "attachmentsContextFile": {
26
+ "artifact": {
27
+ "kind": "jira-attachments-context-file",
28
+ "taskKey": { "ref": "params.taskKey" }
29
+ }
30
+ }
31
+ },
32
+ "expect": [
33
+ {
34
+ "kind": "require-file",
35
+ "path": {
36
+ "artifact": {
37
+ "kind": "jira-task-file",
38
+ "taskKey": { "ref": "params.taskKey" }
39
+ }
40
+ },
41
+ "message": "Jira fetch node did not produce the Jira task file."
42
+ },
43
+ {
44
+ "kind": "require-file",
45
+ "path": {
46
+ "artifact": {
47
+ "kind": "jira-attachments-manifest-file",
48
+ "taskKey": { "ref": "params.taskKey" }
49
+ }
50
+ },
51
+ "message": "Jira fetch node did not produce the Jira attachments manifest file."
52
+ },
53
+ {
54
+ "kind": "require-file",
55
+ "path": {
56
+ "artifact": {
57
+ "kind": "jira-attachments-context-file",
58
+ "taskKey": { "ref": "params.taskKey" }
59
+ }
60
+ },
61
+ "message": "Jira fetch node did not produce the Jira attachments context file."
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "id": "generate_planning_questions",
67
+ "node": "llm-prompt",
68
+ "prompt": {
69
+ "templateRef": "plan-questions",
70
+ "vars": {
71
+ "jira_task_file": {
72
+ "artifact": {
73
+ "kind": "jira-task-file",
74
+ "taskKey": { "ref": "params.taskKey" }
75
+ }
76
+ },
77
+ "jira_attachments_manifest_file": {
78
+ "artifact": {
79
+ "kind": "jira-attachments-manifest-file",
80
+ "taskKey": { "ref": "params.taskKey" }
81
+ }
82
+ },
83
+ "jira_attachments_context_file": {
84
+ "artifact": {
85
+ "kind": "jira-attachments-context-file",
86
+ "taskKey": { "ref": "params.taskKey" }
87
+ }
88
+ },
89
+ "planning_questions_json_file": {
90
+ "artifact": {
91
+ "kind": "planning-questions-json-file",
92
+ "taskKey": { "ref": "params.taskKey" }
93
+ }
94
+ }
95
+ },
96
+ "extraPrompt": { "ref": "params.extraPrompt" },
97
+ "format": "task-prompt"
98
+ },
99
+ "params": {
100
+ "labelText": { "const": "Generating planning questions" },
101
+ "model": { "ref": "params.llmModel" },
102
+ "executor": { "ref": "params.llmExecutor" },
103
+ "requiredArtifacts": {
104
+ "list": [
105
+ {
106
+ "artifact": {
107
+ "kind": "planning-questions-json-file",
108
+ "taskKey": { "ref": "params.taskKey" }
109
+ }
110
+ }
111
+ ]
112
+ }
113
+ },
114
+ "expect": [
115
+ {
116
+ "kind": "require-artifacts",
117
+ "when": { "not": { "ref": "context.dryRun" } },
118
+ "paths": {
119
+ "list": [
120
+ {
121
+ "artifact": {
122
+ "kind": "planning-questions-json-file",
123
+ "taskKey": { "ref": "params.taskKey" }
124
+ }
125
+ }
126
+ ]
127
+ },
128
+ "message": "Planning questions step did not produce the questions artifact."
129
+ },
130
+ {
131
+ "kind": "require-structured-artifacts",
132
+ "when": { "not": { "ref": "context.dryRun" } },
133
+ "items": [
134
+ {
135
+ "path": {
136
+ "artifact": {
137
+ "kind": "planning-questions-json-file",
138
+ "taskKey": { "ref": "params.taskKey" }
139
+ }
140
+ },
141
+ "schemaId": "planning-questions/v1"
142
+ }
143
+ ],
144
+ "message": "Planning questions step produced invalid structured artifacts."
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "id": "build_planning_questions_form",
150
+ "node": "planning-questions-form",
151
+ "params": {
152
+ "planningQuestionsJsonFile": {
153
+ "artifact": {
154
+ "kind": "planning-questions-json-file",
155
+ "taskKey": { "ref": "params.taskKey" }
156
+ }
157
+ },
158
+ "formId": { "const": "planning-questions" },
159
+ "title": { "const": "Planning Questions" },
160
+ "description": {
161
+ "const": "Reply to model questions if they are needed for accurate design and plan. If there are no questions, the step will complete automatically."
162
+ }
163
+ }
164
+ },
165
+ {
166
+ "id": "notify_planning_questions",
167
+ "when": { "not": { "equals": [{ "ref": "steps.plan.build_planning_questions_form.value.questionCount" }, { "const": 0 }] } },
168
+ "node": "telegram-notify",
169
+ "params": {
170
+ "message": {
171
+ "template": "Planning questions generated for {taskKey}. Please review and answer if needed.",
172
+ "vars": {
173
+ "taskKey": { "ref": "params.taskKey" }
174
+ }
175
+ }
176
+ }
177
+ },
178
+ {
179
+ "id": "collect_planning_answers",
180
+ "node": "user-input",
181
+ "params": {
182
+ "formId": { "ref": "steps.plan.build_planning_questions_form.value.formId" },
183
+ "title": { "ref": "steps.plan.build_planning_questions_form.value.title" },
184
+ "description": { "ref": "steps.plan.build_planning_questions_form.value.description" },
185
+ "submitLabel": { "const": "Continue planning" },
186
+ "fields": { "ref": "steps.plan.build_planning_questions_form.value.fields" },
187
+ "outputFile": {
188
+ "artifact": {
189
+ "kind": "planning-answers-json-file",
190
+ "taskKey": { "ref": "params.taskKey" }
191
+ }
192
+ }
193
+ },
194
+ "expect": [
195
+ {
196
+ "kind": "require-structured-artifacts",
197
+ "items": [
198
+ {
199
+ "path": {
200
+ "artifact": {
201
+ "kind": "planning-answers-json-file",
202
+ "taskKey": { "ref": "params.taskKey" }
203
+ }
204
+ },
205
+ "schemaId": "user-input/v1"
206
+ }
207
+ ],
208
+ "message": "Planning answers input is missing or invalid."
209
+ }
210
+ ]
211
+ },
212
+ {
213
+ "id": "run_plan",
214
+ "node": "llm-prompt",
215
+ "prompt": {
216
+ "templateRef": "plan",
217
+ "vars": {
218
+ "jira_task_file": {
219
+ "artifact": {
220
+ "kind": "jira-task-file",
221
+ "taskKey": { "ref": "params.taskKey" }
222
+ }
223
+ },
224
+ "jira_attachments_manifest_file": {
225
+ "artifact": {
226
+ "kind": "jira-attachments-manifest-file",
227
+ "taskKey": { "ref": "params.taskKey" }
228
+ }
229
+ },
230
+ "jira_attachments_context_file": {
231
+ "artifact": {
232
+ "kind": "jira-attachments-context-file",
233
+ "taskKey": { "ref": "params.taskKey" }
234
+ }
235
+ },
236
+ "design_file": {
237
+ "artifact": {
238
+ "kind": "design-file",
239
+ "taskKey": { "ref": "params.taskKey" },
240
+ "iteration": { "ref": "params.designIteration" }
241
+ }
242
+ },
243
+ "design_json_file": {
244
+ "artifact": {
245
+ "kind": "design-json-file",
246
+ "taskKey": { "ref": "params.taskKey" },
247
+ "iteration": { "ref": "params.designIteration" }
248
+ }
249
+ },
250
+ "plan_file": {
251
+ "artifact": {
252
+ "kind": "plan-file",
253
+ "taskKey": { "ref": "params.taskKey" },
254
+ "iteration": { "ref": "params.planIteration" }
255
+ }
256
+ },
257
+ "plan_json_file": {
258
+ "artifact": {
259
+ "kind": "plan-json-file",
260
+ "taskKey": { "ref": "params.taskKey" },
261
+ "iteration": { "ref": "params.planIteration" }
262
+ }
263
+ },
264
+ "qa_file": {
265
+ "artifact": {
266
+ "kind": "qa-file",
267
+ "taskKey": { "ref": "params.taskKey" },
268
+ "iteration": { "ref": "params.qaIteration" }
269
+ }
270
+ },
271
+ "qa_json_file": {
272
+ "artifact": {
273
+ "kind": "qa-json-file",
274
+ "taskKey": { "ref": "params.taskKey" },
275
+ "iteration": { "ref": "params.qaIteration" }
276
+ }
277
+ }
278
+ },
279
+ "extraPrompt": {
280
+ "appendPrompt": {
281
+ "base": { "ref": "params.extraPrompt" },
282
+ "suffix": { "ref": "steps.plan.collect_planning_answers.value.promptSuffix" }
283
+ }
284
+ },
285
+ "format": "task-prompt"
286
+ },
287
+ "params": {
288
+ "labelText": { "const": "Running planning mode" },
289
+ "model": { "ref": "params.llmModel" },
290
+ "executor": { "ref": "params.llmExecutor" }
291
+ },
292
+ "expect": [
293
+ {
294
+ "kind": "require-artifacts",
295
+ "when": { "not": { "ref": "context.dryRun" } },
296
+ "paths": {
297
+ "artifactList": {
298
+ "kind": "plan-artifacts",
299
+ "taskKey": { "ref": "params.taskKey" }
300
+ }
301
+ },
302
+ "message": "Plan mode did not produce the required artifacts."
303
+ },
304
+ {
305
+ "kind": "require-structured-artifacts",
306
+ "when": { "not": { "ref": "context.dryRun" } },
307
+ "items": [
308
+ {
309
+ "path": {
310
+ "artifact": {
311
+ "kind": "design-json-file",
312
+ "taskKey": { "ref": "params.taskKey" },
313
+ "iteration": { "ref": "params.designIteration" }
314
+ }
315
+ },
316
+ "schemaId": "implementation-design/v1"
317
+ },
318
+ {
319
+ "path": {
320
+ "artifact": {
321
+ "kind": "plan-json-file",
322
+ "taskKey": { "ref": "params.taskKey" },
323
+ "iteration": { "ref": "params.planIteration" }
324
+ }
325
+ },
326
+ "schemaId": "implementation-plan/v1"
327
+ },
328
+ {
329
+ "path": {
330
+ "artifact": {
331
+ "kind": "qa-json-file",
332
+ "taskKey": { "ref": "params.taskKey" },
333
+ "iteration": { "ref": "params.qaIteration" }
334
+ }
335
+ },
336
+ "schemaId": "qa-plan/v1"
337
+ }
338
+ ],
339
+ "message": "Plan mode produced invalid structured artifacts."
340
+ }
341
+ ]
342
+ },
343
+ {
344
+ "id": "notify_plan_complete",
345
+ "node": "telegram-notify",
346
+ "params": {
347
+ "message": {
348
+ "template": "Plan phase for {taskKey} complete.",
349
+ "vars": {
350
+ "taskKey": { "ref": "params.taskKey" }
351
+ }
352
+ }
353
+ }
354
+ }
355
+ ]
356
+ },
357
+ {
358
+ "id": "implement",
359
+ "steps": [
360
+ {
361
+ "id": "run_implement",
362
+ "node": "llm-prompt",
363
+ "prompt": {
364
+ "templateRef": "implement",
365
+ "vars": {
366
+ "design_file": {
367
+ "artifact": {
368
+ "kind": "design-file",
369
+ "taskKey": { "ref": "params.taskKey" }
370
+ }
371
+ },
372
+ "design_json_file": {
373
+ "artifact": {
374
+ "kind": "design-json-file",
375
+ "taskKey": { "ref": "params.taskKey" }
376
+ }
377
+ },
378
+ "plan_file": {
379
+ "artifact": {
380
+ "kind": "plan-file",
381
+ "taskKey": { "ref": "params.taskKey" }
382
+ }
383
+ },
384
+ "plan_json_file": {
385
+ "artifact": {
386
+ "kind": "plan-json-file",
387
+ "taskKey": { "ref": "params.taskKey" }
388
+ }
389
+ }
390
+ },
391
+ "extraPrompt": { "ref": "params.extraPrompt" },
392
+ "format": "task-prompt"
393
+ },
394
+ "params": {
395
+ "labelText": { "const": "Running implementation mode locally" },
396
+ "model": { "ref": "params.llmModel" },
397
+ "executor": { "ref": "params.llmExecutor" }
398
+ }
399
+ },
400
+ {
401
+ "id": "notify_implement_complete",
402
+ "node": "telegram-notify",
403
+ "params": {
404
+ "message": {
405
+ "template": "Implementation phase for {taskKey} complete.",
406
+ "vars": {
407
+ "taskKey": { "ref": "params.taskKey" }
408
+ }
409
+ }
410
+ }
411
+ }
412
+ ]
413
+ },
414
+ {
415
+ "id": "review-loop",
416
+ "steps": [
417
+ {
418
+ "id": "run_review_loop",
419
+ "node": "flow-run",
420
+ "params": {
421
+ "fileName": { "const": "review-loop.json" },
422
+ "labelText": { "const": "Running review-loop" },
423
+ "taskKey": { "ref": "params.taskKey" },
424
+ "workspaceDir": { "ref": "params.workspaceDir" },
425
+ "extraPrompt": { "ref": "params.extraPrompt" },
426
+ "reviewFixPoints": { "ref": "params.reviewFixPoints" },
427
+ "llmExecutor": { "ref": "params.llmExecutor" },
428
+ "llmModel": { "ref": "params.llmModel" }
429
+ }
430
+ },
431
+ {
432
+ "id": "notify_task_complete",
433
+ "node": "telegram-notify",
434
+ "params": {
435
+ "message": {
436
+ "template": "Task {taskKey} complete.",
437
+ "vars": {
438
+ "taskKey": { "ref": "params.taskKey" }
439
+ }
440
+ }
441
+ }
442
+ }
443
+ ]
444
+ }
445
+ ]
446
+ }