agentweaver 0.1.14 → 0.1.16

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 (100) hide show
  1. package/README.md +29 -7
  2. package/dist/artifact-manifest.js +219 -0
  3. package/dist/artifacts.js +21 -1
  4. package/dist/doctor/checks/cwd-context.js +4 -3
  5. package/dist/doctor/checks/env-diagnostics.js +193 -71
  6. package/dist/doctor/checks/flow-readiness.js +212 -203
  7. package/dist/doctor/index.js +1 -1
  8. package/dist/doctor/orchestrator.js +18 -7
  9. package/dist/doctor/runner.js +9 -8
  10. package/dist/doctor/types.js +12 -0
  11. package/dist/flow-state.js +75 -15
  12. package/dist/index.js +499 -199
  13. package/dist/interactive/blessed-session.js +361 -0
  14. package/dist/interactive/controller.js +1293 -0
  15. package/dist/interactive/create-interactive-session.js +5 -0
  16. package/dist/interactive/ink/index.js +576 -0
  17. package/dist/interactive/progress.js +245 -0
  18. package/dist/interactive/selectors.js +14 -0
  19. package/dist/interactive/session.js +1 -0
  20. package/dist/interactive/state.js +34 -0
  21. package/dist/interactive/tree.js +155 -0
  22. package/dist/interactive/types.js +1 -0
  23. package/dist/interactive/view-model.js +1 -0
  24. package/dist/interactive-ui.js +159 -194
  25. package/dist/pipeline/context.js +1 -0
  26. package/dist/pipeline/declarative-flow-runner.js +212 -6
  27. package/dist/pipeline/declarative-flows.js +27 -0
  28. package/dist/pipeline/execution-routing-config.js +15 -0
  29. package/dist/pipeline/flow-catalog.js +23 -3
  30. package/dist/pipeline/flow-run-resume.js +29 -0
  31. package/dist/pipeline/flow-specs/auto-common.json +89 -360
  32. package/dist/pipeline/flow-specs/auto-golang.json +58 -363
  33. package/dist/pipeline/flow-specs/auto-simple.json +141 -0
  34. package/dist/pipeline/flow-specs/bugz/bug-analyze.json +2 -0
  35. package/dist/pipeline/flow-specs/bugz/bug-fix.json +1 -0
  36. package/dist/pipeline/flow-specs/design-review/design-review-loop.json +304 -0
  37. package/dist/pipeline/flow-specs/design-review.json +249 -0
  38. package/dist/pipeline/flow-specs/gitlab/gitlab-diff-review.json +11 -0
  39. package/dist/pipeline/flow-specs/gitlab/gitlab-review.json +2 -0
  40. package/dist/pipeline/flow-specs/gitlab/mr-description.json +1 -0
  41. package/dist/pipeline/flow-specs/go/run-go-linter-loop.json +2 -0
  42. package/dist/pipeline/flow-specs/go/run-go-tests-loop.json +2 -0
  43. package/dist/pipeline/flow-specs/implement.json +24 -5
  44. package/dist/pipeline/flow-specs/instant-task.json +177 -0
  45. package/dist/pipeline/flow-specs/normalize-task-source.json +311 -0
  46. package/dist/pipeline/flow-specs/plan-revise.json +267 -0
  47. package/dist/pipeline/flow-specs/plan.json +48 -70
  48. package/dist/pipeline/flow-specs/review/review-fix.json +24 -4
  49. package/dist/pipeline/flow-specs/review/review-loop.json +351 -45
  50. package/dist/pipeline/flow-specs/review/review-project-loop.json +590 -0
  51. package/dist/pipeline/flow-specs/review/review-project.json +12 -0
  52. package/dist/pipeline/flow-specs/review/review.json +37 -31
  53. package/dist/pipeline/flow-specs/task-describe.json +62 -2
  54. package/dist/pipeline/flow-specs/task-source/jira-fetch.json +70 -0
  55. package/dist/pipeline/flow-specs/task-source/manual-input.json +216 -0
  56. package/dist/pipeline/node-registry.js +49 -1
  57. package/dist/pipeline/node-runner.js +3 -2
  58. package/dist/pipeline/nodes/build-review-fix-prompt-node.js +5 -1
  59. package/dist/pipeline/nodes/clear-ready-to-merge-node.js +11 -0
  60. package/dist/pipeline/nodes/commit-message-form-node.js +8 -0
  61. package/dist/pipeline/nodes/design-review-verdict-node.js +36 -0
  62. package/dist/pipeline/nodes/ensure-summary-json-node.js +70 -0
  63. package/dist/pipeline/nodes/fetch-gitlab-diff-node.js +19 -2
  64. package/dist/pipeline/nodes/fetch-gitlab-review-node.js +19 -2
  65. package/dist/pipeline/nodes/flow-run-node.js +226 -7
  66. package/dist/pipeline/nodes/git-commit-form-node.js +8 -0
  67. package/dist/pipeline/nodes/gitlab-review-artifacts-node.js +19 -2
  68. package/dist/pipeline/nodes/jira-fetch-node.js +50 -4
  69. package/dist/pipeline/nodes/llm-prompt-node.js +32 -12
  70. package/dist/pipeline/nodes/planning-bundle-node.js +10 -0
  71. package/dist/pipeline/nodes/review-verdict-node.js +86 -0
  72. package/dist/pipeline/nodes/select-files-form-node.js +8 -0
  73. package/dist/pipeline/nodes/structured-summary-node.js +24 -0
  74. package/dist/pipeline/nodes/user-input-node.js +38 -3
  75. package/dist/pipeline/nodes/write-selection-file-node.js +20 -4
  76. package/dist/pipeline/prompt-registry.js +5 -1
  77. package/dist/pipeline/prompt-runtime.js +4 -1
  78. package/dist/pipeline/review-iteration.js +26 -0
  79. package/dist/pipeline/spec-compiler.js +2 -0
  80. package/dist/pipeline/spec-types.js +5 -0
  81. package/dist/pipeline/spec-validator.js +14 -0
  82. package/dist/pipeline/value-resolver.js +84 -1
  83. package/dist/prompts.js +82 -13
  84. package/dist/review-severity.js +45 -0
  85. package/dist/runtime/artifact-registry.js +402 -0
  86. package/dist/runtime/design-review-input-contract.js +113 -0
  87. package/dist/runtime/env-loader.js +3 -0
  88. package/dist/runtime/execution-routing-store.js +134 -0
  89. package/dist/runtime/execution-routing.js +227 -0
  90. package/dist/runtime/interactive-execution-routing.js +462 -0
  91. package/dist/runtime/plan-revise-input-contract.js +147 -0
  92. package/dist/runtime/planning-bundle.js +123 -0
  93. package/dist/runtime/ready-to-merge.js +31 -0
  94. package/dist/runtime/review-input-contract.js +100 -0
  95. package/dist/scope.js +11 -2
  96. package/dist/structured-artifact-schema-registry.js +10 -0
  97. package/dist/structured-artifact-schemas.json +257 -1
  98. package/dist/structured-artifacts.js +83 -6
  99. package/dist/user-input.js +70 -3
  100. package/package.json +6 -3
