agentweaver 0.1.8 → 0.1.10

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 (55) hide show
  1. package/README.md +71 -25
  2. package/dist/artifacts.js +25 -1
  3. package/dist/errors.js +7 -0
  4. package/dist/executors/configs/fetch-gitlab-diff-config.js +3 -0
  5. package/dist/executors/configs/opencode-config.js +6 -0
  6. package/dist/executors/fetch-gitlab-diff-executor.js +26 -0
  7. package/dist/executors/jira-fetch-executor.js +8 -2
  8. package/dist/executors/opencode-executor.js +35 -0
  9. package/dist/gitlab.js +199 -5
  10. package/dist/index.js +215 -144
  11. package/dist/interactive-ui.js +363 -37
  12. package/dist/jira.js +116 -14
  13. package/dist/pipeline/auto-flow.js +1 -1
  14. package/dist/pipeline/declarative-flows.js +44 -6
  15. package/dist/pipeline/flow-catalog.js +73 -0
  16. package/dist/pipeline/flow-specs/auto.json +183 -1
  17. package/dist/pipeline/flow-specs/gitlab-diff-review.json +226 -0
  18. package/dist/pipeline/flow-specs/gitlab-review.json +1 -31
  19. package/dist/pipeline/flow-specs/opencode/auto-opencode.json +1365 -0
  20. package/dist/pipeline/flow-specs/opencode/bugz/bug-analyze-opencode.json +382 -0
  21. package/dist/pipeline/flow-specs/opencode/bugz/bug-fix-opencode.json +56 -0
  22. package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-diff-review-opencode.json +308 -0
  23. package/dist/pipeline/flow-specs/opencode/gitlab/gitlab-review-opencode.json +437 -0
  24. package/dist/pipeline/flow-specs/opencode/gitlab/mr-description-opencode.json +117 -0
  25. package/dist/pipeline/flow-specs/opencode/go/run-go-linter-loop-opencode.json +321 -0
  26. package/dist/pipeline/flow-specs/opencode/go/run-go-tests-loop-opencode.json +321 -0
  27. package/dist/pipeline/flow-specs/opencode/implement-opencode.json +64 -0
  28. package/dist/pipeline/flow-specs/opencode/plan-opencode.json +603 -0
  29. package/dist/pipeline/flow-specs/opencode/review/review-fix-opencode.json +209 -0
  30. package/dist/pipeline/flow-specs/opencode/review/review-opencode.json +452 -0
  31. package/dist/pipeline/flow-specs/opencode/task-describe-opencode.json +148 -0
  32. package/dist/pipeline/flow-specs/plan.json +183 -1
  33. package/dist/pipeline/node-registry.js +80 -8
  34. package/dist/pipeline/nodes/fetch-gitlab-diff-node.js +34 -0
  35. package/dist/pipeline/nodes/flow-run-node.js +2 -2
  36. package/dist/pipeline/nodes/jira-fetch-node.js +26 -2
  37. package/dist/pipeline/nodes/opencode-prompt-node.js +32 -0
  38. package/dist/pipeline/nodes/planning-questions-form-node.js +69 -0
  39. package/dist/pipeline/nodes/user-input-node.js +9 -1
  40. package/dist/pipeline/prompt-registry.js +3 -1
  41. package/dist/pipeline/registry.js +10 -0
  42. package/dist/pipeline/spec-loader.js +48 -3
  43. package/dist/pipeline/spec-types.js +43 -1
  44. package/dist/pipeline/spec-validator.js +53 -7
  45. package/dist/pipeline/value-resolver.js +15 -1
  46. package/dist/prompts.js +47 -12
  47. package/dist/runtime/process-runner.js +45 -1
  48. package/dist/scope.js +24 -32
  49. package/dist/structured-artifact-schemas.json +154 -1
  50. package/dist/structured-artifacts.js +2 -0
  51. package/dist/user-input.js +7 -0
  52. package/package.json +1 -1
  53. package/dist/pipeline/flow-specs/preflight.json +0 -206
  54. package/dist/pipeline/flow-specs/run-linter-loop.json +0 -155
  55. package/dist/pipeline/flow-specs/run-tests-loop.json +0 -155
@@ -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
- }