issue-flow 0.16.0 → 0.17.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/dist/agent-TB6W7PT7.js +30 -0
- package/dist/{analyze-556KCJKZ.js → analyze-6M3KEOX7.js} +22 -22
- package/dist/{apply-WVV7G7WN.js → apply-ADB3ZK7W.js} +14 -14
- package/dist/{bench-UBFGKUHR.js → bench-FM7I7EIV.js} +23 -23
- package/dist/{chunk-YA6FWFYW.js → chunk-2SUFAE6X.js} +53 -11
- package/dist/chunk-2SUFAE6X.js.map +1 -0
- package/dist/{chunk-DBEMD34J.js → chunk-32JSYXEK.js} +8 -8
- package/dist/chunk-3R27MJ5R.js +25 -0
- package/dist/chunk-3R27MJ5R.js.map +1 -0
- package/dist/{chunk-QZOBR6YF.js → chunk-6YQT3SSM.js} +4 -4
- package/dist/chunk-6YQT3SSM.js.map +1 -0
- package/dist/{chunk-OGVWJO4S.js → chunk-7F7LGMVO.js} +3 -3
- package/dist/{chunk-X6GY3CM2.js → chunk-A4H7P7T7.js} +102 -102
- package/dist/chunk-A4H7P7T7.js.map +1 -0
- package/dist/{chunk-OGN2NX57.js → chunk-ANI2NTR4.js} +9 -9
- package/dist/{chunk-VK65RNFA.js → chunk-B3TSS7BT.js} +3 -3
- package/dist/chunk-D6ZBGJ3L.js +321 -0
- package/dist/chunk-D6ZBGJ3L.js.map +1 -0
- package/dist/{chunk-MXCOSPLJ.js → chunk-DGRTJD5R.js} +3 -3
- package/dist/{chunk-ROIIEVZH.js → chunk-DUS5ZNKL.js} +474 -361
- package/dist/chunk-DUS5ZNKL.js.map +1 -0
- package/dist/{chunk-VTF4RWS5.js → chunk-DV7HUC4Z.js} +7 -7
- package/dist/{chunk-OOX3RMD3.js → chunk-E6KXCV3T.js} +4 -4
- package/dist/{chunk-OLUOZLU5.js → chunk-HJBF4WD2.js} +1653 -1071
- package/dist/chunk-HJBF4WD2.js.map +1 -0
- package/dist/{chunk-4FUWWBTP.js → chunk-HLAPOUEM.js} +8 -8
- package/dist/{chunk-J2LJB2OH.js → chunk-HY5HLFDU.js} +630 -571
- package/dist/chunk-HY5HLFDU.js.map +1 -0
- package/dist/{chunk-QVLIIGBU.js → chunk-ICM463EO.js} +60 -13
- package/dist/chunk-ICM463EO.js.map +1 -0
- package/dist/{chunk-KV2K7MK2.js → chunk-ISZ54SVE.js} +9 -9
- package/dist/{chunk-GV2DABNZ.js → chunk-KZ5EY5XX.js} +12 -12
- package/dist/{chunk-SW2MF47D.js → chunk-KZXQWC7U.js} +19 -19
- package/dist/{chunk-2H43OVTU.js → chunk-LPWPFIIB.js} +11 -11
- package/dist/{chunk-EPFC4LHT.js → chunk-MI5TREN3.js} +9 -9
- package/dist/{chunk-R42YHLDV.js → chunk-PPZ3K4YM.js} +2 -2
- package/dist/{chunk-H3EYBJZU.js → chunk-QMIQR7EE.js} +10 -10
- package/dist/{chunk-FKWYD44M.js → chunk-QPGEFLMY.js} +2 -2
- package/dist/chunk-RCZJQUTC.js +196 -0
- package/dist/chunk-RCZJQUTC.js.map +1 -0
- package/dist/{chunk-NQCR3HSU.js → chunk-RNFUVKC3.js} +3 -3
- package/dist/{chunk-G5LACAXO.js → chunk-RYOUZ6EK.js} +2 -2
- package/dist/{chunk-BSBJXPLC.js → chunk-SGTTR4XW.js} +10 -10
- package/dist/{chunk-GVOZ6NDO.js → chunk-SOM4QA6C.js} +3 -3
- package/dist/{chunk-73TS2H42.js → chunk-UK4E2FUA.js} +132 -34
- package/dist/chunk-UK4E2FUA.js.map +1 -0
- package/dist/{chunk-PGN2VX4Y.js → chunk-UWDCIFTP.js} +7 -7
- package/dist/{chunk-MCLPSL6B.js → chunk-VE3IYNDN.js} +3 -3
- package/dist/{chunk-IAMIBZRF.js → chunk-WCCZJL7W.js} +2 -2
- package/dist/{chunk-SVDEWOUD.js → chunk-XZUEFTUP.js} +6 -6
- package/dist/{chunk-GPLP7EPL.js → chunk-YII4U7ZD.js} +10 -10
- package/dist/{chunk-GPLP7EPL.js.map → chunk-YII4U7ZD.js.map} +1 -1
- package/dist/{chunk-WLJVL25O.js → chunk-YUNBOUQH.js} +6 -6
- package/dist/{chunk-WNROH2YE.js → chunk-YVPZUN6X.js} +2 -2
- package/dist/{chunk-Q2TZA6AC.js → chunk-Z5O2XBWA.js} +14 -14
- package/dist/cli.js +57 -49
- package/dist/cli.js.map +1 -1
- package/dist/{config-UE7IP36J.js → config-KGZUPAUP.js} +13 -13
- package/dist/{conventions-Z3QC2NSG.js → conventions-RYN7OXJN.js} +15 -15
- package/dist/{diagnostics-2Z5HFQOO.js → diagnostics-HTCWF7F4.js} +7 -7
- package/dist/execute-QL3ZQIAP.js +37 -0
- package/dist/{generate-PB4L7V5N.js → generate-CX6KNHZS.js} +22 -22
- package/dist/{git-7MUOGVRG.js → git-A2IP32PQ.js} +2 -2
- package/dist/init-PDVQDRS6.js +24 -0
- package/dist/{operations-QDJAFZUN.js → operations-CAKIT2BO.js} +15 -15
- package/dist/{permissions-XVXXENVP.js → permissions-G4XCAESF.js} +4 -4
- package/dist/plan-PRORGS3L.js +34 -0
- package/dist/{policy-6WQZB6B2.js → policy-WX6O2JID.js} +14 -14
- package/dist/pr-27RMQI5F.js +39 -0
- package/dist/pr-review-VNESMAMT.js +32 -0
- package/dist/prd-ZNC4T5BS.js +33 -0
- package/dist/{ps-CX7756QG.js → ps-76L6ZAZL.js} +12 -12
- package/dist/{recorder-RK6XZYF3.js → recorder-N7U66HCO.js} +7 -7
- package/dist/{registry-POSB35Q4.js → registry-XLHHYLTR.js} +5 -5
- package/dist/{resume-OQJZV3JH.js → resume-VLWIE264.js} +39 -38
- package/dist/{resume-OQJZV3JH.js.map → resume-VLWIE264.js.map} +1 -1
- package/dist/review-7CREJDKB.js +35 -0
- package/dist/routing-VCDYHSXA.js +33 -0
- package/dist/run-3MPORLF5.js +56 -0
- package/dist/{session-publisher-VVXOCJ2S.js → session-publisher-KAJQRHNZ.js} +3 -2
- package/dist/{state-manager-TIC73GQY.js → state-manager-UPHO2EA2.js} +4 -4
- package/dist/state-manager-UPHO2EA2.js.map +1 -0
- package/dist/{usage-WDDNSIHP.js → usage-U7QNGCPK.js} +12 -12
- package/dist/{web-IPGY52AK.js → web-HUNDHCJ4.js} +20 -18
- package/dist/{web-IPGY52AK.js.map → web-HUNDHCJ4.js.map} +1 -1
- package/package.json +6 -5
- package/web/AGENTS.md +10 -11
- package/web/public/app.css +38 -0
- package/web/public/app.js +277 -56
- package/dist/agent-PMWCDWOW.js +0 -30
- package/dist/chunk-73TS2H42.js.map +0 -1
- package/dist/chunk-7Z4Y3VKM.js +0 -26
- package/dist/chunk-7Z4Y3VKM.js.map +0 -1
- package/dist/chunk-AOAQU7PD.js +0 -180
- package/dist/chunk-AOAQU7PD.js.map +0 -1
- package/dist/chunk-J2LJB2OH.js.map +0 -1
- package/dist/chunk-OLUOZLU5.js.map +0 -1
- package/dist/chunk-QVLIIGBU.js.map +0 -1
- package/dist/chunk-QZOBR6YF.js.map +0 -1
- package/dist/chunk-ROIIEVZH.js.map +0 -1
- package/dist/chunk-X6GY3CM2.js.map +0 -1
- package/dist/chunk-YA6FWFYW.js.map +0 -1
- package/dist/execute-QYLJ5L4T.js +0 -36
- package/dist/init-XBERAZ4O.js +0 -24
- package/dist/plan-RXOW32KY.js +0 -34
- package/dist/pr-3WFYAVA7.js +0 -39
- package/dist/pr-review-RK63ZEMM.js +0 -32
- package/dist/prd-LRV6IW3E.js +0 -33
- package/dist/review-AEFISJZD.js +0 -35
- package/dist/routing-EA5NJGNU.js +0 -94
- package/dist/routing-EA5NJGNU.js.map +0 -1
- package/dist/run-HSC7R33Y.js +0 -55
- /package/dist/{agent-PMWCDWOW.js.map → agent-TB6W7PT7.js.map} +0 -0
- /package/dist/{analyze-556KCJKZ.js.map → analyze-6M3KEOX7.js.map} +0 -0
- /package/dist/{apply-WVV7G7WN.js.map → apply-ADB3ZK7W.js.map} +0 -0
- /package/dist/{bench-UBFGKUHR.js.map → bench-FM7I7EIV.js.map} +0 -0
- /package/dist/{chunk-DBEMD34J.js.map → chunk-32JSYXEK.js.map} +0 -0
- /package/dist/{chunk-OGVWJO4S.js.map → chunk-7F7LGMVO.js.map} +0 -0
- /package/dist/{chunk-OGN2NX57.js.map → chunk-ANI2NTR4.js.map} +0 -0
- /package/dist/{chunk-VK65RNFA.js.map → chunk-B3TSS7BT.js.map} +0 -0
- /package/dist/{chunk-MXCOSPLJ.js.map → chunk-DGRTJD5R.js.map} +0 -0
- /package/dist/{chunk-VTF4RWS5.js.map → chunk-DV7HUC4Z.js.map} +0 -0
- /package/dist/{chunk-OOX3RMD3.js.map → chunk-E6KXCV3T.js.map} +0 -0
- /package/dist/{chunk-4FUWWBTP.js.map → chunk-HLAPOUEM.js.map} +0 -0
- /package/dist/{chunk-KV2K7MK2.js.map → chunk-ISZ54SVE.js.map} +0 -0
- /package/dist/{chunk-GV2DABNZ.js.map → chunk-KZ5EY5XX.js.map} +0 -0
- /package/dist/{chunk-SW2MF47D.js.map → chunk-KZXQWC7U.js.map} +0 -0
- /package/dist/{chunk-2H43OVTU.js.map → chunk-LPWPFIIB.js.map} +0 -0
- /package/dist/{chunk-EPFC4LHT.js.map → chunk-MI5TREN3.js.map} +0 -0
- /package/dist/{chunk-R42YHLDV.js.map → chunk-PPZ3K4YM.js.map} +0 -0
- /package/dist/{chunk-H3EYBJZU.js.map → chunk-QMIQR7EE.js.map} +0 -0
- /package/dist/{chunk-FKWYD44M.js.map → chunk-QPGEFLMY.js.map} +0 -0
- /package/dist/{chunk-NQCR3HSU.js.map → chunk-RNFUVKC3.js.map} +0 -0
- /package/dist/{chunk-G5LACAXO.js.map → chunk-RYOUZ6EK.js.map} +0 -0
- /package/dist/{chunk-BSBJXPLC.js.map → chunk-SGTTR4XW.js.map} +0 -0
- /package/dist/{chunk-GVOZ6NDO.js.map → chunk-SOM4QA6C.js.map} +0 -0
- /package/dist/{chunk-PGN2VX4Y.js.map → chunk-UWDCIFTP.js.map} +0 -0
- /package/dist/{chunk-MCLPSL6B.js.map → chunk-VE3IYNDN.js.map} +0 -0
- /package/dist/{chunk-IAMIBZRF.js.map → chunk-WCCZJL7W.js.map} +0 -0
- /package/dist/{chunk-SVDEWOUD.js.map → chunk-XZUEFTUP.js.map} +0 -0
- /package/dist/{chunk-WLJVL25O.js.map → chunk-YUNBOUQH.js.map} +0 -0
- /package/dist/{chunk-WNROH2YE.js.map → chunk-YVPZUN6X.js.map} +0 -0
- /package/dist/{chunk-Q2TZA6AC.js.map → chunk-Z5O2XBWA.js.map} +0 -0
- /package/dist/{config-UE7IP36J.js.map → config-KGZUPAUP.js.map} +0 -0
- /package/dist/{conventions-Z3QC2NSG.js.map → conventions-RYN7OXJN.js.map} +0 -0
- /package/dist/{diagnostics-2Z5HFQOO.js.map → diagnostics-HTCWF7F4.js.map} +0 -0
- /package/dist/{execute-QYLJ5L4T.js.map → execute-QL3ZQIAP.js.map} +0 -0
- /package/dist/{generate-PB4L7V5N.js.map → generate-CX6KNHZS.js.map} +0 -0
- /package/dist/{git-7MUOGVRG.js.map → git-A2IP32PQ.js.map} +0 -0
- /package/dist/{init-XBERAZ4O.js.map → init-PDVQDRS6.js.map} +0 -0
- /package/dist/{operations-QDJAFZUN.js.map → operations-CAKIT2BO.js.map} +0 -0
- /package/dist/{permissions-XVXXENVP.js.map → permissions-G4XCAESF.js.map} +0 -0
- /package/dist/{plan-RXOW32KY.js.map → plan-PRORGS3L.js.map} +0 -0
- /package/dist/{policy-6WQZB6B2.js.map → policy-WX6O2JID.js.map} +0 -0
- /package/dist/{pr-3WFYAVA7.js.map → pr-27RMQI5F.js.map} +0 -0
- /package/dist/{pr-review-RK63ZEMM.js.map → pr-review-VNESMAMT.js.map} +0 -0
- /package/dist/{prd-LRV6IW3E.js.map → prd-ZNC4T5BS.js.map} +0 -0
- /package/dist/{ps-CX7756QG.js.map → ps-76L6ZAZL.js.map} +0 -0
- /package/dist/{recorder-RK6XZYF3.js.map → recorder-N7U66HCO.js.map} +0 -0
- /package/dist/{registry-POSB35Q4.js.map → registry-XLHHYLTR.js.map} +0 -0
- /package/dist/{review-AEFISJZD.js.map → review-7CREJDKB.js.map} +0 -0
- /package/dist/{run-HSC7R33Y.js.map → routing-VCDYHSXA.js.map} +0 -0
- /package/dist/{session-publisher-VVXOCJ2S.js.map → run-3MPORLF5.js.map} +0 -0
- /package/dist/{state-manager-TIC73GQY.js.map → session-publisher-KAJQRHNZ.js.map} +0 -0
- /package/dist/{usage-WDDNSIHP.js.map → usage-U7QNGCPK.js.map} +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
publishIssueDetails,
|
|
4
|
+
publishStorySeed,
|
|
5
|
+
runPipeline
|
|
6
|
+
} from "./chunk-HJBF4WD2.js";
|
|
7
|
+
import "./chunk-B3TSS7BT.js";
|
|
8
|
+
import "./chunk-LPWPFIIB.js";
|
|
9
|
+
import "./chunk-Z5O2XBWA.js";
|
|
10
|
+
import "./chunk-YUNBOUQH.js";
|
|
11
|
+
import "./chunk-ANI2NTR4.js";
|
|
12
|
+
import "./chunk-MI5TREN3.js";
|
|
13
|
+
import "./chunk-A4H7P7T7.js";
|
|
14
|
+
import "./chunk-ISZ54SVE.js";
|
|
15
|
+
import "./chunk-KZXQWC7U.js";
|
|
16
|
+
import "./chunk-2SUFAE6X.js";
|
|
17
|
+
import "./chunk-6YQT3SSM.js";
|
|
18
|
+
import "./chunk-SGTTR4XW.js";
|
|
19
|
+
import "./chunk-CRGIQFUQ.js";
|
|
20
|
+
import "./chunk-L6HSKTQE.js";
|
|
21
|
+
import "./chunk-UWDCIFTP.js";
|
|
22
|
+
import "./chunk-RCZJQUTC.js";
|
|
23
|
+
import "./chunk-KZ5EY5XX.js";
|
|
24
|
+
import "./chunk-32JSYXEK.js";
|
|
25
|
+
import "./chunk-VE3IYNDN.js";
|
|
26
|
+
import "./chunk-QMIQR7EE.js";
|
|
27
|
+
import "./chunk-KMMASOA6.js";
|
|
28
|
+
import "./chunk-HLAPOUEM.js";
|
|
29
|
+
import "./chunk-7F7LGMVO.js";
|
|
30
|
+
import "./chunk-UK4E2FUA.js";
|
|
31
|
+
import "./chunk-WCCZJL7W.js";
|
|
32
|
+
import "./chunk-DGRTJD5R.js";
|
|
33
|
+
import "./chunk-D6ZBGJ3L.js";
|
|
34
|
+
import "./chunk-C5TL7T4V.js";
|
|
35
|
+
import "./chunk-3D4A4B46.js";
|
|
36
|
+
import "./chunk-E6KXCV3T.js";
|
|
37
|
+
import "./chunk-HY5HLFDU.js";
|
|
38
|
+
import "./chunk-DV7HUC4Z.js";
|
|
39
|
+
import "./chunk-XZUEFTUP.js";
|
|
40
|
+
import "./chunk-QPGEFLMY.js";
|
|
41
|
+
import "./chunk-HAKDLR6N.js";
|
|
42
|
+
import "./chunk-YVPZUN6X.js";
|
|
43
|
+
import "./chunk-DUS5ZNKL.js";
|
|
44
|
+
import "./chunk-YII4U7ZD.js";
|
|
45
|
+
import "./chunk-PPZ3K4YM.js";
|
|
46
|
+
import "./chunk-SOM4QA6C.js";
|
|
47
|
+
import "./chunk-ICM463EO.js";
|
|
48
|
+
import "./chunk-XEYH6ZZI.js";
|
|
49
|
+
import "./chunk-P3LRUNC6.js";
|
|
50
|
+
import "./chunk-3R27MJ5R.js";
|
|
51
|
+
export {
|
|
52
|
+
publishIssueDetails,
|
|
53
|
+
publishStorySeed,
|
|
54
|
+
runPipeline
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=run-3MPORLF5.js.map
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getSessionPublisher,
|
|
4
4
|
setSessionPublisher
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DUS5ZNKL.js";
|
|
6
6
|
import "./chunk-P3LRUNC6.js";
|
|
7
|
+
import "./chunk-3R27MJ5R.js";
|
|
7
8
|
export {
|
|
8
9
|
getSessionPublisher,
|
|
9
10
|
setSessionPublisher
|
|
10
11
|
};
|
|
11
|
-
//# sourceMappingURL=session-publisher-
|
|
12
|
+
//# sourceMappingURL=session-publisher-KAJQRHNZ.js.map
|
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
selectActiveStory,
|
|
15
15
|
setLastError,
|
|
16
16
|
trimErrorMessage
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-SOM4QA6C.js";
|
|
18
|
+
import "./chunk-ICM463EO.js";
|
|
19
|
+
import "./chunk-3R27MJ5R.js";
|
|
20
20
|
export {
|
|
21
21
|
allStoriesPass,
|
|
22
22
|
applyStoryMetrics,
|
|
@@ -33,4 +33,4 @@ export {
|
|
|
33
33
|
setLastError,
|
|
34
34
|
trimErrorMessage
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=state-manager-
|
|
36
|
+
//# sourceMappingURL=state-manager-UPHO2EA2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -5,28 +5,28 @@ import {
|
|
|
5
5
|
} from "./chunk-CRGIQFUQ.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveProjectPaths
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DV7HUC4Z.js";
|
|
9
9
|
import {
|
|
10
10
|
printError,
|
|
11
11
|
printInfo
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-FKWYD44M.js";
|
|
12
|
+
} from "./chunk-XZUEFTUP.js";
|
|
13
|
+
import "./chunk-QPGEFLMY.js";
|
|
15
14
|
import {
|
|
16
15
|
getIssuePaths
|
|
17
16
|
} from "./chunk-HAKDLR6N.js";
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-YVPZUN6X.js";
|
|
18
|
+
import "./chunk-DUS5ZNKL.js";
|
|
19
19
|
import {
|
|
20
20
|
discardedExecutionCount
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-R42YHLDV.js";
|
|
21
|
+
} from "./chunk-YII4U7ZD.js";
|
|
22
|
+
import "./chunk-PPZ3K4YM.js";
|
|
24
23
|
import {
|
|
25
24
|
loadTaskPlan
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-7Z4Y3VKM.js";
|
|
25
|
+
} from "./chunk-SOM4QA6C.js";
|
|
26
|
+
import "./chunk-ICM463EO.js";
|
|
29
27
|
import "./chunk-XEYH6ZZI.js";
|
|
28
|
+
import "./chunk-P3LRUNC6.js";
|
|
29
|
+
import "./chunk-3R27MJ5R.js";
|
|
30
30
|
|
|
31
31
|
// src/commands/usage.ts
|
|
32
32
|
import { readdir } from "fs/promises";
|
|
@@ -174,4 +174,4 @@ export {
|
|
|
174
174
|
formatUsageReport,
|
|
175
175
|
runUsage
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=usage-
|
|
177
|
+
//# sourceMappingURL=usage-U7QNGCPK.js.map
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readSessionFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RYOUZ6EK.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureSingleWebServer,
|
|
7
7
|
stopWebMonitor
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2SUFAE6X.js";
|
|
9
|
+
import "./chunk-UWDCIFTP.js";
|
|
10
|
+
import "./chunk-RCZJQUTC.js";
|
|
11
|
+
import "./chunk-7F7LGMVO.js";
|
|
11
12
|
import {
|
|
12
13
|
parseJournal
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WCCZJL7W.js";
|
|
15
|
+
import "./chunk-D6ZBGJ3L.js";
|
|
14
16
|
import "./chunk-C5TL7T4V.js";
|
|
15
17
|
import {
|
|
16
18
|
loadWebConfig
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-FKWYD44M.js";
|
|
19
|
+
} from "./chunk-HY5HLFDU.js";
|
|
20
|
+
import "./chunk-DV7HUC4Z.js";
|
|
21
|
+
import "./chunk-XZUEFTUP.js";
|
|
22
|
+
import "./chunk-QPGEFLMY.js";
|
|
22
23
|
import {
|
|
23
24
|
EVENTS_FILENAME,
|
|
24
25
|
ISSUES_DIR_NAME,
|
|
@@ -27,14 +28,15 @@ import {
|
|
|
27
28
|
SESSION_FILENAME,
|
|
28
29
|
getGlobalRoot
|
|
29
30
|
} from "./chunk-HAKDLR6N.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-7Z4Y3VKM.js";
|
|
31
|
+
import "./chunk-YVPZUN6X.js";
|
|
32
|
+
import "./chunk-DUS5ZNKL.js";
|
|
33
|
+
import "./chunk-YII4U7ZD.js";
|
|
34
|
+
import "./chunk-PPZ3K4YM.js";
|
|
35
|
+
import "./chunk-SOM4QA6C.js";
|
|
36
|
+
import "./chunk-ICM463EO.js";
|
|
37
37
|
import "./chunk-XEYH6ZZI.js";
|
|
38
|
+
import "./chunk-P3LRUNC6.js";
|
|
39
|
+
import "./chunk-3R27MJ5R.js";
|
|
38
40
|
|
|
39
41
|
// src/web/session-directory.ts
|
|
40
42
|
import { readdir, readFile } from "fs/promises";
|
|
@@ -167,4 +169,4 @@ export {
|
|
|
167
169
|
runWebServe,
|
|
168
170
|
runWebStop
|
|
169
171
|
};
|
|
170
|
-
//# sourceMappingURL=web-
|
|
172
|
+
//# sourceMappingURL=web-HUNDHCJ4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/web/session-directory.ts","../src/commands/web.ts"],"sourcesContent":["import { readdir, readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { type JournalEntry, parseJournal } from '../core/journal.js';\nimport type { ValidatedSessionSnapshot } from '../schemas.js';\nimport {\n EVENTS_FILENAME,\n type GetGlobalRootOptions,\n getGlobalRoot,\n ISSUES_DIR_NAME,\n PROJECTS_DIR_NAME,\n ROTATED_EVENTS_FILENAME,\n SESSION_FILENAME,\n} from '../storage/paths.js';\nimport { readSessionFile } from '../storage/session-file.js';\n\n/**\n * Multi-session discovery for the web monitoring server (US-003).\n *\n * The single-instance server (`web/lock.ts`) runs decoupled from any one\n * pipeline invocation, so it cannot hold a `SessionPublisher` in memory for\n * \"the\" run being monitored — there may be zero, one or several running at\n * once, each in its own process. Instead this module polls every\n * `~/.issue-flow/projects/<project>/issues/<n>/session.json` on disk (the\n * same file `FilePublisher` already writes) and keeps an in-memory map of the\n * ones that are both well-formed and recently updated.\n *\n * Polling rather than `fs.watch` is a deliberate choice, not a placeholder:\n * `fs.watch`'s `recursive` option is only reliable on macOS and Windows (Linux\n * needs a manual per-directory watch tree, and the whole thing still degrades\n * to polling on network filesystems), while a `~/.issue-flow` tree is small\n * and local — a cheap poll of it is simpler and behaves identically on every\n * platform, which is what the US-003 acceptance criteria ask to validate.\n */\n\n/** How often the directory tree is rescanned, unless overridden. */\nexport const DEFAULT_POLL_INTERVAL_MS = 3000;\n\n/**\n * A session stops being reported once its file has gone this long without an\n * update. `FilePublisher` touches a live session every 10s without rewriting\n * its content. Three missed heartbeats plus ample scheduling/filesystem slack\n * avoid flapping while still removing an abruptly killed run promptly.\n */\nexport const DEFAULT_STALE_AFTER_MS = 90_000;\n\nexport interface ActiveSession {\n /** Directory the session.json was read from, one level up from the file. */\n issueDir: string;\n filePath: string;\n snapshot: ValidatedSessionSnapshot;\n /** mtime of the file at the last successful read, in epoch ms. */\n updatedAtMs: number;\n}\n\nexport interface SessionDirectoryOptions extends GetGlobalRootOptions {\n /** Poll interval, in ms. Default {@link DEFAULT_POLL_INTERVAL_MS}. */\n pollIntervalMs?: number;\n /** Staleness threshold, in ms. Default {@link DEFAULT_STALE_AFTER_MS}. */\n staleAfterMs?: number;\n /** Invoked (at most once) when a poll fails unexpectedly. Best-effort logging only. */\n onWarn?: (message: string) => void;\n}\n\nexport interface SessionDirectoryHandle {\n /** Snapshot of every session currently considered active. */\n sessions(): ActiveSession[];\n /** A single active session by id, or undefined. */\n getSession(sessionId: string): ActiveSession | undefined;\n /** Journal entries for one active session, oldest generation first. */\n events(sessionId: string): Promise<JournalEntry[] | undefined>;\n /** Force an immediate rescan instead of waiting for the next tick. Never throws. */\n refresh(): Promise<void>;\n /** Stop polling. Idempotent. */\n close(): void;\n}\n\nasync function listSubdirectories(dir: string): Promise<string[]> {\n try {\n const entries = await readdir(dir, { withFileTypes: true });\n // Symlinks are skipped on purpose, same discipline as the storage\n // migration walk: following one could pull session data from outside the\n // global tree into the listing.\n return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);\n } catch {\n // Missing/unreadable projects (or issues) directory reads as \"none yet\" —\n // this is routinely the case before the first --web run ever happens.\n return [];\n }\n}\n\n/** Every `session.json` path currently on disk, one per project/issue pair. */\nasync function discoverSessionFiles(root: string): Promise<string[]> {\n const projectsDir = join(root, PROJECTS_DIR_NAME);\n const projectIds = await listSubdirectories(projectsDir);\n\n const perProject = await Promise.all(\n projectIds.map(async (projectId) => {\n const issuesDir = join(projectsDir, projectId, ISSUES_DIR_NAME);\n const issueIds = await listSubdirectories(issuesDir);\n return issueIds.map((issueId) => join(issuesDir, issueId, SESSION_FILENAME));\n }),\n );\n\n return perProject.flat();\n}\n\nasync function readJournalFile(filePath: string): Promise<JournalEntry[]> {\n try {\n return parseJournal(await readFile(filePath, 'utf-8'));\n } catch {\n return [];\n }\n}\n\n/**\n * Start polling the global storage tree for active sessions.\n *\n * Returns a handle immediately; the first scan happens synchronously in the\n * background and `sessions()` answers `[]` until it completes, same as \"no\n * sessions found yet\" — there is nothing to await here that would not also\n * delay the server's very first bind.\n */\nexport function watchSessionDirectory(\n options: SessionDirectoryOptions = {},\n): SessionDirectoryHandle {\n const root = getGlobalRoot(options);\n const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;\n const staleAfterMs = options.staleAfterMs ?? DEFAULT_STALE_AFTER_MS;\n const warn = options.onWarn;\n\n // Keyed by sessionId, not by file path: a session's identity is the id\n // inside its content, and that is what /api/status?session=<id> looks up.\n let sessions = new Map<string, ActiveSession>();\n let warned = false;\n\n async function scan(): Promise<void> {\n let files: string[];\n try {\n files = await discoverSessionFiles(root);\n } catch (err) {\n if (!warned) {\n warned = true;\n warn?.(\n `issue-flow: web monitor could not scan the session directory (will keep retrying silently): ${\n err instanceof Error ? err.message : String(err)\n }`,\n );\n }\n return;\n }\n\n const now = Date.now();\n const next = new Map<string, ActiveSession>();\n for (const filePath of files) {\n const result = await readSessionFile(filePath);\n if (result === null) continue;\n if (now - result.updatedAtMs > staleAfterMs) continue; // stopped updating: not active\n const sessionId = result.snapshot.sessionId as string;\n next.set(sessionId, {\n issueDir: join(filePath, '..'),\n filePath,\n snapshot: result.snapshot,\n updatedAtMs: result.updatedAtMs,\n });\n }\n sessions = next;\n }\n\n // The first scan runs immediately (not just after the first interval tick)\n // so a server started right after a session begins does not report \"no\n // sessions\" for a whole poll interval.\n void scan();\n const timer = setInterval(() => void scan(), pollIntervalMs);\n timer.unref();\n\n return {\n sessions: () => [...sessions.values()],\n getSession: (sessionId: string) => sessions.get(sessionId),\n events: async (sessionId: string) => {\n const session = sessions.get(sessionId);\n if (session === undefined) return undefined;\n const [rotated, current] = await Promise.all([\n readJournalFile(join(session.issueDir, ROTATED_EVENTS_FILENAME)),\n readJournalFile(join(session.issueDir, EVENTS_FILENAME)),\n ]);\n return [...rotated, ...current];\n },\n refresh: scan,\n close: () => clearInterval(timer),\n };\n}\n","import { loadWebConfig } from '../config.js';\nimport type { WebConfig } from '../schemas.js';\nimport { ensureSingleWebServer, stopWebMonitor } from '../web/lock.js';\nimport { watchSessionDirectory } from '../web/session-directory.js';\n\n/**\n * `issue-flow web serve` / `issue-flow web stop` (US-002).\n *\n * `serve` is the process `ensureWebMonitor()` (`web/lock.ts`) spawns detached\n * — it is not meant to be run interactively, though nothing stops a user from\n * doing so to watch every session on the machine without going through a\n * pipeline command first. It never exits on its own: the server stays bound\n * (see `unref: false` in `web/server.ts`) until `stop` sends it `SIGTERM`, at\n * which point `startWebServer`'s own signal handler closes it (removing the\n * lock) and re-raises the signal for the default termination behavior.\n */\n\nexport interface RunWebServeOptions {\n port?: number;\n host?: string;\n refresh?: number;\n}\n\n/**\n * Bind (or defer to) the single web monitor instance and keep the process\n * alive for as long as it stays bound. Logging is intentionally silent on the\n * happy path: this process is spawned with `stdio: 'ignore'`, so anything\n * printed here goes nowhere — the caller (`ensureWebMonitor`) is the one that\n * tells the user the server is up.\n */\nexport async function runWebServe(options: RunWebServeOptions): Promise<number> {\n // Built conditionally, not `{ port: options.port, ... }`: loadWebConfig()\n // spreads this object directly over the lower-precedence layers, and an\n // explicit `undefined` value would overwrite an env/.issue-flow.json\n // setting instead of falling through to it (only an *absent* key does).\n const cli: Partial<WebConfig> = {};\n if (options.port !== undefined) cli.port = options.port;\n if (options.host !== undefined) cli.host = options.host;\n if (options.refresh !== undefined) cli.refreshSeconds = options.refresh;\n const webConfig = await loadWebConfig({ cli });\n\n const sessions = watchSessionDirectory();\n\n const noop = (): void => {};\n const handle = await ensureSingleWebServer({\n sessions,\n port: webConfig.port,\n host: webConfig.host,\n refreshSeconds: webConfig.refreshSeconds,\n unref: false,\n info: noop,\n warn: noop,\n });\n\n if (handle === null) {\n sessions.close();\n return 1;\n }\n\n if (handle.server === undefined) {\n // Another instance already won the race (or was already running by the\n // time this process got here): nothing to serve, so it exits right away\n // instead of idling as a redundant detached process.\n sessions.close();\n return 0;\n }\n\n const originalClose = handle.close;\n handle.close = async () => {\n await originalClose();\n sessions.close();\n };\n\n return 0;\n}\n\n/** Stop the single running web monitor instance, if any. */\nexport async function runWebStop(): Promise<number> {\n const webConfig = await loadWebConfig();\n const result = await stopWebMonitor({ port: webConfig.port, host: webConfig.host });\n return result === 'failed' || result === 'unowned' ? 1 : 0;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS,gBAAgB;AAClC,SAAS,YAAY;AAkCd,IAAM,2BAA2B;AAQjC,IAAM,yBAAyB;AAiCtC,eAAe,mBAAmB,KAAgC;AAChE,MAAI;AACF,UAAM,UAAU,MAAM,QAAQ,KAAK,EAAE,eAAe,KAAK,CAAC;AAI1D,WAAO,QAAQ,OAAO,CAAC,UAAU,MAAM,YAAY,CAAC,EAAE,IAAI,CAAC,UAAU,MAAM,IAAI;AAAA,EACjF,QAAQ;AAGN,WAAO,CAAC;AAAA,EACV;AACF;AAGA,eAAe,qBAAqB,MAAiC;AACnE,QAAM,cAAc,KAAK,MAAM,iBAAiB;AAChD,QAAM,aAAa,MAAM,mBAAmB,WAAW;AAEvD,QAAM,aAAa,MAAM,QAAQ;AAAA,IAC/B,WAAW,IAAI,OAAO,cAAc;AAClC,YAAM,YAAY,KAAK,aAAa,WAAW,eAAe;AAC9D,YAAM,WAAW,MAAM,mBAAmB,SAAS;AACnD,aAAO,SAAS,IAAI,CAAC,YAAY,KAAK,WAAW,SAAS,gBAAgB,CAAC;AAAA,IAC7E,CAAC;AAAA,EACH;AAEA,SAAO,WAAW,KAAK;AACzB;AAEA,eAAe,gBAAgB,UAA2C;AACxE,MAAI;AACF,WAAO,aAAa,MAAM,SAAS,UAAU,OAAO,CAAC;AAAA,EACvD,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;AAUO,SAAS,sBACd,UAAmC,CAAC,GACZ;AACxB,QAAM,OAAO,cAAc,OAAO;AAClC,QAAM,iBAAiB,QAAQ,kBAAk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AC;AACD,aAAO,CAAC,GAAG,SAAS,GAAG,OAAO;AAAA,IAChC;AAAA,IACA,SAAS;AAAA,IACT,OAAO,MAAM,cAAc,KAAK;AAAA,EAClC;AACF;;;AChKA,eAAsB,YAAY,SAA8C;AAK9E,QAAM,MAA0B,CAAC;AACjC,MAAI,QAAQ,SAAS,OAAW,KAAI,OAAO,QAAQ;AACnD,MAAI,QAAQ,SAAS,OAAW,KAAI,OAAO,QAAQ;AACnD,MAAI,QAAQ,YAAY,OAAW,KAAI,iBAAiB,QAAQ;AAChE,QAAM,YAAY,MAAM,cAAc,EAAE,IAAI,CAAC;AAE7C,QAAM,WAAW,sBAAsB;AAEvC,QAAM,OAAO,MAAY;AAAA,EAAC;AAC1B,QAAM,SAAS,MAAM,sBAAsB;AAAA,IACzC;AAAA,IACA,MAAM,UAAU;AAAA,IAChB,MAAM,UAAU;AAAA,IAChB,gBAAgB,UAAU;AAAA,IAC1B,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EACR,CAAC;AAED,MAAI,WAAW,MAAM;AACnB,aAAS,MAAM;AACf,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,WAAW,QAAW;AAI/B,aAAS,MAAM;AACf,WAAO;AAAA,EACT;AAEA,QAAM,gBAAgB,OAAO;AAC7B,SAAO,QAAQ,YAAY;AACzB,UAAM,cAAc;AACpB,aAAS,MAAM;AAAA,EACjB;AAEA,SAAO;AACT;AAGA,eAAsB,aAA8B;AAClD,QAAM,YAAY,MAAM,cAAc;AACtC,QAAM,SAAS,MAAM,eAAe,EAAE,MAAM,UAAU,MAAM,MAAM,UAAU,KAAK,CAAC;AAClF,SAAO,WAAW,YAAY,WAAW,YAAY,IAAI;AAC3D;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/web/session-directory.ts","../src/commands/web.ts"],"sourcesContent":["import { readdir, readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { type JournalEntry, parseJournal } from '../core/journal.js';\nimport type { ValidatedSessionSnapshot } from '../schemas.js';\nimport {\n EVENTS_FILENAME,\n type GetGlobalRootOptions,\n getGlobalRoot,\n ISSUES_DIR_NAME,\n PROJECTS_DIR_NAME,\n ROTATED_EVENTS_FILENAME,\n SESSION_FILENAME,\n} from '../storage/paths.js';\nimport { readSessionFile } from '../storage/session-file.js';\n\n/**\n * Multi-session discovery for the web monitoring server (US-003).\n *\n * The single-instance server (`web/lock.ts`) runs decoupled from any one\n * pipeline invocation, so it cannot hold a `SessionPublisher` in memory for\n * \"the\" run being monitored — there may be zero, one or several running at\n * once, each in its own process. Instead this module polls every\n * `~/.issue-flow/projects/<project>/issues/<n>/session.json` on disk (the\n * same file `FilePublisher` already writes) and keeps an in-memory map of the\n * ones that are both well-formed and recently updated.\n *\n * Polling rather than `fs.watch` is a deliberate choice, not a placeholder:\n * `fs.watch`'s `recursive` option is only reliable on macOS and Windows (Linux\n * needs a manual per-directory watch tree, and the whole thing still degrades\n * to polling on network filesystems), while a `~/.issue-flow` tree is small\n * and local — a cheap poll of it is simpler and behaves identically on every\n * platform, which is what the US-003 acceptance criteria ask to validate.\n */\n\n/** How often the directory tree is rescanned, unless overridden. */\nexport const DEFAULT_POLL_INTERVAL_MS = 3000;\n\n/**\n * A session stops being reported once its file has gone this long without an\n * update. `FilePublisher` touches a live session every 10s without rewriting\n * its content. Three missed heartbeats plus ample scheduling/filesystem slack\n * avoid flapping while still removing an abruptly killed run promptly.\n */\nexport const DEFAULT_STALE_AFTER_MS = 90_000;\n\nexport interface ActiveSession {\n /** Directory the session.json was read from, one level up from the file. */\n issueDir: string;\n filePath: string;\n snapshot: ValidatedSessionSnapshot;\n /** mtime of the file at the last successful read, in epoch ms. */\n updatedAtMs: number;\n}\n\nexport interface SessionDirectoryOptions extends GetGlobalRootOptions {\n /** Poll interval, in ms. Default {@link DEFAULT_POLL_INTERVAL_MS}. */\n pollIntervalMs?: number;\n /** Staleness threshold, in ms. Default {@link DEFAULT_STALE_AFTER_MS}. */\n staleAfterMs?: number;\n /** Invoked (at most once) when a poll fails unexpectedly. Best-effort logging only. */\n onWarn?: (message: string) => void;\n}\n\nexport interface SessionDirectoryHandle {\n /** Snapshot of every session currently considered active. */\n sessions(): ActiveSession[];\n /** A single active session by id, or undefined. */\n getSession(sessionId: string): ActiveSession | undefined;\n /** Journal entries for one active session, oldest generation first. */\n events(sessionId: string): Promise<JournalEntry[] | undefined>;\n /** Force an immediate rescan instead of waiting for the next tick. Never throws. */\n refresh(): Promise<void>;\n /** Stop polling. Idempotent. */\n close(): void;\n}\n\nasync function listSubdirectories(dir: string): Promise<string[]> {\n try {\n const entries = await readdir(dir, { withFileTypes: true });\n // Symlinks are skipped on purpose, same discipline as the storage\n // migration walk: following one could pull session data from outside the\n // global tree into the listing.\n return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);\n } catch {\n // Missing/unreadable projects (or issues) directory reads as \"none yet\" —\n // this is routinely the case before the first --web run ever happens.\n return [];\n }\n}\n\n/** Every `session.json` path currently on disk, one per project/issue pair. */\nasync function discoverSessionFiles(root: string): Promise<string[]> {\n const projectsDir = join(root, PROJECTS_DIR_NAME);\n const projectIds = await listSubdirectories(projectsDir);\n\n const perProject = await Promise.all(\n projectIds.map(async (projectId) => {\n const issuesDir = join(projectsDir, projectId, ISSUES_DIR_NAME);\n const issueIds = await listSubdirectories(issuesDir);\n return issueIds.map((issueId) => join(issuesDir, issueId, SESSION_FILENAME));\n }),\n );\n\n return perProject.flat();\n}\n\nasync function readJournalFile(filePath: string): Promise<JournalEntry[]> {\n try {\n return parseJournal(await readFile(filePath, 'utf-8'));\n } catch {\n return [];\n }\n}\n\n/**\n * Start polling the global storage tree for active sessions.\n *\n * Returns a handle immediately; the first scan happens synchronously in the\n * background and `sessions()` answers `[]` until it completes, same as \"no\n * sessions found yet\" — there is nothing to await here that would not also\n * delay the server's very first bind.\n */\nexport function watchSessionDirectory(\n options: SessionDirectoryOptions = {},\n): SessionDirectoryHandle {\n const root = getGlobalRoot(options);\n const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;\n const staleAfterMs = options.staleAfterMs ?? DEFAULT_STALE_AFTER_MS;\n const warn = options.onWarn;\n\n // Keyed by sessionId, not by file path: a session's identity is the id\n // inside its content, and that is what /api/status?session=<id> looks up.\n let sessions = new Map<string, ActiveSession>();\n let warned = false;\n\n async function scan(): Promise<void> {\n let files: string[];\n try {\n files = await discoverSessionFiles(root);\n } catch (err) {\n if (!warned) {\n warned = true;\n warn?.(\n `issue-flow: web monitor could not scan the session directory (will keep retrying silently): ${\n err instanceof Error ? err.message : String(err)\n }`,\n );\n }\n return;\n }\n\n const now = Date.now();\n const next = new Map<string, ActiveSession>();\n for (const filePath of files) {\n const result = await readSessionFile(filePath);\n if (result === null) continue;\n if (now - result.updatedAtMs > staleAfterMs) continue; // stopped updating: not active\n const sessionId = result.snapshot.sessionId as string;\n next.set(sessionId, {\n issueDir: join(filePath, '..'),\n filePath,\n snapshot: result.snapshot,\n updatedAtMs: result.updatedAtMs,\n });\n }\n sessions = next;\n }\n\n // The first scan runs immediately (not just after the first interval tick)\n // so a server started right after a session begins does not report \"no\n // sessions\" for a whole poll interval.\n void scan();\n const timer = setInterval(() => void scan(), pollIntervalMs);\n timer.unref();\n\n return {\n sessions: () => [...sessions.values()],\n getSession: (sessionId: string) => sessions.get(sessionId),\n events: async (sessionId: string) => {\n const session = sessions.get(sessionId);\n if (session === undefined) return undefined;\n const [rotated, current] = await Promise.all([\n readJournalFile(join(session.issueDir, ROTATED_EVENTS_FILENAME)),\n readJournalFile(join(session.issueDir, EVENTS_FILENAME)),\n ]);\n return [...rotated, ...current];\n },\n refresh: scan,\n close: () => clearInterval(timer),\n };\n}\n","import { loadWebConfig } from '../config.js';\nimport type { WebConfig } from '../schemas.js';\nimport { ensureSingleWebServer, stopWebMonitor } from '../web/lock.js';\nimport { watchSessionDirectory } from '../web/session-directory.js';\n\n/**\n * `issue-flow web serve` / `issue-flow web stop` (US-002).\n *\n * `serve` is the process `ensureWebMonitor()` (`web/lock.ts`) spawns detached\n * — it is not meant to be run interactively, though nothing stops a user from\n * doing so to watch every session on the machine without going through a\n * pipeline command first. It never exits on its own: the server stays bound\n * (see `unref: false` in `web/server.ts`) until `stop` sends it `SIGTERM`, at\n * which point `startWebServer`'s own signal handler closes it (removing the\n * lock) and re-raises the signal for the default termination behavior.\n */\n\nexport interface RunWebServeOptions {\n port?: number;\n host?: string;\n refresh?: number;\n}\n\n/**\n * Bind (or defer to) the single web monitor instance and keep the process\n * alive for as long as it stays bound. Logging is intentionally silent on the\n * happy path: this process is spawned with `stdio: 'ignore'`, so anything\n * printed here goes nowhere — the caller (`ensureWebMonitor`) is the one that\n * tells the user the server is up.\n */\nexport async function runWebServe(options: RunWebServeOptions): Promise<number> {\n // Built conditionally, not `{ port: options.port, ... }`: loadWebConfig()\n // spreads this object directly over the lower-precedence layers, and an\n // explicit `undefined` value would overwrite an env/.issue-flow.json\n // setting instead of falling through to it (only an *absent* key does).\n const cli: Partial<WebConfig> = {};\n if (options.port !== undefined) cli.port = options.port;\n if (options.host !== undefined) cli.host = options.host;\n if (options.refresh !== undefined) cli.refreshSeconds = options.refresh;\n const webConfig = await loadWebConfig({ cli });\n\n const sessions = watchSessionDirectory();\n\n const noop = (): void => {};\n const handle = await ensureSingleWebServer({\n sessions,\n port: webConfig.port,\n host: webConfig.host,\n refreshSeconds: webConfig.refreshSeconds,\n unref: false,\n info: noop,\n warn: noop,\n });\n\n if (handle === null) {\n sessions.close();\n return 1;\n }\n\n if (handle.server === undefined) {\n // Another instance already won the race (or was already running by the\n // time this process got here): nothing to serve, so it exits right away\n // instead of idling as a redundant detached process.\n sessions.close();\n return 0;\n }\n\n const originalClose = handle.close;\n handle.close = async () => {\n await originalClose();\n sessions.close();\n };\n\n return 0;\n}\n\n/** Stop the single running web monitor instance, if any. */\nexport async function runWebStop(): Promise<number> {\n const webConfig = await loadWebConfig();\n const result = await stopWebMonitor({ port: webConfig.port, host: webConfig.host });\n return result === 'failed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,MAAI,QAAQ,SAAS,OAAW,KAAI,OAAO,QAAQ;AACnD,MAAI,QAAQ,SAAS,OAAW,KAAI,OAAO,QAAQ;AACnD,MAAI,QAAQ,YAAY,OAAW,KAAI,iBAAiB,QAAQ;AAChE,QAAM,YAAY,MAAM,cAAc,EAAE,IAAI,CAAC;AAE7C,QAAM,WAAW,sBAAsB;AAEvC,QAAM,OAAO,MAAY;AAAA,EAAC;AAC1B,QAAM,SAAS,MAAM,sBAAsB;AAAA,IACzC;AAAA,IACA,MAAM,UAAU;AAAA,IAChB,MAAM,UAAU;AAAA,IAChB,gBAAgB,UAAU;AAAA,IAC1B,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EACR,CAAC;AAED,MAAI,WAAW,MAAM;AACnB,aAAS,MAAM;AACf,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,WAAW,QAAW;AAI/B,aAAS,MAAM;AACf,WAAO;AAAA,EACT;AAEA,QAAM,gBAAgB,OAAO;AAC7B,SAAO,QAAQ,YAAY;AACzB,UAAM,cAAc;AACpB,aAAS,MAAM;AAAA,EACjB;AAEA,SAAO;AACT;AAGA,eAAsB,aAA8B;AAClD,QAAM,YAAY,MAAM,cAAc;AACtC,QAAM,SAAS,MAAM,eAAe,EAAE,MAAM,UAAU,MAAM,MAAM,UAAU,KAAK,CAAC;AAClF,SAAO,WAAW,YAAY,WAAW,YAAY,IAAI;AAC3D;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "issue-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Unified CLI for orchestrating the full issue-flow pipeline via Claude Code, Codex CLI, Cursor CLI or Antigravity CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
"test:watch": "vitest",
|
|
15
15
|
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
16
16
|
"smoke": "bash scripts/smoke-issue-providers.sh",
|
|
17
|
-
"lint": "biome check
|
|
18
|
-
"lint:fix": "biome check --write
|
|
19
|
-
"format": "biome format --write
|
|
20
|
-
"check": "biome check
|
|
17
|
+
"lint": "biome check .",
|
|
18
|
+
"lint:fix": "biome check --write .",
|
|
19
|
+
"format": "biome format --write .",
|
|
20
|
+
"check": "biome check . && tsc --noEmit",
|
|
21
|
+
"fix": "biome check --write . && tsc --noEmit",
|
|
21
22
|
"prepack": "npm run build",
|
|
22
23
|
"prepublishOnly": "npm run lint && npm run typecheck && npm test",
|
|
23
24
|
"preversion": "node scripts/git-version.mjs check",
|
package/web/AGENTS.md
CHANGED
|
@@ -217,17 +217,16 @@ o token que um tema herda do outro por engano.
|
|
|
217
217
|
|
|
218
218
|
## Escrita limitada a preferências futuras
|
|
219
219
|
|
|
220
|
-
O estado de execução continua somente leitura (`snapshot.readOnly === true`).
|
|
221
|
-
|
|
222
|
-
execuções **futuras**,
|
|
223
|
-
inferir permissão pela versão: o client
|
|
224
|
-
`/api/health.capabilities`
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
o efeito nem esperar o próximo poll. Enquanto `capabilities` estiver vazio,
|
|
220
|
+
O estado de execução continua somente leitura (`snapshot.readOnly === true`). As
|
|
221
|
+
únicas mutações são `POST /api/config/agent` e `POST /api/config/routing`, que
|
|
222
|
+
salvam preferências globais para execuções **futuras**, aparecem via capability
|
|
223
|
+
e só funcionam em loopback. Nunca inferir permissão pela versão: o client
|
|
224
|
+
renderiza os formulários apenas quando `/api/health.capabilities` anuncia as
|
|
225
|
+
duas capacidades correspondentes.
|
|
226
|
+
|
|
227
|
+
Cada mutação responde com `{ ok, file, appliesTo: 'future executions' }`; o
|
|
228
|
+
client atualiza a preferência viva no próximo `GET /api/config`, sem jamais
|
|
229
|
+
alterar o snapshot da execução. Enquanto as capabilities estiverem ausentes,
|
|
231
230
|
nenhum controle de escrita deve aparecer na tela.
|
|
232
231
|
|
|
233
232
|
## Métricas (tokens e custo)
|
package/web/public/app.css
CHANGED
|
@@ -984,6 +984,25 @@ progress {
|
|
|
984
984
|
cursor: pointer;
|
|
985
985
|
}
|
|
986
986
|
|
|
987
|
+
.config-phase-row.is-editable {
|
|
988
|
+
grid-template-columns: minmax(5rem, 0.7fr) minmax(7rem, 1fr) minmax(13rem, 1.6fr) auto minmax(9rem, 1fr);
|
|
989
|
+
cursor: default;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
.config-phase-open {
|
|
993
|
+
width: max-content;
|
|
994
|
+
border: 0;
|
|
995
|
+
padding: 0;
|
|
996
|
+
color: var(--accent);
|
|
997
|
+
background: transparent;
|
|
998
|
+
cursor: pointer;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.config-phase-open:focus-visible {
|
|
1002
|
+
outline: 2px solid var(--focus-ring);
|
|
1003
|
+
outline-offset: 3px;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
987
1006
|
.config-phase-row:hover {
|
|
988
1007
|
background: var(--surface-sunken);
|
|
989
1008
|
}
|
|
@@ -1002,8 +1021,19 @@ progress {
|
|
|
1002
1021
|
display: none;
|
|
1003
1022
|
}
|
|
1004
1023
|
|
|
1024
|
+
.config-routing-summary {
|
|
1025
|
+
margin-top: 1rem;
|
|
1026
|
+
padding-top: 1rem;
|
|
1027
|
+
border-top: 1px solid var(--border);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.config-routing-form {
|
|
1031
|
+
grid-template-columns: minmax(8rem, 0.7fr) minmax(9rem, 0.7fr) auto auto minmax(10rem, 1fr);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1005
1034
|
.config-form select,
|
|
1006
1035
|
.config-form input,
|
|
1036
|
+
.config-phase-row select,
|
|
1007
1037
|
.config-save {
|
|
1008
1038
|
min-height: 2.25rem;
|
|
1009
1039
|
border: 1px solid var(--border-strong);
|
|
@@ -1013,6 +1043,10 @@ progress {
|
|
|
1013
1043
|
background: var(--surface);
|
|
1014
1044
|
}
|
|
1015
1045
|
|
|
1046
|
+
.config-phase-feedback {
|
|
1047
|
+
min-width: 0;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1016
1050
|
.config-save {
|
|
1017
1051
|
color: var(--accent-text);
|
|
1018
1052
|
border-color: var(--accent);
|
|
@@ -1077,6 +1111,10 @@ progress {
|
|
|
1077
1111
|
grid-template-columns: 1fr 1fr;
|
|
1078
1112
|
}
|
|
1079
1113
|
|
|
1114
|
+
.config-phase-row.is-editable {
|
|
1115
|
+
grid-template-columns: 1fr;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1080
1118
|
.config-form {
|
|
1081
1119
|
grid-template-columns: 1fr;
|
|
1082
1120
|
}
|