@@ -9,39 +9,17 @@
9
9
  {
10
10
  "id": "run_review",
11
11
  "node": "llm-prompt",
12
+ "routingGroup": "review",
12
13
  "prompt": {
13
14
  "templateRef": "review",
14
15
  "vars": {
15
- "jira_task_file": {
16
- "artifact": {
17
- "kind": "jira-task-file",
18
- "taskKey": { "ref": "params.taskKey" }
19
- }
20
- },
21
- "design_file": {
22
- "artifact": {
23
- "kind": "design-file",
24
- "taskKey": { "ref": "params.taskKey" }
25
- }
26
- },
27
- "design_json_file": {
28
- "artifact": {
29
- "kind": "design-json-file",
30
- "taskKey": { "ref": "params.taskKey" }
31
- }
32
- },
33
- "plan_file": {
34
- "artifact": {
35
- "kind": "plan-file",
36
- "taskKey": { "ref": "params.taskKey" }
37
- }
38
- },
39
- "plan_json_file": {
40
- "artifact": {
41
- "kind": "plan-json-file",
42
- "taskKey": { "ref": "params.taskKey" }
43
- }
44
- },
16
+ "task_context_json_file": { "ref": "params.taskContextJsonFile" },
17
+ "jira_task_file": { "ref": "params.jiraTaskFile" },
18
+ "task_input_json_file": { "ref": "params.taskInputJsonFile" },
19
+ "design_file": { "ref": "params.designFile" },
20
+ "design_json_file": { "ref": "params.designJsonFile" },
21
+ "plan_file": { "ref": "params.planFile" },
22
+ "plan_json_file": { "ref": "params.planJsonFile" },
45
23
  "review_file": {
46
24
  "artifact": {
47
25
  "kind": "review-file",
@@ -68,7 +46,25 @@
68
46
  }
69
47
  },
70
48
  "model": { "ref": "params.llmModel" },
71
- "executor": { "ref": "params.llmExecutor" }
49
+ "executor": { "ref": "params.llmExecutor" },
50
+ "requiredArtifacts": {
51
+ "list": [
52
+ {
53
+ "artifact": {
54
+ "kind": "review-file",
55
+ "taskKey": { "ref": "params.taskKey" },
56
+ "iteration": { "ref": "params.iteration" }
57
+ }
58
+ },
59
+ {
60
+ "artifact": {
61
+ "kind": "review-json-file",
62
+ "taskKey": { "ref": "params.taskKey" },
63
+ "iteration": { "ref": "params.iteration" }
64
+ }
65
+ }
66
+ ]
67
+ }
72
68
  },
73
69
  "expect": [
74
70
  {
@@ -106,6 +102,16 @@
106
102
  }
107
103
  ]
108
104
  },
105
+ {
106
+ "id": "review_verdict",
107
+ "node": "review-verdict",
108
+ "when": { "not": { "ref": "context.dryRun" } },
109
+ "params": {
110
+ "taskKey": { "ref": "params.taskKey" },
111
+ "iteration": { "ref": "params.iteration" },
112
+ "blockingSeverities": { "ref": "params.reviewBlockingSeverities" }
113
+ }
114
+ },
109
115
  {
110
116
  "id": "check_ready_to_merge",
111
117
  "node": "file-check",
@@ -153,6 +153,7 @@
153
153
  {
154
154
  "id": "run_task_describe_from_jira",
155
155
  "node": "llm-prompt",
156
+ "routingGroup": "planning",
156
157
  "when": {
157
158
  "ref": "steps.task_describe.collect_task_source.value.values.jira_ref"
158
159
  },
@@ -235,10 +236,37 @@
235
236
  }
236
237
  },
237
238
  "message": "Task describe mode did not produce the Jira description artifact."
239
+ }
240
+ ]
241
+ },
242
+ {
243
+ "id": "ensure_task_describe_json_from_jira_markdown",
244
+ "node": "ensure-summary-json",
245
+ "when": {
246
+ "all": [
247
+ { "ref": "steps.task_describe.collect_task_source.value.values.jira_ref" },
248
+ { "not": { "ref": "context.dryRun" } }
249
+ ]
250
+ },
251
+ "params": {
252
+ "markdownFile": {
253
+ "artifact": {
254
+ "kind": "jira-description-file",
255
+ "taskKey": { "ref": "params.taskKey" },
256
+ "iteration": { "ref": "params.iteration" }
257
+ }
238
258
  },
259
+ "outputFile": {
260
+ "artifact": {
261
+ "kind": "jira-description-json-file",
262
+ "taskKey": { "ref": "params.taskKey" },
263
+ "iteration": { "ref": "params.iteration" }
264
+ }
265
+ }
266
+ },
267
+ "expect": [
239
268
  {
240
269
  "kind": "require-structured-artifacts",
241
- "when": { "not": { "ref": "context.dryRun" } },
242
270
  "items": [
243
271
  {
244
272
  "path": {
@@ -258,6 +286,7 @@
258
286
  {
259
287
  "id": "run_task_describe_from_input",
260
288
  "node": "llm-prompt",
289
+ "routingGroup": "planning",
261
290
  "when": {
262
291
  "not": {
263
292
  "ref": "steps.task_describe.collect_task_source.value.values.jira_ref"
@@ -330,10 +359,41 @@
330
359
  }
331
360
  },
332
361
  "message": "Task describe mode did not produce the Jira description artifact."
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "id": "ensure_task_describe_json_from_input_markdown",
367
+ "node": "ensure-summary-json",
368
+ "when": {
369
+ "all": [
370
+ {
371
+ "not": {
372
+ "ref": "steps.task_describe.collect_task_source.value.values.jira_ref"
373
+ }
374
+ },
375
+ { "not": { "ref": "context.dryRun" } }
376
+ ]
377
+ },
378
+ "params": {
379
+ "markdownFile": {
380
+ "artifact": {
381
+ "kind": "jira-description-file",
382
+ "taskKey": { "ref": "params.taskKey" },
383
+ "iteration": { "ref": "params.iteration" }
384
+ }
333
385
  },
386
+ "outputFile": {
387
+ "artifact": {
388
+ "kind": "jira-description-json-file",
389
+ "taskKey": { "ref": "params.taskKey" },
390
+ "iteration": { "ref": "params.iteration" }
391
+ }
392
+ }
393
+ },
394
+ "expect": [
334
395
  {
335
396
  "kind": "require-structured-artifacts",
336
- "when": { "not": { "ref": "context.dryRun" } },
337
397
  "items": [
338
398
  {
339
399
  "path": {
@@ -0,0 +1,70 @@
1
+ {
2
+ "kind": "task-source-jira-flow",
3
+ "version": 1,
4
+ "description": "Fetches raw Jira task context and attachments into scope artifacts for subsequent normalization.",
5
+ "catalogVisibility": "hidden",
6
+ "phases": [
7
+ {
8
+ "id": "source",
9
+ "steps": [
10
+ {
11
+ "id": "fetch_jira",
12
+ "node": "jira-fetch",
13
+ "params": {
14
+ "jiraApiUrl": { "ref": "params.jiraApiUrl" },
15
+ "outputFile": {
16
+ "artifact": {
17
+ "kind": "jira-task-file",
18
+ "taskKey": { "ref": "params.taskKey" }
19
+ }
20
+ },
21
+ "attachmentsManifestFile": {
22
+ "artifact": {
23
+ "kind": "jira-attachments-manifest-file",
24
+ "taskKey": { "ref": "params.taskKey" }
25
+ }
26
+ },
27
+ "attachmentsContextFile": {
28
+ "artifact": {
29
+ "kind": "jira-attachments-context-file",
30
+ "taskKey": { "ref": "params.taskKey" }
31
+ }
32
+ }
33
+ },
34
+ "expect": [
35
+ {
36
+ "kind": "require-file",
37
+ "path": {
38
+ "artifact": {
39
+ "kind": "jira-task-file",
40
+ "taskKey": { "ref": "params.taskKey" }
41
+ }
42
+ },
43
+ "message": "Jira fetch node did not produce the Jira task file."
44
+ },
45
+ {
46
+ "kind": "require-file",
47
+ "path": {
48
+ "artifact": {
49
+ "kind": "jira-attachments-manifest-file",
50
+ "taskKey": { "ref": "params.taskKey" }
51
+ }
52
+ },
53
+ "message": "Jira fetch node did not produce the Jira attachments manifest file."
54
+ },
55
+ {
56
+ "kind": "require-file",
57
+ "path": {
58
+ "artifact": {
59
+ "kind": "jira-attachments-context-file",
60
+ "taskKey": { "ref": "params.taskKey" }
61
+ }
62
+ },
63
+ "message": "Jira fetch node did not produce the Jira attachments context file."
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ }
@@ -0,0 +1,216 @@
1
+ {
2
+ "kind": "task-source-manual-flow",
3
+ "version": 1,
4
+ "description": "Collects manual task input in the current project scope for subsequent normalization and planning. Stored input is reused on reruns and can be edited on interactive restart.",
5
+ "catalogVisibility": "hidden",
6
+ "phases": [
7
+ {
8
+ "id": "source",
9
+ "steps": [
10
+ {
11
+ "id": "edit_task_source",
12
+ "when": {
13
+ "all": [
14
+ {
15
+ "ref": "params.repromptInstantTaskInput"
16
+ },
17
+ {
18
+ "exists": {
19
+ "artifact": {
20
+ "kind": "instant-task-input-json-file",
21
+ "taskKey": { "ref": "params.taskKey" }
22
+ }
23
+ }
24
+ }
25
+ ]
26
+ },
27
+ "node": "user-input",
28
+ "params": {
29
+ "formId": { "const": "instant-task-input" },
30
+ "title": { "const": "Instant Task Input" },
31
+ "description": {
32
+ "const": "Review and edit the saved instant-task request for this branch-derived lineage before restarting planning."
33
+ },
34
+ "submitLabel": { "const": "Restart planning" },
35
+ "fields": {
36
+ "list": [
37
+ {
38
+ "const": {
39
+ "id": "task_description",
40
+ "type": "text",
41
+ "label": "Task description",
42
+ "help": "Update the requested work for this restart. Leave the field empty to keep the current value.",
43
+ "required": true,
44
+ "multiline": true,
45
+ "rows": 5,
46
+ "placeholder": "e.g. add an instant-task command that runs planning, implementation, and review without Jira"
47
+ }
48
+ },
49
+ {
50
+ "const": {
51
+ "id": "additional_instructions",
52
+ "type": "text",
53
+ "label": "Additional instructions",
54
+ "help": "Update optional constraints, references, or implementation notes for this restart.",
55
+ "required": false,
56
+ "multiline": true,
57
+ "rows": 4,
58
+ "placeholder": "e.g. keep the existing Jira-backed flows unchanged, add tests for review routing"
59
+ }
60
+ }
61
+ ]
62
+ },
63
+ "initialValues": { "ref": "params.prefilledInstantTaskInputValues" },
64
+ "outputFile": {
65
+ "artifact": {
66
+ "kind": "instant-task-input-json-file",
67
+ "taskKey": { "ref": "params.taskKey" }
68
+ }
69
+ }
70
+ },
71
+ "expect": [
72
+ {
73
+ "kind": "require-structured-artifacts",
74
+ "items": [
75
+ {
76
+ "path": {
77
+ "artifact": {
78
+ "kind": "instant-task-input-json-file",
79
+ "taskKey": { "ref": "params.taskKey" }
80
+ }
81
+ },
82
+ "schemaId": "user-input/v1"
83
+ }
84
+ ],
85
+ "message": "Instant-task source input is missing or invalid."
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "id": "collect_task_source",
91
+ "when": {
92
+ "not": {
93
+ "exists": {
94
+ "artifact": {
95
+ "kind": "instant-task-input-json-file",
96
+ "taskKey": { "ref": "params.taskKey" }
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "node": "user-input",
102
+ "params": {
103
+ "formId": { "const": "instant-task-input" },
104
+ "title": { "const": "Instant Task Input" },
105
+ "description": {
106
+ "const": "Describe the task for this branch-derived lineage. The saved task input will be reused on reruns unless you choose interactive restart and edit it."
107
+ },
108
+ "submitLabel": { "const": "Start planning" },
109
+ "fields": {
110
+ "list": [
111
+ {
112
+ "const": {
113
+ "id": "task_description",
114
+ "type": "text",
115
+ "label": "Task description",
116
+ "help": "Describe the requested work. This text becomes the source-of-truth input for the instant-task lineage.",
117
+ "required": true,
118
+ "multiline": true,
119
+ "rows": 5,
120
+ "placeholder": "e.g. add an instant-task command that runs planning, implementation, and review without Jira"
121
+ }
122
+ },
123
+ {
124
+ "const": {
125
+ "id": "additional_instructions",
126
+ "type": "text",
127
+ "label": "Additional instructions",
128
+ "help": "Optional extra constraints, references, or implementation notes for the same task lineage.",
129
+ "required": false,
130
+ "multiline": true,
131
+ "rows": 4,
132
+ "placeholder": "e.g. keep the existing Jira-backed flows unchanged, add tests for review routing"
133
+ }
134
+ }
135
+ ]
136
+ },
137
+ "outputFile": {
138
+ "artifact": {
139
+ "kind": "instant-task-input-json-file",
140
+ "taskKey": { "ref": "params.taskKey" }
141
+ }
142
+ }
143
+ },
144
+ "expect": [
145
+ {
146
+ "kind": "require-structured-artifacts",
147
+ "items": [
148
+ {
149
+ "path": {
150
+ "artifact": {
151
+ "kind": "instant-task-input-json-file",
152
+ "taskKey": { "ref": "params.taskKey" }
153
+ }
154
+ },
155
+ "schemaId": "user-input/v1"
156
+ }
157
+ ],
158
+ "message": "Instant-task source input is missing or invalid."
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ "id": "validate_task_source_artifact",
164
+ "when": {
165
+ "all": [
166
+ {
167
+ "not": {
168
+ "ref": "params.repromptInstantTaskInput"
169
+ }
170
+ },
171
+ {
172
+ "exists": {
173
+ "artifact": {
174
+ "kind": "instant-task-input-json-file",
175
+ "taskKey": { "ref": "params.taskKey" }
176
+ }
177
+ }
178
+ }
179
+ ]
180
+ },
181
+ "node": "file-check",
182
+ "params": {
183
+ "path": {
184
+ "artifact": {
185
+ "kind": "instant-task-input-json-file",
186
+ "taskKey": { "ref": "params.taskKey" }
187
+ }
188
+ },
189
+ "panelTitle": { "const": "Instant Task Source Artifact" },
190
+ "foundMessage": {
191
+ "const": "Validated the saved instant-task source artifact before continuing planning."
192
+ },
193
+ "tone": { "const": "cyan" }
194
+ },
195
+ "expect": [
196
+ {
197
+ "kind": "require-structured-artifacts",
198
+ "items": [
199
+ {
200
+ "path": {
201
+ "artifact": {
202
+ "kind": "instant-task-input-json-file",
203
+ "taskKey": { "ref": "params.taskKey" }
204
+ }
205
+ },
206
+ "schemaId": "user-input/v1"
207
+ }
208
+ ],
209
+ "message": "Instant-task source input is missing or invalid."
210
+ }
211
+ ]
212
+ }
213
+ ]
214
+ }
215
+ ]
216
+ }
@@ -1,8 +1,11 @@
1
1
  import { buildFailureSummaryNode } from "./nodes/build-failure-summary-node.js";
2
2
  import { buildReviewFixPromptNode } from "./nodes/build-review-fix-prompt-node.js";
3
+ import { clearReadyToMergeNode } from "./nodes/clear-ready-to-merge-node.js";
3
4
  import { codexPromptNode } from "./nodes/codex-prompt-node.js";
4
5
  import { commandCheckNode } from "./nodes/command-check-node.js";
5
6
  import { commitMessageFormNode } from "./nodes/commit-message-form-node.js";
7
+ import { designReviewVerdictNode } from "./nodes/design-review-verdict-node.js";
8
+ import { ensureSummaryJsonNode } from "./nodes/ensure-summary-json-node.js";
6
9
  import { fetchGitLabDiffNode } from "./nodes/fetch-gitlab-diff-node.js";
7
10
  import { fetchGitLabReviewNode } from "./nodes/fetch-gitlab-review-node.js";
8
11
  import { fileCheckNode } from "./nodes/file-check-node.js";
@@ -18,10 +21,13 @@ import { localScriptCheckNode } from "./nodes/local-script-check-node.js";
18
21
  import { llmPromptNode } from "./nodes/llm-prompt-node.js";
19
22
  import { opencodePromptNode } from "./nodes/opencode-prompt-node.js";
20
23
  import { planCodexNode } from "./nodes/plan-codex-node.js";
24
+ import { planningBundleNode } from "./nodes/planning-bundle-node.js";
21
25
  import { planningQuestionsFormNode } from "./nodes/planning-questions-form-node.js";
22
26
  import { readFileNode } from "./nodes/read-file-node.js";
23
27
  import { reviewFindingsFormNode } from "./nodes/review-findings-form-node.js";
28
+ import { reviewVerdictNode } from "./nodes/review-verdict-node.js";
24
29
  import { selectFilesFormNode } from "./nodes/select-files-form-node.js";
30
+ import { structuredSummaryNode } from "./nodes/structured-summary-node.js";
25
31
  import { summaryFileLoadNode } from "./nodes/summary-file-load-node.js";
26
32
  import { telegramNotifierNode } from "./nodes/telegram-notifier-node.js";
27
33
  import { userInputNode } from "./nodes/user-input-node.js";
@@ -29,9 +35,12 @@ import { writeSelectionFileNode } from "./nodes/write-selection-file-node.js";
29
35
  const builtInNodes = {
30
36
  "build-failure-summary": buildFailureSummaryNode,
31
37
  "build-review-fix-prompt": buildReviewFixPromptNode,
38
+ "clear-ready-to-merge": clearReadyToMergeNode,
32
39
  "codex-prompt": codexPromptNode,
33
40
  "command-check": commandCheckNode,
34
41
  "commit-message-form": commitMessageFormNode,
42
+ "design-review-verdict": designReviewVerdictNode,
43
+ "ensure-summary-json": ensureSummaryJsonNode,
35
44
  "fetch-gitlab-diff": fetchGitLabDiffNode,
36
45
  "fetch-gitlab-review": fetchGitLabReviewNode,
37
46
  "file-check": fileCheckNode,
@@ -47,10 +56,13 @@ const builtInNodes = {
47
56
  "llm-prompt": llmPromptNode,
48
57
  "opencode-prompt": opencodePromptNode,
49
58
  "plan-codex": planCodexNode,
59
+ "planning-bundle": planningBundleNode,
50
60
  "planning-questions-form": planningQuestionsFormNode,
51
61
  "read-file": readFileNode,
52
62
  "review-findings-form": reviewFindingsFormNode,
63
+ "review-verdict": reviewVerdictNode,
53
64
  "select-files-form": selectFilesFormNode,
65
+ "structured-summary": structuredSummaryNode,
54
66
  "summary-file-load": summaryFileLoadNode,
55
67
  "telegram-notify": telegramNotifierNode,
56
68
  "user-input": userInputNode,
@@ -70,6 +82,12 @@ const builtInNodeMetadata = {
70
82
  prompt: "forbidden",
71
83
  requiredParams: ["selectionFile", "autoMode"],
72
84
  },
85
+ "clear-ready-to-merge": {
86
+ kind: "clear-ready-to-merge",
87
+ version: 1,
88
+ prompt: "forbidden",
89
+ requiredParams: ["taskKey"],
90
+ },
73
91
  "codex-prompt": {
74
92
  kind: "codex-prompt",
75
93
  version: 1,
@@ -90,6 +108,18 @@ const builtInNodeMetadata = {
90
108
  prompt: "forbidden",
91
109
  requiredParams: ["commitMessageFile", "formId", "title", "outputFile"],
92
110
  },
111
+ "design-review-verdict": {
112
+ kind: "design-review-verdict",
113
+ version: 1,
114
+ prompt: "forbidden",
115
+ requiredParams: ["taskKey"],
116
+ },
117
+ "ensure-summary-json": {
118
+ kind: "ensure-summary-json",
119
+ version: 1,
120
+ prompt: "forbidden",
121
+ requiredParams: ["markdownFile", "outputFile"],
122
+ },
93
123
  "fetch-gitlab-diff": {
94
124
  kind: "fetch-gitlab-diff",
95
125
  version: 1,
@@ -150,7 +180,7 @@ const builtInNodeMetadata = {
150
180
  kind: "llm-prompt",
151
181
  version: 1,
152
182
  prompt: "required",
153
- requiredParams: ["labelText", "executor"],
183
+ requiredParams: ["labelText"],
154
184
  executors: ["codex", "opencode"],
155
185
  },
156
186
  "opencode-prompt": { kind: "opencode-prompt", version: 1, prompt: "required", requiredParams: ["labelText"] },
@@ -161,6 +191,12 @@ const builtInNodeMetadata = {
161
191
  requiredParams: ["prompt", "requiredArtifacts"],
162
192
  executors: ["codex"],
163
193
  },
194
+ "planning-bundle": {
195
+ kind: "planning-bundle",
196
+ version: 1,
197
+ prompt: "forbidden",
198
+ requiredParams: ["taskKey"],
199
+ },
164
200
  "planning-questions-form": {
165
201
  kind: "planning-questions-form",
166
202
  version: 1,
@@ -174,12 +210,24 @@ const builtInNodeMetadata = {
174
210
  prompt: "forbidden",
175
211
  requiredParams: ["reviewFindingsJsonFile", "formId", "title"],
176
212
  },
213
+ "review-verdict": {
214
+ kind: "review-verdict",
215
+ version: 1,
216
+ prompt: "forbidden",
217
+ requiredParams: ["taskKey"],
218
+ },
177
219
  "select-files-form": {
178
220
  kind: "select-files-form",
179
221
  version: 1,
180
222
  prompt: "forbidden",
181
223
  requiredParams: ["gitStatusJsonFile", "formId", "title", "outputFile"],
182
224
  },
225
+ "structured-summary": {
226
+ kind: "structured-summary",
227
+ version: 1,
228
+ prompt: "forbidden",
229
+ requiredParams: ["path"],
230
+ },
183
231
  "summary-file-load": { kind: "summary-file-load", version: 1, prompt: "forbidden", requiredParams: ["path"] },
184
232
  "telegram-notify": {
185
233
  kind: "telegram-notify",
@@ -1,11 +1,12 @@
1
1
  import { setCurrentNode } from "../tui.js";
2
2
  import { runNodeChecks } from "./checks.js";
3
3
  export async function runNode(node, context, params, options = {}) {
4
+ const effectiveContext = options.contextOverrides ? { ...context, ...options.contextOverrides } : context;
4
5
  setCurrentNode(node.kind);
5
6
  try {
6
- const result = await node.run(context, params);
7
+ const result = await node.run(effectiveContext, params);
7
8
  if (!options.skipChecks) {
8
- const checks = node.checks?.(context, params, result) ?? [];
9
+ const checks = node.checks?.(effectiveContext, params, result) ?? [];
9
10
  runNodeChecks(checks);
10
11
  }
11
12
  return result;
@@ -22,7 +22,11 @@ export const buildReviewFixPromptNode = {
22
22
  "Use the user selection below as source of truth for the current review-fix scope.",
23
23
  `Selection file: ${params.selectionFile}`,
24
24
  `apply_all: ${applyAll ? "true" : "false"}`,
25
- applyAll ? "Fix all findings in the current iteration." : `Fix only selected findings:\n- ${selectedFindings.join("\n- ")}`,
25
+ applyAll
26
+ ? "Fix all findings in the current iteration."
27
+ : selectedFindings.length > 0
28
+ ? `Fix only selected findings:\n- ${selectedFindings.join("\n- ")}`
29
+ : "No findings were selected for this review-fix iteration. Do not modify code; report the no-op outcome after validation.",
26
30
  ].join("\n\n");
27
31
  return {
28
32
  value: {
@@ -0,0 +1,11 @@
1
+ import { clearReadyToMergeFile } from "../../runtime/ready-to-merge.js";
2
+ export const clearReadyToMergeNode = {
3
+ kind: "clear-ready-to-merge",
4
+ version: 1,
5
+ async run(_context, params) {
6
+ const cleared = clearReadyToMergeFile(params.taskKey);
7
+ return {
8
+ value: { cleared },
9
+ };
10
+ },
11
+ };
@@ -1,5 +1,6 @@
1
1
  import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
2
2
  import path from "node:path";
3
+ import { buildLogicalKeyForPayload } from "../../artifact-manifest.js";
3
4
  import { TaskRunnerError } from "../../errors.js";
4
5
  import { validateUserInputValues } from "../../user-input.js";
5
6
  function parseCommitMessage(content) {
@@ -72,6 +73,13 @@ export const commitMessageFormNode = {
72
73
  kind: "artifact",
73
74
  path: params.outputFile,
74
75
  required: true,
76
+ manifest: {
77
+ publish: true,
78
+ logicalKey: buildLogicalKeyForPayload(context.issueKey, params.outputFile),
79
+ payloadFamily: "structured-json",
80
+ schemaId: "user-input/v1",
81
+ schemaVersion: 1,
82
+ },
75
83
  },
76
84
  ],
77
85
  };