issue-flow 0.18.0 → 0.20.0
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 +43 -97
- package/dist/agent-4DHRKZ2Z.js +32 -0
- package/dist/{analyze-Q4ONIWRZ.js → analyze-UEJ2R3H5.js} +42 -41
- package/dist/analyze-UEJ2R3H5.js.map +1 -0
- package/dist/{apply-EEFPY2W4.js → apply-QDYNQMUX.js} +22 -24
- package/dist/apply-QDYNQMUX.js.map +1 -0
- package/dist/artifacts-AMJQJFFV.js +82 -0
- package/dist/artifacts-AMJQJFFV.js.map +1 -0
- package/dist/{bench-WWWXLTFH.js → bench-RNRXVEFK.js} +42 -42
- package/dist/{chunk-RYOUZ6EK.js → chunk-23VHVVKW.js} +3 -3
- package/dist/chunk-2EYLOS5I.js +99 -0
- package/dist/chunk-2EYLOS5I.js.map +1 -0
- package/dist/{chunk-C5TL7T4V.js → chunk-2YM2VH6R.js} +2 -2
- package/dist/{chunk-XUEMATVY.js → chunk-37O2FMAN.js} +28 -25
- package/dist/chunk-37O2FMAN.js.map +1 -0
- package/dist/chunk-44RF3VFG.js +717 -0
- package/dist/chunk-44RF3VFG.js.map +1 -0
- package/dist/chunk-6AOZCWN2.js +21 -0
- package/dist/chunk-6AOZCWN2.js.map +1 -0
- package/dist/chunk-7MJGYPHF.js +1571 -0
- package/dist/chunk-7MJGYPHF.js.map +1 -0
- package/dist/{chunk-SA6HXL4Y.js → chunk-7WBUEBD5.js} +9 -9
- package/dist/chunk-7WBUEBD5.js.map +1 -0
- package/dist/chunk-7ZZUSMBJ.js +35 -0
- package/dist/chunk-7ZZUSMBJ.js.map +1 -0
- package/dist/{chunk-QJ44VG5G.js → chunk-ADH6RJNX.js} +3 -3
- package/dist/{chunk-34OCSKOB.js → chunk-AKL5UPR6.js} +159 -114
- package/dist/chunk-AKL5UPR6.js.map +1 -0
- package/dist/{chunk-7F7LGMVO.js → chunk-BTBJ5UOO.js} +12 -12
- package/dist/{chunk-7F7LGMVO.js.map → chunk-BTBJ5UOO.js.map} +1 -1
- package/dist/{chunk-HOAHMERN.js → chunk-CLZ6RRZL.js} +21 -21
- package/dist/chunk-DBLXLKGU.js +1201 -0
- package/dist/chunk-DBLXLKGU.js.map +1 -0
- package/dist/{chunk-DUS5ZNKL.js → chunk-DIMDAYZS.js} +7 -6
- package/dist/chunk-DZ3DZ3EN.js +278 -0
- package/dist/chunk-DZ3DZ3EN.js.map +1 -0
- package/dist/{chunk-CRGIQFUQ.js → chunk-E2H3JV2E.js} +3 -1
- package/dist/chunk-E2H3JV2E.js.map +1 -0
- package/dist/{chunk-45WZ6GMI.js → chunk-EORDSKWZ.js} +17 -17
- package/dist/chunk-EORDSKWZ.js.map +1 -0
- package/dist/{chunk-LTH6XYZ3.js → chunk-EYKPWHT7.js} +40 -30
- package/dist/chunk-EYKPWHT7.js.map +1 -0
- package/dist/{chunk-OODXFCQV.js → chunk-FU2FQ4JE.js} +14 -16
- package/dist/{chunk-OODXFCQV.js.map → chunk-FU2FQ4JE.js.map} +1 -1
- package/dist/{chunk-V7QOIQYC.js → chunk-G442RDFX.js} +9 -23
- package/dist/{chunk-V7QOIQYC.js.map → chunk-G442RDFX.js.map} +1 -1
- package/dist/{chunk-QPGEFLMY.js → chunk-I64N6RL6.js} +7 -7
- package/dist/{chunk-KRAGAUKD.js → chunk-JBYXJOJJ.js} +201 -64
- package/dist/chunk-JBYXJOJJ.js.map +1 -0
- package/dist/{chunk-SOM4QA6C.js → chunk-JCR5C5A7.js} +93 -18
- package/dist/chunk-JCR5C5A7.js.map +1 -0
- package/dist/{chunk-RNFUVKC3.js → chunk-K5NM26NV.js} +30 -13
- package/dist/chunk-K5NM26NV.js.map +1 -0
- package/dist/{chunk-YVPZUN6X.js → chunk-KUA6KBBD.js} +335 -38
- package/dist/chunk-KUA6KBBD.js.map +1 -0
- package/dist/{chunk-KMCS76ZW.js → chunk-KUL64XUF.js} +44 -12
- package/dist/chunk-KUL64XUF.js.map +1 -0
- package/dist/{chunk-HAKDLR6N.js → chunk-MAJ6QDRL.js} +65 -78
- package/dist/chunk-MAJ6QDRL.js.map +1 -0
- package/dist/{chunk-DGRTJD5R.js → chunk-MML2G7IC.js} +7 -7
- package/dist/chunk-NP47HRX2.js +136 -0
- package/dist/chunk-NP47HRX2.js.map +1 -0
- package/dist/{chunk-3R27MJ5R.js → chunk-PFWHHYEO.js} +3 -3
- package/dist/{chunk-ECU7YO7S.js → chunk-PM5YWJYO.js} +22 -6
- package/dist/chunk-PM5YWJYO.js.map +1 -0
- package/dist/{chunk-E4I6MMHD.js → chunk-PXPTIXJF.js} +154 -101
- package/dist/chunk-PXPTIXJF.js.map +1 -0
- package/dist/{chunk-CWSQVHVV.js → chunk-QJHZ3HYJ.js} +248 -102
- package/dist/chunk-QJHZ3HYJ.js.map +1 -0
- package/dist/{chunk-LI35PIIS.js → chunk-RDPK7LYK.js} +20 -117
- package/dist/chunk-RDPK7LYK.js.map +1 -0
- package/dist/{chunk-PMLE7KAQ.js → chunk-RMIBLFG3.js} +30 -14
- package/dist/chunk-RMIBLFG3.js.map +1 -0
- package/dist/{chunk-62GVVZQO.js → chunk-T736DSZI.js} +32 -316
- package/dist/chunk-T736DSZI.js.map +1 -0
- package/dist/{chunk-TZYINKCC.js → chunk-UDUUUFQF.js} +57 -29
- package/dist/chunk-UDUUUFQF.js.map +1 -0
- package/dist/{chunk-NEWNXZ65.js → chunk-V7GETODQ.js} +36 -28
- package/dist/{chunk-NEWNXZ65.js.map → chunk-V7GETODQ.js.map} +1 -1
- package/dist/{chunk-PPZ3K4YM.js → chunk-VHQMMY2D.js} +2 -2
- package/dist/{chunk-ZVZMWNCG.js → chunk-VJ3PF6B7.js} +50 -16
- package/dist/chunk-VJ3PF6B7.js.map +1 -0
- package/dist/{chunk-L6HSKTQE.js → chunk-W7LZLJAF.js} +4 -4
- package/dist/{chunk-6K2LCFG6.js → chunk-WB4FA2EH.js} +70 -81
- package/dist/chunk-WB4FA2EH.js.map +1 -0
- package/dist/{chunk-LGHND47K.js → chunk-WQSGL5LX.js} +22 -16
- package/dist/chunk-WQSGL5LX.js.map +1 -0
- package/dist/{chunk-ICM463EO.js → chunk-XNK5UN2D.js} +5 -649
- package/dist/chunk-XNK5UN2D.js.map +1 -0
- package/dist/{chunk-7UMMFOL2.js → chunk-Y2KOWABB.js} +39 -24
- package/dist/chunk-Y2KOWABB.js.map +1 -0
- package/dist/{chunk-QF7VEL3M.js → chunk-YC24E66P.js} +568 -158
- package/dist/chunk-YC24E66P.js.map +1 -0
- package/dist/{chunk-EG2MGDP5.js → chunk-Z6RCKCVB.js} +52 -46
- package/dist/chunk-Z6RCKCVB.js.map +1 -0
- package/dist/{chunk-YUNBOUQH.js → chunk-ZPGNVBWY.js} +8 -8
- package/dist/cli.js +132 -62
- package/dist/cli.js.map +1 -1
- package/dist/compat-OJG76J4I.js +24 -0
- package/dist/{config-LEBZZCJP.js → config-6YTWPDBK.js} +20 -17
- package/dist/{contract-JH2WBIO6.js → contract-HWLFFL3F.js} +2 -2
- package/dist/{conventions-XOT6YW5L.js → conventions-5UPOTU42.js} +20 -16
- package/dist/{conventions-XOT6YW5L.js.map → conventions-5UPOTU42.js.map} +1 -1
- package/dist/db-QAZG4LQD.js +264 -0
- package/dist/db-QAZG4LQD.js.map +1 -0
- package/dist/diagnostics-YEFB42E5.js +25 -0
- package/dist/execute-QCT64D37.js +38 -0
- package/dist/{generate-JGW5JSKB.js → generate-QATMDKOK.js} +46 -43
- package/dist/generate-QATMDKOK.js.map +1 -0
- package/dist/{git-A2IP32PQ.js → git-XGOECXWG.js} +2 -3
- package/dist/history-NBPUZVGQ.js +101 -0
- package/dist/history-NBPUZVGQ.js.map +1 -0
- package/dist/init-4LB2YKWP.js +28 -0
- package/dist/{operations-O4FORFIH.js → operations-RUQP2Y2F.js} +78 -52
- package/dist/operations-RUQP2Y2F.js.map +1 -0
- package/dist/{permissions-G4XCAESF.js → permissions-QZPUUBSO.js} +5 -6
- package/dist/plan-2NMSHTMD.js +38 -0
- package/dist/{policy-U5NBFAO5.js → policy-RKKFF5A2.js} +17 -15
- package/dist/{policy-U5NBFAO5.js.map → policy-RKKFF5A2.js.map} +1 -1
- package/dist/pr-QKFO5HI3.js +42 -0
- package/dist/pr-review-H2BFD6F2.js +33 -0
- package/dist/prd-ET6XKYRS.js +37 -0
- package/dist/{ps-76L6ZAZL.js → ps-UIKSOUAQ.js} +26 -15
- package/dist/ps-UIKSOUAQ.js.map +1 -0
- package/dist/{recorder-2BAKPBRA.js → recorder-LOU3PTIE.js} +11 -7
- package/dist/registry-HV7M6MAH.js +17 -0
- package/dist/repository-RCRR6RDE.js +80 -0
- package/dist/resume-BWJZGBLZ.js +278 -0
- package/dist/resume-BWJZGBLZ.js.map +1 -0
- package/dist/review-2MTZLNSS.js +38 -0
- package/dist/routing-RM5ABHHD.js +35 -0
- package/dist/run-XMACQBRJ.js +61 -0
- package/dist/{session-publisher-KAJQRHNZ.js → session-publisher-Q5TNEZPX.js} +3 -3
- package/dist/session-publisher-Q5TNEZPX.js.map +1 -0
- package/dist/{state-manager-UPHO2EA2.js → state-manager-SRN4VJSX.js} +9 -4
- package/dist/state-manager-SRN4VJSX.js.map +1 -0
- package/dist/{usage-KTMYXAPF.js → usage-JOODVE5O.js} +69 -63
- package/dist/usage-JOODVE5O.js.map +1 -0
- package/dist/web-TLMWJ2BM.js +205 -0
- package/dist/web-TLMWJ2BM.js.map +1 -0
- package/package.json +22 -8
- package/prompts/analyze.md +16 -19
- package/prompts/execute.md +73 -144
- package/prompts/generate.md +23 -10
- package/prompts/plan.md +32 -60
- package/prompts/pr-review.md +58 -40
- package/prompts/pr.md +50 -16
- package/prompts/prd.md +26 -19
- package/prompts/review.md +41 -18
- package/web/public/app.js +111 -112
- package/dist/agent-HMZTXCRT.js +0 -30
- package/dist/analyze-Q4ONIWRZ.js.map +0 -1
- package/dist/apply-EEFPY2W4.js.map +0 -1
- package/dist/chunk-34OCSKOB.js.map +0 -1
- package/dist/chunk-45WZ6GMI.js.map +0 -1
- package/dist/chunk-62GVVZQO.js.map +0 -1
- package/dist/chunk-6K2LCFG6.js.map +0 -1
- package/dist/chunk-7UMMFOL2.js.map +0 -1
- package/dist/chunk-CRGIQFUQ.js.map +0 -1
- package/dist/chunk-CWSQVHVV.js.map +0 -1
- package/dist/chunk-E4I6MMHD.js.map +0 -1
- package/dist/chunk-ECU7YO7S.js.map +0 -1
- package/dist/chunk-EG2MGDP5.js.map +0 -1
- package/dist/chunk-HAKDLR6N.js.map +0 -1
- package/dist/chunk-ICM463EO.js.map +0 -1
- package/dist/chunk-KMCS76ZW.js.map +0 -1
- package/dist/chunk-KRAGAUKD.js.map +0 -1
- package/dist/chunk-LGHND47K.js.map +0 -1
- package/dist/chunk-LI35PIIS.js.map +0 -1
- package/dist/chunk-LTH6XYZ3.js.map +0 -1
- package/dist/chunk-PMLE7KAQ.js.map +0 -1
- package/dist/chunk-QF7VEL3M.js.map +0 -1
- package/dist/chunk-RNFUVKC3.js.map +0 -1
- package/dist/chunk-SA6HXL4Y.js.map +0 -1
- package/dist/chunk-SOM4QA6C.js.map +0 -1
- package/dist/chunk-TZYINKCC.js.map +0 -1
- package/dist/chunk-WCCZJL7W.js +0 -141
- package/dist/chunk-WCCZJL7W.js.map +0 -1
- package/dist/chunk-XEYH6ZZI.js +0 -289
- package/dist/chunk-XEYH6ZZI.js.map +0 -1
- package/dist/chunk-XUEMATVY.js.map +0 -1
- package/dist/chunk-XZUEFTUP.js +0 -243
- package/dist/chunk-XZUEFTUP.js.map +0 -1
- package/dist/chunk-YVPZUN6X.js.map +0 -1
- package/dist/chunk-ZVZMWNCG.js.map +0 -1
- package/dist/diagnostics-HTCWF7F4.js +0 -23
- package/dist/execute-LELOSR5T.js +0 -37
- package/dist/generate-JGW5JSKB.js.map +0 -1
- package/dist/init-TO6MUXO4.js +0 -26
- package/dist/operations-O4FORFIH.js.map +0 -1
- package/dist/plan-OXAT344Q.js +0 -34
- package/dist/pr-UZHNKKZC.js +0 -39
- package/dist/pr-review-Q4ACAWDM.js +0 -32
- package/dist/prd-6CYEMLDY.js +0 -33
- package/dist/ps-76L6ZAZL.js.map +0 -1
- package/dist/registry-XLHHYLTR.js +0 -15
- package/dist/resume-URCU6CIJ.js +0 -244
- package/dist/resume-URCU6CIJ.js.map +0 -1
- package/dist/review-LVZT2TMW.js +0 -35
- package/dist/routing-EK6RBZM4.js +0 -33
- package/dist/run-2RXJCJKT.js +0 -56
- package/dist/usage-KTMYXAPF.js.map +0 -1
- package/dist/web-B5UPHHR5.js +0 -172
- package/dist/web-B5UPHHR5.js.map +0 -1
- /package/dist/{agent-HMZTXCRT.js.map → agent-4DHRKZ2Z.js.map} +0 -0
- /package/dist/{bench-WWWXLTFH.js.map → bench-RNRXVEFK.js.map} +0 -0
- /package/dist/{chunk-RYOUZ6EK.js.map → chunk-23VHVVKW.js.map} +0 -0
- /package/dist/{chunk-C5TL7T4V.js.map → chunk-2YM2VH6R.js.map} +0 -0
- /package/dist/{chunk-QJ44VG5G.js.map → chunk-ADH6RJNX.js.map} +0 -0
- /package/dist/{chunk-HOAHMERN.js.map → chunk-CLZ6RRZL.js.map} +0 -0
- /package/dist/{chunk-DUS5ZNKL.js.map → chunk-DIMDAYZS.js.map} +0 -0
- /package/dist/{chunk-QPGEFLMY.js.map → chunk-I64N6RL6.js.map} +0 -0
- /package/dist/{chunk-DGRTJD5R.js.map → chunk-MML2G7IC.js.map} +0 -0
- /package/dist/{chunk-3R27MJ5R.js.map → chunk-PFWHHYEO.js.map} +0 -0
- /package/dist/{chunk-PPZ3K4YM.js.map → chunk-VHQMMY2D.js.map} +0 -0
- /package/dist/{chunk-L6HSKTQE.js.map → chunk-W7LZLJAF.js.map} +0 -0
- /package/dist/{chunk-YUNBOUQH.js.map → chunk-ZPGNVBWY.js.map} +0 -0
- /package/dist/{config-LEBZZCJP.js.map → compat-OJG76J4I.js.map} +0 -0
- /package/dist/{contract-JH2WBIO6.js.map → config-6YTWPDBK.js.map} +0 -0
- /package/dist/{diagnostics-HTCWF7F4.js.map → contract-HWLFFL3F.js.map} +0 -0
- /package/dist/{execute-LELOSR5T.js.map → diagnostics-YEFB42E5.js.map} +0 -0
- /package/dist/{git-A2IP32PQ.js.map → execute-QCT64D37.js.map} +0 -0
- /package/dist/{init-TO6MUXO4.js.map → git-XGOECXWG.js.map} +0 -0
- /package/dist/{permissions-G4XCAESF.js.map → init-4LB2YKWP.js.map} +0 -0
- /package/dist/{plan-OXAT344Q.js.map → permissions-QZPUUBSO.js.map} +0 -0
- /package/dist/{pr-UZHNKKZC.js.map → plan-2NMSHTMD.js.map} +0 -0
- /package/dist/{pr-review-Q4ACAWDM.js.map → pr-QKFO5HI3.js.map} +0 -0
- /package/dist/{prd-6CYEMLDY.js.map → pr-review-H2BFD6F2.js.map} +0 -0
- /package/dist/{recorder-2BAKPBRA.js.map → prd-ET6XKYRS.js.map} +0 -0
- /package/dist/{registry-XLHHYLTR.js.map → recorder-LOU3PTIE.js.map} +0 -0
- /package/dist/{review-LVZT2TMW.js.map → registry-HV7M6MAH.js.map} +0 -0
- /package/dist/{routing-EK6RBZM4.js.map → repository-RCRR6RDE.js.map} +0 -0
- /package/dist/{run-2RXJCJKT.js.map → review-2MTZLNSS.js.map} +0 -0
- /package/dist/{session-publisher-KAJQRHNZ.js.map → routing-RM5ABHHD.js.map} +0 -0
- /package/dist/{state-manager-UPHO2EA2.js.map → run-XMACQBRJ.js.map} +0 -0
|
@@ -3,26 +3,7 @@ import {
|
|
|
3
3
|
formatPhaseLine,
|
|
4
4
|
loadPhaseTiming,
|
|
5
5
|
snapshotTimingFields
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
runPr
|
|
9
|
-
} from "./chunk-OODXFCQV.js";
|
|
10
|
-
import {
|
|
11
|
-
mostRecent,
|
|
12
|
-
prReviewDir,
|
|
13
|
-
readPrReviewIndex,
|
|
14
|
-
runPrReview
|
|
15
|
-
} from "./chunk-LTH6XYZ3.js";
|
|
16
|
-
import {
|
|
17
|
-
listPullRequests,
|
|
18
|
-
publishGitState
|
|
19
|
-
} from "./chunk-YUNBOUQH.js";
|
|
20
|
-
import {
|
|
21
|
-
runPrd
|
|
22
|
-
} from "./chunk-XUEMATVY.js";
|
|
23
|
-
import {
|
|
24
|
-
runReview
|
|
25
|
-
} from "./chunk-EG2MGDP5.js";
|
|
6
|
+
} from "./chunk-ADH6RJNX.js";
|
|
26
7
|
import {
|
|
27
8
|
PIPELINE_PHASES,
|
|
28
9
|
PIPELINE_PHASES_NO_BRANCH,
|
|
@@ -41,51 +22,71 @@ import {
|
|
|
41
22
|
markQueueIssueInProgress,
|
|
42
23
|
markQueueIssueSkipped,
|
|
43
24
|
nextQueueIssue,
|
|
25
|
+
queueNeedsFinalization,
|
|
44
26
|
saveExecutionPlan,
|
|
45
27
|
setQueueBranch,
|
|
46
28
|
setQueuePullRequest
|
|
47
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-Y2KOWABB.js";
|
|
48
30
|
import {
|
|
49
|
-
|
|
50
|
-
} from "./chunk-
|
|
31
|
+
listStoredIssueEvents
|
|
32
|
+
} from "./chunk-2EYLOS5I.js";
|
|
51
33
|
import {
|
|
34
|
+
SqliteSessionPublisher,
|
|
52
35
|
printQueueSummary,
|
|
53
36
|
printRunSummary,
|
|
54
37
|
runExecute,
|
|
55
38
|
stripMarkdown
|
|
56
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JBYXJOJJ.js";
|
|
57
40
|
import {
|
|
58
41
|
ensureWebMonitor
|
|
59
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-V7GETODQ.js";
|
|
60
43
|
import {
|
|
61
44
|
runPlan
|
|
62
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-AKL5UPR6.js";
|
|
46
|
+
import {
|
|
47
|
+
runPr
|
|
48
|
+
} from "./chunk-FU2FQ4JE.js";
|
|
49
|
+
import {
|
|
50
|
+
mostRecent,
|
|
51
|
+
prReviewDir,
|
|
52
|
+
readPrReviewIndex,
|
|
53
|
+
runPrReview
|
|
54
|
+
} from "./chunk-EYKPWHT7.js";
|
|
55
|
+
import {
|
|
56
|
+
listPullRequests,
|
|
57
|
+
publishGitState
|
|
58
|
+
} from "./chunk-ZPGNVBWY.js";
|
|
59
|
+
import {
|
|
60
|
+
runPrd
|
|
61
|
+
} from "./chunk-37O2FMAN.js";
|
|
62
|
+
import {
|
|
63
|
+
runReview
|
|
64
|
+
} from "./chunk-Z6RCKCVB.js";
|
|
63
65
|
import {
|
|
64
66
|
resolveCommandIssue
|
|
65
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-7WBUEBD5.js";
|
|
68
|
+
import {
|
|
69
|
+
runInit
|
|
70
|
+
} from "./chunk-RMIBLFG3.js";
|
|
66
71
|
import {
|
|
67
72
|
getProvider
|
|
68
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-T736DSZI.js";
|
|
69
74
|
import {
|
|
70
75
|
beginUsageScope,
|
|
71
76
|
getRunUsageTotals
|
|
72
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-KUL64XUF.js";
|
|
73
78
|
import {
|
|
74
79
|
assessDecomposition,
|
|
75
80
|
buildDecompositionReport,
|
|
76
81
|
proposeSubIssues,
|
|
77
82
|
resetAgentInvocationState
|
|
78
|
-
} from "./chunk-
|
|
79
|
-
import {
|
|
80
|
-
JournalPublisher,
|
|
81
|
-
MultiPublisher
|
|
82
|
-
} from "./chunk-WCCZJL7W.js";
|
|
83
|
+
} from "./chunk-UDUUUFQF.js";
|
|
83
84
|
import {
|
|
84
85
|
recommendedTarget
|
|
85
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-VJ3PF6B7.js";
|
|
86
87
|
import {
|
|
87
88
|
getPackageVersion
|
|
88
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-2YM2VH6R.js";
|
|
89
90
|
import {
|
|
90
91
|
describeRunAgents,
|
|
91
92
|
getActiveResilienceConfig,
|
|
@@ -97,13 +98,10 @@ import {
|
|
|
97
98
|
loadRoutingConfig,
|
|
98
99
|
loadWebConfig,
|
|
99
100
|
onShutdown
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import {
|
|
102
|
-
resolveIssuePaths,
|
|
103
|
-
resolveProjectPaths,
|
|
104
|
-
resolveQueuePaths
|
|
105
|
-
} from "./chunk-LI35PIIS.js";
|
|
101
|
+
} from "./chunk-YC24E66P.js";
|
|
106
102
|
import {
|
|
103
|
+
JournalPublisher,
|
|
104
|
+
MultiPublisher,
|
|
107
105
|
formatDuration,
|
|
108
106
|
getIcons,
|
|
109
107
|
getInactivityTimeout,
|
|
@@ -112,51 +110,60 @@ import {
|
|
|
112
110
|
printInfo,
|
|
113
111
|
printSuccess,
|
|
114
112
|
printWarning,
|
|
113
|
+
resolveIssuePaths,
|
|
114
|
+
resolveProjectPaths,
|
|
115
|
+
resolveQueuePaths,
|
|
115
116
|
setActivityCallback,
|
|
116
117
|
setInactivityTimeout,
|
|
117
118
|
setOutputCallback,
|
|
118
119
|
setStoryStageCallback,
|
|
119
120
|
setStoryUpdateCallback
|
|
120
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-DBLXLKGU.js";
|
|
121
122
|
import {
|
|
122
123
|
bindDiagnosticContext,
|
|
123
124
|
flushDiagnostics,
|
|
124
125
|
writeDiagnostic
|
|
125
|
-
} from "./chunk-
|
|
126
|
-
import {
|
|
127
|
-
committedStoryIds,
|
|
128
|
-
describePreflight,
|
|
129
|
-
getBaseBranch,
|
|
130
|
-
getCurrentBranch,
|
|
131
|
-
getHeadCommit,
|
|
132
|
-
getProjectRoot,
|
|
133
|
-
localBranchExists,
|
|
134
|
-
preflightRepository,
|
|
135
|
-
run
|
|
136
|
-
} from "./chunk-YVPZUN6X.js";
|
|
126
|
+
} from "./chunk-I64N6RL6.js";
|
|
137
127
|
import {
|
|
138
128
|
FilePublisher,
|
|
139
129
|
MemoryPublisher,
|
|
140
130
|
getSessionPublisher,
|
|
141
131
|
setSessionPublisher
|
|
142
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-DIMDAYZS.js";
|
|
143
133
|
import {
|
|
134
|
+
DEFAULT_MAX_CORRECTION_CYCLES,
|
|
135
|
+
allStoriesPass,
|
|
144
136
|
isoNow,
|
|
145
137
|
loadTaskPlan,
|
|
146
138
|
saveTaskPlan
|
|
147
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-JCR5C5A7.js";
|
|
148
140
|
import {
|
|
149
141
|
acquireRunLock,
|
|
150
142
|
describeRunLockOwner
|
|
151
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-44RF3VFG.js";
|
|
144
|
+
import {
|
|
145
|
+
getPlanRepository,
|
|
146
|
+
ingestGeneratedPlan
|
|
147
|
+
} from "./chunk-7MJGYPHF.js";
|
|
148
|
+
import {
|
|
149
|
+
committedStoryIds,
|
|
150
|
+
describePreflight,
|
|
151
|
+
getBaseBranch,
|
|
152
|
+
getCurrentBranch,
|
|
153
|
+
getHeadCommit,
|
|
154
|
+
getProjectRoot,
|
|
155
|
+
localBranchExists,
|
|
156
|
+
preflightRepository,
|
|
157
|
+
run
|
|
158
|
+
} from "./chunk-KUA6KBBD.js";
|
|
152
159
|
|
|
153
160
|
// src/execution/detach.ts
|
|
154
|
-
import { spawn } from "child_process";
|
|
155
|
-
import { mkdir, open } from "fs/promises";
|
|
156
|
-
import { dirname } from "path";
|
|
161
|
+
import { spawn } from "node:child_process";
|
|
162
|
+
import { mkdir, open } from "node:fs/promises";
|
|
163
|
+
import { dirname } from "node:path";
|
|
157
164
|
|
|
158
165
|
// src/storage/run-log.ts
|
|
159
|
-
import { rename, stat } from "fs/promises";
|
|
166
|
+
import { rename, stat } from "node:fs/promises";
|
|
160
167
|
var DEFAULT_RUN_LOG_MAX_BYTES = 5 * 1024 * 1024;
|
|
161
168
|
async function rotateRunLogIfNeeded(filePath, rotatedPath, maxBytes = DEFAULT_RUN_LOG_MAX_BYTES) {
|
|
162
169
|
if (maxBytes <= 0) return;
|
|
@@ -257,7 +264,7 @@ function parseIssueArguments(values) {
|
|
|
257
264
|
}
|
|
258
265
|
|
|
259
266
|
// src/execution/confirm.ts
|
|
260
|
-
import { createInterface } from "readline";
|
|
267
|
+
import { createInterface } from "node:readline";
|
|
261
268
|
var MAX_PROMPT_ATTEMPTS = 3;
|
|
262
269
|
var QueueConfirmationError = class extends Error {
|
|
263
270
|
exitCode;
|
|
@@ -541,6 +548,10 @@ async function planQueue(input) {
|
|
|
541
548
|
const single = input.requested.length === 1;
|
|
542
549
|
let resumable = await loadResumableQueue(input.planFile, input.requested);
|
|
543
550
|
if (resumable !== null) {
|
|
551
|
+
if (input.closeIssue !== void 0) {
|
|
552
|
+
resumable.closeIssue = input.closeIssue;
|
|
553
|
+
await saveExecutionPlan(input.planFile, resumable);
|
|
554
|
+
}
|
|
544
555
|
const reconciled = await reconcileClosedDiscoveredIssues(resumable, warn);
|
|
545
556
|
resumable = reconciled.plan;
|
|
546
557
|
if (reconciled.closed.length > 0) {
|
|
@@ -550,7 +561,7 @@ async function planQueue(input) {
|
|
|
550
561
|
);
|
|
551
562
|
}
|
|
552
563
|
}
|
|
553
|
-
if (resumable !== null && isQueueComplete(resumable)) {
|
|
564
|
+
if (resumable !== null && isQueueComplete(resumable) && !queueNeedsFinalization(resumable)) {
|
|
554
565
|
const pr = resumable.pullRequest?.url;
|
|
555
566
|
info(
|
|
556
567
|
`The execution queue of issue #${resumable.id} is already complete (${resumable.issues.length} issues)${pr === void 0 ? "" : ` \u2014 ${pr}`}. Nothing to run.`
|
|
@@ -672,10 +683,57 @@ async function planQueue(input) {
|
|
|
672
683
|
})
|
|
673
684
|
);
|
|
674
685
|
}
|
|
686
|
+
if (input.closeIssue !== void 0) plan.closeIssue = input.closeIssue;
|
|
675
687
|
await saveExecutionPlan(input.planFile, plan);
|
|
676
688
|
return { kind: "queue", plan, resumed: false };
|
|
677
689
|
}
|
|
678
690
|
|
|
691
|
+
// src/commands/run/closure.ts
|
|
692
|
+
function requestedPhasesComplete(plan) {
|
|
693
|
+
const phases = PIPELINE_PHASES.filter(
|
|
694
|
+
(phase) => !plan.noBranch || phase !== "pr"
|
|
695
|
+
);
|
|
696
|
+
if (plan.prReview?.enabled && !plan.noBranch) phases.push("pr-review");
|
|
697
|
+
return plan.userStories.length > 0 && new PipelineManager(plan, "", phases).getNextPhase() === null && allStoriesPass(plan) && !plan.lastReviewFindings;
|
|
698
|
+
}
|
|
699
|
+
async function closeAndConfirm(id, source) {
|
|
700
|
+
const provider = getProvider(source);
|
|
701
|
+
if ((await provider.get(id))?.state === "closed") return;
|
|
702
|
+
if (!provider.close) throw new Error(`Provider ${source} cannot close issues`);
|
|
703
|
+
await provider.close(id);
|
|
704
|
+
if ((await provider.get(id))?.state !== "closed")
|
|
705
|
+
throw new Error(`Could not confirm closure of ${id}`);
|
|
706
|
+
}
|
|
707
|
+
async function persistClosureChoice(path, choice) {
|
|
708
|
+
if (choice === void 0) return;
|
|
709
|
+
const plan = await loadTaskPlan(path);
|
|
710
|
+
plan.closeIssue = choice;
|
|
711
|
+
await saveTaskPlan(path, plan);
|
|
712
|
+
}
|
|
713
|
+
async function finishIssueClosure(path, id, source) {
|
|
714
|
+
const plan = await loadTaskPlan(path);
|
|
715
|
+
if (!requestedPhasesComplete(plan)) return 1;
|
|
716
|
+
if (plan.closeIssue && !plan.issueClosedAt) {
|
|
717
|
+
try {
|
|
718
|
+
await closeAndConfirm(id, source);
|
|
719
|
+
plan.issueClosedAt = isoNow();
|
|
720
|
+
} catch (error) {
|
|
721
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
722
|
+
plan.lastError = { category: "issue_closure", message, at: isoNow() };
|
|
723
|
+
plan.issueStatus = "in_progress";
|
|
724
|
+
plan.completedAt = null;
|
|
725
|
+
await saveTaskPlan(path, plan);
|
|
726
|
+
printError(`Delivery complete; issue closure pending: ${message}`);
|
|
727
|
+
return 1;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
plan.issueStatus = "completed";
|
|
731
|
+
plan.completedAt ??= isoNow();
|
|
732
|
+
if (plan.lastError?.category === "issue_closure") plan.lastError = null;
|
|
733
|
+
await saveTaskPlan(path, plan);
|
|
734
|
+
return 0;
|
|
735
|
+
}
|
|
736
|
+
|
|
679
737
|
// src/commands/run/pull-request.ts
|
|
680
738
|
async function primaryPrCreated(plan) {
|
|
681
739
|
try {
|
|
@@ -740,17 +798,6 @@ async function propagatePullRequest(plan) {
|
|
|
740
798
|
}
|
|
741
799
|
return pullRequest;
|
|
742
800
|
}
|
|
743
|
-
async function closeIssue(issueNumber, source) {
|
|
744
|
-
try {
|
|
745
|
-
const provider = getProvider(source);
|
|
746
|
-
if (provider.close !== void 0) {
|
|
747
|
-
printInfo("Closing issue...");
|
|
748
|
-
await provider.close(issueNumber);
|
|
749
|
-
}
|
|
750
|
-
} catch {
|
|
751
|
-
printWarning("Failed to close issue automatically");
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
801
|
|
|
755
802
|
// src/commands/run/queue-failure.ts
|
|
756
803
|
async function handleQueueIssueFailure(input) {
|
|
@@ -828,6 +875,7 @@ async function decideQueue(input) {
|
|
|
828
875
|
planFile: queuePaths.planFile,
|
|
829
876
|
noBranch: input.noBranch,
|
|
830
877
|
prReview: input.prReview,
|
|
878
|
+
closeIssue: input.runOptions.closeIssue,
|
|
831
879
|
confirm: {
|
|
832
880
|
yes: input.runOptions.yes,
|
|
833
881
|
only: input.runOptions.only,
|
|
@@ -879,6 +927,10 @@ async function detachAfterConfirm(requested, noBranch, prReview, options) {
|
|
|
879
927
|
}
|
|
880
928
|
async function runQueue(initialPlan, options, resolvedPrimary, runIssueSession3) {
|
|
881
929
|
const planFile = (await resolveQueuePaths(initialPlan.id)).planFile;
|
|
930
|
+
if (options.runOptions?.closeIssue !== void 0) {
|
|
931
|
+
initialPlan = { ...initialPlan, closeIssue: options.runOptions.closeIssue };
|
|
932
|
+
await saveExecutionPlan(planFile, initialPlan);
|
|
933
|
+
}
|
|
882
934
|
const queueUsage = beginUsageScope();
|
|
883
935
|
const startedAtMs = Date.now();
|
|
884
936
|
const resilience = getActiveResilienceConfig();
|
|
@@ -1046,7 +1098,7 @@ async function finishQueue(plan, planFile, summaries, startedAtMs, queueUsage, o
|
|
|
1046
1098
|
let current = plan;
|
|
1047
1099
|
let review = null;
|
|
1048
1100
|
const alreadyOpened = current.pullRequest !== void 0 || await primaryPrCreated(current);
|
|
1049
|
-
if (!current.noBranch && options.noBranch !== true && !alreadyOpened) {
|
|
1101
|
+
if (!current.noBranch && options.noBranch !== true && (!alreadyOpened || current.prReview && !current.prReviewCompleted)) {
|
|
1050
1102
|
const outcome = await runIssueSession3(current.id, options.mode, {
|
|
1051
1103
|
prReview: options.prReview ?? current.prReview,
|
|
1052
1104
|
queue: {
|
|
@@ -1062,17 +1114,43 @@ async function finishQueue(plan, planFile, summaries, startedAtMs, queueUsage, o
|
|
|
1062
1114
|
await saveExecutionPlan(planFile, current);
|
|
1063
1115
|
return outcome.code;
|
|
1064
1116
|
}
|
|
1117
|
+
if (current.prReview) current.prReviewCompleted = review !== null && !review.requestedChanges;
|
|
1065
1118
|
const pullRequest = await propagatePullRequest(current);
|
|
1066
1119
|
if (pullRequest !== null) {
|
|
1067
1120
|
current = setQueuePullRequest(current, pullRequest);
|
|
1068
1121
|
}
|
|
1069
1122
|
}
|
|
1070
1123
|
await saveExecutionPlan(planFile, current);
|
|
1124
|
+
if (current.prReview && !current.prReviewCompleted && !review?.requestedChanges) {
|
|
1125
|
+
printError("Consolidated PR review is still pending; resume the queue.");
|
|
1126
|
+
return 1;
|
|
1127
|
+
}
|
|
1071
1128
|
if (review?.requestedChanges === true) {
|
|
1072
1129
|
printInfo("Issues left open until the review blockers are addressed.");
|
|
1073
|
-
} else {
|
|
1130
|
+
} else if (current.closeIssue && (!current.prReview || current.prReviewCompleted)) {
|
|
1074
1131
|
for (const entry of current.issues) {
|
|
1075
|
-
|
|
1132
|
+
if (entry.status !== "completed" || (current.closedIssueIds ?? []).includes(entry.id))
|
|
1133
|
+
continue;
|
|
1134
|
+
try {
|
|
1135
|
+
await closeAndConfirm(entry.id, entry.source);
|
|
1136
|
+
current.closedIssueIds = [...current.closedIssueIds ?? [], entry.id];
|
|
1137
|
+
await saveExecutionPlan(planFile, current);
|
|
1138
|
+
} catch (error) {
|
|
1139
|
+
printError(`Issue #${entry.id} closure pending: ${String(error)}`);
|
|
1140
|
+
return 1;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
if (!review?.requestedChanges && (!current.prReview || current.prReviewCompleted)) {
|
|
1145
|
+
for (const entry of current.issues.filter((entry2) => entry2.status === "completed")) {
|
|
1146
|
+
try {
|
|
1147
|
+
const paths = await resolveIssuePaths(entry.id);
|
|
1148
|
+
const task = await loadTaskPlan(paths.tasksFile);
|
|
1149
|
+
task.issueStatus = "completed";
|
|
1150
|
+
task.completedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1151
|
+
await saveTaskPlan(paths.tasksFile, task);
|
|
1152
|
+
} catch {
|
|
1153
|
+
}
|
|
1076
1154
|
}
|
|
1077
1155
|
}
|
|
1078
1156
|
printQueueSummary({
|
|
@@ -1376,7 +1454,7 @@ async function runPipelineWithRenderer(options) {
|
|
|
1376
1454
|
import { execa } from "execa";
|
|
1377
1455
|
|
|
1378
1456
|
// src/commands/run/publish.ts
|
|
1379
|
-
import { join } from "path";
|
|
1457
|
+
import { join } from "node:path";
|
|
1380
1458
|
function toIssueNumber(id) {
|
|
1381
1459
|
const parsed = Number.parseInt(id, 10);
|
|
1382
1460
|
return Number.isNaN(parsed) ? null : parsed;
|
|
@@ -1457,8 +1535,7 @@ async function readPrReviewOutcome(issue, tasksPath, requestedChanges) {
|
|
|
1457
1535
|
}
|
|
1458
1536
|
|
|
1459
1537
|
// src/commands/run/phase-finalize.ts
|
|
1460
|
-
|
|
1461
|
-
const { issueNumber, resolvedIssue, review, inQueue } = input;
|
|
1538
|
+
function reportReviewOutcome(review) {
|
|
1462
1539
|
if (review?.requestedChanges) {
|
|
1463
1540
|
console.log("");
|
|
1464
1541
|
printWarning("PR review requested changes \u2014 the Pull Request is not ready to merge.");
|
|
@@ -1468,8 +1545,6 @@ async function applyReviewOutcomeAndClose(input) {
|
|
|
1468
1545
|
}
|
|
1469
1546
|
if (review?.requestedChanges) {
|
|
1470
1547
|
printInfo("Issue left open until the review blockers are addressed.");
|
|
1471
|
-
} else if (!inQueue) {
|
|
1472
|
-
await closeIssue(issueNumber, resolvedIssue.source);
|
|
1473
1548
|
}
|
|
1474
1549
|
}
|
|
1475
1550
|
async function resolveSummaryPrUrl(input) {
|
|
@@ -1501,7 +1576,20 @@ async function finalizeSuccessfulIssueRun(input) {
|
|
|
1501
1576
|
effectiveNoBranch,
|
|
1502
1577
|
elapsedSeconds
|
|
1503
1578
|
} = input;
|
|
1504
|
-
|
|
1579
|
+
reportReviewOutcome(review);
|
|
1580
|
+
const closurePlan = !inQueue ? await loadTaskPlan(tasksPath).catch(() => null) : null;
|
|
1581
|
+
if (!inQueue && !review?.requestedChanges && (closurePlan?.closeIssue || closurePlan?.lastError?.category === "issue_closure")) {
|
|
1582
|
+
const code = await finishIssueClosure(tasksPath, issueNumber, resolvedIssue.source);
|
|
1583
|
+
if (code !== 0)
|
|
1584
|
+
return {
|
|
1585
|
+
code,
|
|
1586
|
+
failedPhase: "close",
|
|
1587
|
+
branchName: producedBranch,
|
|
1588
|
+
storyCount: 0,
|
|
1589
|
+
elapsedSeconds,
|
|
1590
|
+
review
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1505
1593
|
let branchName = "unknown";
|
|
1506
1594
|
try {
|
|
1507
1595
|
const proc = await execa("git", ["branch", "--show-current"], { reject: false });
|
|
@@ -1515,7 +1603,7 @@ async function finalizeSuccessfulIssueRun(input) {
|
|
|
1515
1603
|
storyCount = plan.userStories.length;
|
|
1516
1604
|
planPrUrl = plan.pullRequest?.url ?? null;
|
|
1517
1605
|
plan.lastAttemptAt = isoNow();
|
|
1518
|
-
if (!review?.requestedChanges) {
|
|
1606
|
+
if (!review?.requestedChanges && !inQueue) {
|
|
1519
1607
|
plan.issueStatus = "completed";
|
|
1520
1608
|
plan.completedAt = isoNow();
|
|
1521
1609
|
}
|
|
@@ -1564,7 +1652,7 @@ async function finalizeSuccessfulIssueRun(input) {
|
|
|
1564
1652
|
}
|
|
1565
1653
|
|
|
1566
1654
|
// src/commands/run/phase-bootstrap.ts
|
|
1567
|
-
import { randomUUID } from "crypto";
|
|
1655
|
+
import { randomUUID } from "node:crypto";
|
|
1568
1656
|
|
|
1569
1657
|
// src/commands/run/phase-config.ts
|
|
1570
1658
|
async function buildAgentConfiguration(prReview) {
|
|
@@ -1614,8 +1702,10 @@ async function buildAgentConfiguration(prReview) {
|
|
|
1614
1702
|
}
|
|
1615
1703
|
|
|
1616
1704
|
// src/commands/run/types.ts
|
|
1617
|
-
var RUNNABLE_PHASES =
|
|
1618
|
-
var RUNNABLE_PHASES_NO_BRANCH =
|
|
1705
|
+
var RUNNABLE_PHASES = PIPELINE_PHASES.filter((phase) => phase !== "init");
|
|
1706
|
+
var RUNNABLE_PHASES_NO_BRANCH = RUNNABLE_PHASES.filter(
|
|
1707
|
+
(phase) => phase !== "pr"
|
|
1708
|
+
);
|
|
1619
1709
|
var RUNNABLE_PHASES_WITH_PR_REVIEW = [...RUNNABLE_PHASES, "pr-review"];
|
|
1620
1710
|
var QUEUE_PR_PHASES = ["init", "pr"];
|
|
1621
1711
|
var QUEUE_PR_PHASES_WITH_REVIEW = [
|
|
@@ -2052,14 +2142,17 @@ async function preparePhaseRun(issueNumber, paths, mode, publisher, input) {
|
|
|
2052
2142
|
};
|
|
2053
2143
|
}
|
|
2054
2144
|
|
|
2145
|
+
// src/commands/run/phase-runners.ts
|
|
2146
|
+
import { existsSync } from "node:fs";
|
|
2147
|
+
|
|
2055
2148
|
// src/commands/run/session.ts
|
|
2056
|
-
import { mkdir as mkdir3 } from "fs/promises";
|
|
2149
|
+
import { mkdir as mkdir3 } from "node:fs/promises";
|
|
2057
2150
|
|
|
2058
2151
|
// src/commands/run/oversized.ts
|
|
2059
|
-
import { mkdir as mkdir2, readFile, writeFile } from "fs/promises";
|
|
2152
|
+
import { mkdir as mkdir2, readFile, writeFile } from "node:fs/promises";
|
|
2060
2153
|
async function reportIfOversized(issueNumber, paths, result) {
|
|
2061
2154
|
try {
|
|
2062
|
-
const journal =
|
|
2155
|
+
const journal = await readJournal(paths);
|
|
2063
2156
|
const plan = await loadTaskPlan(paths.tasksFile).catch(() => null);
|
|
2064
2157
|
const assessment = assessDecomposition({
|
|
2065
2158
|
journal,
|
|
@@ -2098,6 +2191,18 @@ async function reportIfOversized(issueNumber, paths, result) {
|
|
|
2098
2191
|
} catch {
|
|
2099
2192
|
}
|
|
2100
2193
|
}
|
|
2194
|
+
async function readJournal(paths) {
|
|
2195
|
+
const repository = getPlanRepository(paths.tasksFile);
|
|
2196
|
+
if (repository === void 0) {
|
|
2197
|
+
return `${await readFileIfPresent(paths.rotatedEventsFile)}${await readFileIfPresent(paths.eventsFile)}`;
|
|
2198
|
+
}
|
|
2199
|
+
const events = await listStoredIssueEvents({
|
|
2200
|
+
projectId: repository.projectId,
|
|
2201
|
+
issueId: repository.issueId,
|
|
2202
|
+
...repository.databaseOptions === void 0 ? {} : { databaseOptions: repository.databaseOptions }
|
|
2203
|
+
});
|
|
2204
|
+
return events.map((entry) => JSON.stringify(entry)).join("\n");
|
|
2205
|
+
}
|
|
2101
2206
|
async function maybeCreateSubIssues(issueNumber, plan, reportFile) {
|
|
2102
2207
|
if (getActiveResilienceConfig().decompose?.auto !== true) {
|
|
2103
2208
|
printInfo(`Nothing was split. Read ${reportFile} and decide.`);
|
|
@@ -2115,7 +2220,7 @@ async function maybeCreateSubIssues(issueNumber, plan, reportFile) {
|
|
|
2115
2220
|
printInfo("Nothing left to split: no pending story.");
|
|
2116
2221
|
return;
|
|
2117
2222
|
}
|
|
2118
|
-
const { runGenerate } = await import("./generate-
|
|
2223
|
+
const { runGenerate } = await import("./generate-QATMDKOK.js");
|
|
2119
2224
|
for (const proposal of proposals) {
|
|
2120
2225
|
const instruction = [
|
|
2121
2226
|
`Create a sub-issue of #${issueNumber}: ${proposal.title}.`,
|
|
@@ -2201,6 +2306,15 @@ async function pauseIssue(tasksFile, issueNumber) {
|
|
|
2201
2306
|
async function createSessionPublisher(input) {
|
|
2202
2307
|
const { paths, persistSnapshot, journalEnabled, webConfig, maxFileBytes } = input;
|
|
2203
2308
|
const surfaces = [];
|
|
2309
|
+
const repository = getPlanRepository(paths.tasksFile);
|
|
2310
|
+
if (repository !== void 0) {
|
|
2311
|
+
surfaces.push(
|
|
2312
|
+
new SqliteSessionPublisher(repository, {
|
|
2313
|
+
logLimit: webConfig.logLimit,
|
|
2314
|
+
includeLogs: webConfig.includeLogs
|
|
2315
|
+
})
|
|
2316
|
+
);
|
|
2317
|
+
}
|
|
2204
2318
|
if (persistSnapshot || journalEnabled) {
|
|
2205
2319
|
await mkdir3(paths.issueDir, { recursive: true });
|
|
2206
2320
|
}
|
|
@@ -2375,6 +2489,11 @@ function createPlanRunner(input, makeRunner) {
|
|
|
2375
2489
|
}),
|
|
2376
2490
|
"plan"
|
|
2377
2491
|
)();
|
|
2492
|
+
const repository = getPlanRepository(tasksPath);
|
|
2493
|
+
if (repository !== void 0 && existsSync(tasksPath)) {
|
|
2494
|
+
await ingestGeneratedPlan(repository);
|
|
2495
|
+
}
|
|
2496
|
+
await persistClosureChoice(tasksPath, input.closureChoice);
|
|
2378
2497
|
try {
|
|
2379
2498
|
const plan = await loadTaskPlan(tasksPath);
|
|
2380
2499
|
if (!effectiveNoBranch) {
|
|
@@ -2406,14 +2525,20 @@ function createPlanRunner(input, makeRunner) {
|
|
|
2406
2525
|
function createReviewRunner(input) {
|
|
2407
2526
|
const { issueNumber, tasksPath, publisher, resolvedIssue, queueCommitScope, executeRetry } = input;
|
|
2408
2527
|
return async () => {
|
|
2409
|
-
let maxCycles =
|
|
2528
|
+
let maxCycles = DEFAULT_MAX_CORRECTION_CYCLES;
|
|
2529
|
+
let cycle = 0;
|
|
2410
2530
|
try {
|
|
2411
2531
|
const plan = await loadTaskPlan(tasksPath);
|
|
2412
2532
|
maxCycles = plan.maxCorrectionCycles;
|
|
2533
|
+
cycle = plan.correctionCycle;
|
|
2413
2534
|
} catch {
|
|
2414
2535
|
}
|
|
2415
2536
|
let code = await runReview(issueNumber, resolvedIssue);
|
|
2416
|
-
|
|
2537
|
+
if (code !== 0 && (await loadTaskPlan(tasksPath)).lastError?.category === "review_protocol") {
|
|
2538
|
+
throw new Error(
|
|
2539
|
+
"Review returned an invalid result; resume review after correcting its output."
|
|
2540
|
+
);
|
|
2541
|
+
}
|
|
2417
2542
|
while (code !== 0 && cycle < maxCycles) {
|
|
2418
2543
|
cycle++;
|
|
2419
2544
|
printWarning(`Review failed. Starting correction cycle ${cycle}/${maxCycles}...`);
|
|
@@ -2426,6 +2551,7 @@ function createReviewRunner(input) {
|
|
|
2426
2551
|
}
|
|
2427
2552
|
const execCode = await runExecute(void 0, {
|
|
2428
2553
|
issue: issueNumber,
|
|
2554
|
+
inPipeline: true,
|
|
2429
2555
|
commitScope: queueCommitScope,
|
|
2430
2556
|
...executeRetry
|
|
2431
2557
|
});
|
|
@@ -2433,6 +2559,9 @@ function createReviewRunner(input) {
|
|
|
2433
2559
|
throw new Error("Correction execution failed");
|
|
2434
2560
|
}
|
|
2435
2561
|
code = await runReview(issueNumber, resolvedIssue);
|
|
2562
|
+
if (code !== 0 && (await loadTaskPlan(tasksPath)).lastError?.category === "review_protocol") {
|
|
2563
|
+
throw new Error("Review returned an invalid result; no correction was scheduled.");
|
|
2564
|
+
}
|
|
2436
2565
|
}
|
|
2437
2566
|
if (code !== 0) {
|
|
2438
2567
|
throw new Error(`Review failed after ${maxCycles} correction cycles`);
|
|
@@ -2493,18 +2622,25 @@ function buildInstrumentedPhaseRunners(input) {
|
|
|
2493
2622
|
execute: makeRunner(
|
|
2494
2623
|
() => runExecute(void 0, {
|
|
2495
2624
|
issue: issueNumber,
|
|
2625
|
+
inPipeline: true,
|
|
2496
2626
|
commitScope: queueCommitScope,
|
|
2497
2627
|
...executeRetry
|
|
2498
2628
|
}),
|
|
2499
2629
|
"execute"
|
|
2500
2630
|
),
|
|
2501
2631
|
review: createReviewRunner(input),
|
|
2502
|
-
pr:
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2632
|
+
pr: async () => {
|
|
2633
|
+
await makeRunner(
|
|
2634
|
+
// The options argument is omitted outside a queue so a standalone run
|
|
2635
|
+
// calls `runPr` exactly as it always did.
|
|
2636
|
+
() => finalPr === void 0 ? runPr(issueNumber, resolvedIssue) : runPr(issueNumber, resolvedIssue, { queue: finalPr }),
|
|
2637
|
+
"pr"
|
|
2638
|
+
)();
|
|
2639
|
+
const repository = getPlanRepository(tasksPath);
|
|
2640
|
+
if (repository !== void 0 && existsSync(tasksPath)) {
|
|
2641
|
+
await ingestGeneratedPlan(repository);
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2508
2644
|
};
|
|
2509
2645
|
const reviewBox = { outcome: null };
|
|
2510
2646
|
if (effectivePrReview) {
|
|
@@ -2596,6 +2732,13 @@ async function runPipelinePhases(issueNumber, paths, mode, publisher, input) {
|
|
|
2596
2732
|
queue
|
|
2597
2733
|
} = prepared;
|
|
2598
2734
|
let { producedBranch, plannedExecutionBranch, branchExistedBeforeExecution } = prepared;
|
|
2735
|
+
const closureChoice = queue ? void 0 : input.runOptions?.closeIssue;
|
|
2736
|
+
try {
|
|
2737
|
+
await persistClosureChoice(tasksPath, closureChoice);
|
|
2738
|
+
} catch (error) {
|
|
2739
|
+
if (error.code !== "ENOENT" && !String(error).includes("No SQLite task plan exists"))
|
|
2740
|
+
throw error;
|
|
2741
|
+
}
|
|
2599
2742
|
const startResolved = await resolveStartPhase({
|
|
2600
2743
|
from,
|
|
2601
2744
|
activePhases,
|
|
@@ -2626,7 +2769,8 @@ async function runPipelinePhases(issueNumber, paths, mode, publisher, input) {
|
|
|
2626
2769
|
effectivePrReview,
|
|
2627
2770
|
initialBranch,
|
|
2628
2771
|
queueCommitScope,
|
|
2629
|
-
branchState
|
|
2772
|
+
branchState,
|
|
2773
|
+
closureChoice
|
|
2630
2774
|
});
|
|
2631
2775
|
const phaseSuffixes = phaseSuffixesFor(agentSummary);
|
|
2632
2776
|
const result = await runPipelineWithRenderer({
|
|
@@ -2722,8 +2866,10 @@ async function runPipeline(issue, mode, from, noBranch, prReview, options = {})
|
|
|
2722
2866
|
}
|
|
2723
2867
|
|
|
2724
2868
|
export {
|
|
2869
|
+
persistClosureChoice,
|
|
2870
|
+
finishIssueClosure,
|
|
2725
2871
|
publishStorySeed,
|
|
2726
2872
|
publishIssueDetails,
|
|
2727
2873
|
runPipeline
|
|
2728
2874
|
};
|
|
2729
|
-
//# sourceMappingURL=chunk-
|
|
2875
|
+
//# sourceMappingURL=chunk-QJHZ3HYJ.js.map
|