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.
Files changed (165) hide show
  1. package/dist/agent-TB6W7PT7.js +30 -0
  2. package/dist/{analyze-556KCJKZ.js → analyze-6M3KEOX7.js} +22 -22
  3. package/dist/{apply-WVV7G7WN.js → apply-ADB3ZK7W.js} +14 -14
  4. package/dist/{bench-UBFGKUHR.js → bench-FM7I7EIV.js} +23 -23
  5. package/dist/{chunk-YA6FWFYW.js → chunk-2SUFAE6X.js} +53 -11
  6. package/dist/chunk-2SUFAE6X.js.map +1 -0
  7. package/dist/{chunk-DBEMD34J.js → chunk-32JSYXEK.js} +8 -8
  8. package/dist/chunk-3R27MJ5R.js +25 -0
  9. package/dist/chunk-3R27MJ5R.js.map +1 -0
  10. package/dist/{chunk-QZOBR6YF.js → chunk-6YQT3SSM.js} +4 -4
  11. package/dist/chunk-6YQT3SSM.js.map +1 -0
  12. package/dist/{chunk-OGVWJO4S.js → chunk-7F7LGMVO.js} +3 -3
  13. package/dist/{chunk-X6GY3CM2.js → chunk-A4H7P7T7.js} +102 -102
  14. package/dist/chunk-A4H7P7T7.js.map +1 -0
  15. package/dist/{chunk-OGN2NX57.js → chunk-ANI2NTR4.js} +9 -9
  16. package/dist/{chunk-VK65RNFA.js → chunk-B3TSS7BT.js} +3 -3
  17. package/dist/chunk-D6ZBGJ3L.js +321 -0
  18. package/dist/chunk-D6ZBGJ3L.js.map +1 -0
  19. package/dist/{chunk-MXCOSPLJ.js → chunk-DGRTJD5R.js} +3 -3
  20. package/dist/{chunk-ROIIEVZH.js → chunk-DUS5ZNKL.js} +474 -361
  21. package/dist/chunk-DUS5ZNKL.js.map +1 -0
  22. package/dist/{chunk-VTF4RWS5.js → chunk-DV7HUC4Z.js} +7 -7
  23. package/dist/{chunk-OOX3RMD3.js → chunk-E6KXCV3T.js} +4 -4
  24. package/dist/{chunk-OLUOZLU5.js → chunk-HJBF4WD2.js} +1653 -1071
  25. package/dist/chunk-HJBF4WD2.js.map +1 -0
  26. package/dist/{chunk-4FUWWBTP.js → chunk-HLAPOUEM.js} +8 -8
  27. package/dist/{chunk-J2LJB2OH.js → chunk-HY5HLFDU.js} +630 -571
  28. package/dist/chunk-HY5HLFDU.js.map +1 -0
  29. package/dist/{chunk-QVLIIGBU.js → chunk-ICM463EO.js} +60 -13
  30. package/dist/chunk-ICM463EO.js.map +1 -0
  31. package/dist/{chunk-KV2K7MK2.js → chunk-ISZ54SVE.js} +9 -9
  32. package/dist/{chunk-GV2DABNZ.js → chunk-KZ5EY5XX.js} +12 -12
  33. package/dist/{chunk-SW2MF47D.js → chunk-KZXQWC7U.js} +19 -19
  34. package/dist/{chunk-2H43OVTU.js → chunk-LPWPFIIB.js} +11 -11
  35. package/dist/{chunk-EPFC4LHT.js → chunk-MI5TREN3.js} +9 -9
  36. package/dist/{chunk-R42YHLDV.js → chunk-PPZ3K4YM.js} +2 -2
  37. package/dist/{chunk-H3EYBJZU.js → chunk-QMIQR7EE.js} +10 -10
  38. package/dist/{chunk-FKWYD44M.js → chunk-QPGEFLMY.js} +2 -2
  39. package/dist/chunk-RCZJQUTC.js +196 -0
  40. package/dist/chunk-RCZJQUTC.js.map +1 -0
  41. package/dist/{chunk-NQCR3HSU.js → chunk-RNFUVKC3.js} +3 -3
  42. package/dist/{chunk-G5LACAXO.js → chunk-RYOUZ6EK.js} +2 -2
  43. package/dist/{chunk-BSBJXPLC.js → chunk-SGTTR4XW.js} +10 -10
  44. package/dist/{chunk-GVOZ6NDO.js → chunk-SOM4QA6C.js} +3 -3
  45. package/dist/{chunk-73TS2H42.js → chunk-UK4E2FUA.js} +132 -34
  46. package/dist/chunk-UK4E2FUA.js.map +1 -0
  47. package/dist/{chunk-PGN2VX4Y.js → chunk-UWDCIFTP.js} +7 -7
  48. package/dist/{chunk-MCLPSL6B.js → chunk-VE3IYNDN.js} +3 -3
  49. package/dist/{chunk-IAMIBZRF.js → chunk-WCCZJL7W.js} +2 -2
  50. package/dist/{chunk-SVDEWOUD.js → chunk-XZUEFTUP.js} +6 -6
  51. package/dist/{chunk-GPLP7EPL.js → chunk-YII4U7ZD.js} +10 -10
  52. package/dist/{chunk-GPLP7EPL.js.map → chunk-YII4U7ZD.js.map} +1 -1
  53. package/dist/{chunk-WLJVL25O.js → chunk-YUNBOUQH.js} +6 -6
  54. package/dist/{chunk-WNROH2YE.js → chunk-YVPZUN6X.js} +2 -2
  55. package/dist/{chunk-Q2TZA6AC.js → chunk-Z5O2XBWA.js} +14 -14
  56. package/dist/cli.js +57 -49
  57. package/dist/cli.js.map +1 -1
  58. package/dist/{config-UE7IP36J.js → config-KGZUPAUP.js} +13 -13
  59. package/dist/{conventions-Z3QC2NSG.js → conventions-RYN7OXJN.js} +15 -15
  60. package/dist/{diagnostics-2Z5HFQOO.js → diagnostics-HTCWF7F4.js} +7 -7
  61. package/dist/execute-QL3ZQIAP.js +37 -0
  62. package/dist/{generate-PB4L7V5N.js → generate-CX6KNHZS.js} +22 -22
  63. package/dist/{git-7MUOGVRG.js → git-A2IP32PQ.js} +2 -2
  64. package/dist/init-PDVQDRS6.js +24 -0
  65. package/dist/{operations-QDJAFZUN.js → operations-CAKIT2BO.js} +15 -15
  66. package/dist/{permissions-XVXXENVP.js → permissions-G4XCAESF.js} +4 -4
  67. package/dist/plan-PRORGS3L.js +34 -0
  68. package/dist/{policy-6WQZB6B2.js → policy-WX6O2JID.js} +14 -14
  69. package/dist/pr-27RMQI5F.js +39 -0
  70. package/dist/pr-review-VNESMAMT.js +32 -0
  71. package/dist/prd-ZNC4T5BS.js +33 -0
  72. package/dist/{ps-CX7756QG.js → ps-76L6ZAZL.js} +12 -12
  73. package/dist/{recorder-RK6XZYF3.js → recorder-N7U66HCO.js} +7 -7
  74. package/dist/{registry-POSB35Q4.js → registry-XLHHYLTR.js} +5 -5
  75. package/dist/{resume-OQJZV3JH.js → resume-VLWIE264.js} +39 -38
  76. package/dist/{resume-OQJZV3JH.js.map → resume-VLWIE264.js.map} +1 -1
  77. package/dist/review-7CREJDKB.js +35 -0
  78. package/dist/routing-VCDYHSXA.js +33 -0
  79. package/dist/run-3MPORLF5.js +56 -0
  80. package/dist/{session-publisher-VVXOCJ2S.js → session-publisher-KAJQRHNZ.js} +3 -2
  81. package/dist/{state-manager-TIC73GQY.js → state-manager-UPHO2EA2.js} +4 -4
  82. package/dist/state-manager-UPHO2EA2.js.map +1 -0
  83. package/dist/{usage-WDDNSIHP.js → usage-U7QNGCPK.js} +12 -12
  84. package/dist/{web-IPGY52AK.js → web-HUNDHCJ4.js} +20 -18
  85. package/dist/{web-IPGY52AK.js.map → web-HUNDHCJ4.js.map} +1 -1
  86. package/package.json +6 -5
  87. package/web/AGENTS.md +10 -11
  88. package/web/public/app.css +38 -0
  89. package/web/public/app.js +277 -56
  90. package/dist/agent-PMWCDWOW.js +0 -30
  91. package/dist/chunk-73TS2H42.js.map +0 -1
  92. package/dist/chunk-7Z4Y3VKM.js +0 -26
  93. package/dist/chunk-7Z4Y3VKM.js.map +0 -1
  94. package/dist/chunk-AOAQU7PD.js +0 -180
  95. package/dist/chunk-AOAQU7PD.js.map +0 -1
  96. package/dist/chunk-J2LJB2OH.js.map +0 -1
  97. package/dist/chunk-OLUOZLU5.js.map +0 -1
  98. package/dist/chunk-QVLIIGBU.js.map +0 -1
  99. package/dist/chunk-QZOBR6YF.js.map +0 -1
  100. package/dist/chunk-ROIIEVZH.js.map +0 -1
  101. package/dist/chunk-X6GY3CM2.js.map +0 -1
  102. package/dist/chunk-YA6FWFYW.js.map +0 -1
  103. package/dist/execute-QYLJ5L4T.js +0 -36
  104. package/dist/init-XBERAZ4O.js +0 -24
  105. package/dist/plan-RXOW32KY.js +0 -34
  106. package/dist/pr-3WFYAVA7.js +0 -39
  107. package/dist/pr-review-RK63ZEMM.js +0 -32
  108. package/dist/prd-LRV6IW3E.js +0 -33
  109. package/dist/review-AEFISJZD.js +0 -35
  110. package/dist/routing-EA5NJGNU.js +0 -94
  111. package/dist/routing-EA5NJGNU.js.map +0 -1
  112. package/dist/run-HSC7R33Y.js +0 -55
  113. /package/dist/{agent-PMWCDWOW.js.map → agent-TB6W7PT7.js.map} +0 -0
  114. /package/dist/{analyze-556KCJKZ.js.map → analyze-6M3KEOX7.js.map} +0 -0
  115. /package/dist/{apply-WVV7G7WN.js.map → apply-ADB3ZK7W.js.map} +0 -0
  116. /package/dist/{bench-UBFGKUHR.js.map → bench-FM7I7EIV.js.map} +0 -0
  117. /package/dist/{chunk-DBEMD34J.js.map → chunk-32JSYXEK.js.map} +0 -0
  118. /package/dist/{chunk-OGVWJO4S.js.map → chunk-7F7LGMVO.js.map} +0 -0
  119. /package/dist/{chunk-OGN2NX57.js.map → chunk-ANI2NTR4.js.map} +0 -0
  120. /package/dist/{chunk-VK65RNFA.js.map → chunk-B3TSS7BT.js.map} +0 -0
  121. /package/dist/{chunk-MXCOSPLJ.js.map → chunk-DGRTJD5R.js.map} +0 -0
  122. /package/dist/{chunk-VTF4RWS5.js.map → chunk-DV7HUC4Z.js.map} +0 -0
  123. /package/dist/{chunk-OOX3RMD3.js.map → chunk-E6KXCV3T.js.map} +0 -0
  124. /package/dist/{chunk-4FUWWBTP.js.map → chunk-HLAPOUEM.js.map} +0 -0
  125. /package/dist/{chunk-KV2K7MK2.js.map → chunk-ISZ54SVE.js.map} +0 -0
  126. /package/dist/{chunk-GV2DABNZ.js.map → chunk-KZ5EY5XX.js.map} +0 -0
  127. /package/dist/{chunk-SW2MF47D.js.map → chunk-KZXQWC7U.js.map} +0 -0
  128. /package/dist/{chunk-2H43OVTU.js.map → chunk-LPWPFIIB.js.map} +0 -0
  129. /package/dist/{chunk-EPFC4LHT.js.map → chunk-MI5TREN3.js.map} +0 -0
  130. /package/dist/{chunk-R42YHLDV.js.map → chunk-PPZ3K4YM.js.map} +0 -0
  131. /package/dist/{chunk-H3EYBJZU.js.map → chunk-QMIQR7EE.js.map} +0 -0
  132. /package/dist/{chunk-FKWYD44M.js.map → chunk-QPGEFLMY.js.map} +0 -0
  133. /package/dist/{chunk-NQCR3HSU.js.map → chunk-RNFUVKC3.js.map} +0 -0
  134. /package/dist/{chunk-G5LACAXO.js.map → chunk-RYOUZ6EK.js.map} +0 -0
  135. /package/dist/{chunk-BSBJXPLC.js.map → chunk-SGTTR4XW.js.map} +0 -0
  136. /package/dist/{chunk-GVOZ6NDO.js.map → chunk-SOM4QA6C.js.map} +0 -0
  137. /package/dist/{chunk-PGN2VX4Y.js.map → chunk-UWDCIFTP.js.map} +0 -0
  138. /package/dist/{chunk-MCLPSL6B.js.map → chunk-VE3IYNDN.js.map} +0 -0
  139. /package/dist/{chunk-IAMIBZRF.js.map → chunk-WCCZJL7W.js.map} +0 -0
  140. /package/dist/{chunk-SVDEWOUD.js.map → chunk-XZUEFTUP.js.map} +0 -0
  141. /package/dist/{chunk-WLJVL25O.js.map → chunk-YUNBOUQH.js.map} +0 -0
  142. /package/dist/{chunk-WNROH2YE.js.map → chunk-YVPZUN6X.js.map} +0 -0
  143. /package/dist/{chunk-Q2TZA6AC.js.map → chunk-Z5O2XBWA.js.map} +0 -0
  144. /package/dist/{config-UE7IP36J.js.map → config-KGZUPAUP.js.map} +0 -0
  145. /package/dist/{conventions-Z3QC2NSG.js.map → conventions-RYN7OXJN.js.map} +0 -0
  146. /package/dist/{diagnostics-2Z5HFQOO.js.map → diagnostics-HTCWF7F4.js.map} +0 -0
  147. /package/dist/{execute-QYLJ5L4T.js.map → execute-QL3ZQIAP.js.map} +0 -0
  148. /package/dist/{generate-PB4L7V5N.js.map → generate-CX6KNHZS.js.map} +0 -0
  149. /package/dist/{git-7MUOGVRG.js.map → git-A2IP32PQ.js.map} +0 -0
  150. /package/dist/{init-XBERAZ4O.js.map → init-PDVQDRS6.js.map} +0 -0
  151. /package/dist/{operations-QDJAFZUN.js.map → operations-CAKIT2BO.js.map} +0 -0
  152. /package/dist/{permissions-XVXXENVP.js.map → permissions-G4XCAESF.js.map} +0 -0
  153. /package/dist/{plan-RXOW32KY.js.map → plan-PRORGS3L.js.map} +0 -0
  154. /package/dist/{policy-6WQZB6B2.js.map → policy-WX6O2JID.js.map} +0 -0
  155. /package/dist/{pr-3WFYAVA7.js.map → pr-27RMQI5F.js.map} +0 -0
  156. /package/dist/{pr-review-RK63ZEMM.js.map → pr-review-VNESMAMT.js.map} +0 -0
  157. /package/dist/{prd-LRV6IW3E.js.map → prd-ZNC4T5BS.js.map} +0 -0
  158. /package/dist/{ps-CX7756QG.js.map → ps-76L6ZAZL.js.map} +0 -0
  159. /package/dist/{recorder-RK6XZYF3.js.map → recorder-N7U66HCO.js.map} +0 -0
  160. /package/dist/{registry-POSB35Q4.js.map → registry-XLHHYLTR.js.map} +0 -0
  161. /package/dist/{review-AEFISJZD.js.map → review-7CREJDKB.js.map} +0 -0
  162. /package/dist/{run-HSC7R33Y.js.map → routing-VCDYHSXA.js.map} +0 -0
  163. /package/dist/{session-publisher-VVXOCJ2S.js.map → run-3MPORLF5.js.map} +0 -0
  164. /package/dist/{state-manager-TIC73GQY.js.map → session-publisher-KAJQRHNZ.js.map} +0 -0
  165. /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-ROIIEVZH.js";
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-VVXOCJ2S.js.map
12
+ //# sourceMappingURL=session-publisher-KAJQRHNZ.js.map
@@ -14,9 +14,9 @@ import {
14
14
  selectActiveStory,
15
15
  setLastError,
16
16
  trimErrorMessage
17
- } from "./chunk-GVOZ6NDO.js";
18
- import "./chunk-QVLIIGBU.js";
19
- import "./chunk-7Z4Y3VKM.js";
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-TIC73GQY.js.map
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-VTF4RWS5.js";
8
+ } from "./chunk-DV7HUC4Z.js";
9
9
  import {
10
10
  printError,
11
11
  printInfo
12
- } from "./chunk-SVDEWOUD.js";
13
- import "./chunk-ROIIEVZH.js";
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-WNROH2YE.js";
17
+ import "./chunk-YVPZUN6X.js";
18
+ import "./chunk-DUS5ZNKL.js";
19
19
  import {
20
20
  discardedExecutionCount
21
- } from "./chunk-GPLP7EPL.js";
22
- import "./chunk-P3LRUNC6.js";
23
- import "./chunk-R42YHLDV.js";
21
+ } from "./chunk-YII4U7ZD.js";
22
+ import "./chunk-PPZ3K4YM.js";
24
23
  import {
25
24
  loadTaskPlan
26
- } from "./chunk-GVOZ6NDO.js";
27
- import "./chunk-QVLIIGBU.js";
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-WDDNSIHP.js.map
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-G5LACAXO.js";
4
+ } from "./chunk-RYOUZ6EK.js";
5
5
  import {
6
6
  ensureSingleWebServer,
7
7
  stopWebMonitor
8
- } from "./chunk-YA6FWFYW.js";
9
- import "./chunk-PGN2VX4Y.js";
10
- import "./chunk-OGVWJO4S.js";
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-IAMIBZRF.js";
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-J2LJB2OH.js";
18
- import "./chunk-VTF4RWS5.js";
19
- import "./chunk-SVDEWOUD.js";
20
- import "./chunk-ROIIEVZH.js";
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-WNROH2YE.js";
31
- import "./chunk-GPLP7EPL.js";
32
- import "./chunk-P3LRUNC6.js";
33
- import "./chunk-R42YHLDV.js";
34
- import "./chunk-GVOZ6NDO.js";
35
- import "./chunk-QVLIIGBU.js";
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-IPGY52AK.js.map
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,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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' || 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,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AQ,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.16.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 src/",
18
- "lint:fix": "biome check --write src/",
19
- "format": "biome format --write src/",
20
- "check": "biome check --write src/ && tsc --noEmit",
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`). A
221
- única mutação é `POST /api/config/agent`, que salva preferência global para
222
- execuções **futuras**, aparece via capability e só funciona em loopback. Nunca
223
- inferir permissão pela versão: o client renderiza o formulário apenas quando
224
- `/api/health.capabilities` contém `config:agent:write`.
225
-
226
- Quando essa etapa chegar, o contrato esperado é: as rotas de escrita passam a
227
- ser anunciadas em `capabilities` (o client decide o que renderizar a partir
228
- disso, nunca da versão do servidor), `readOnly` passa a `false`, e cada
229
- mutação responde com o snapshot atualizado para que a UI não precise adivinhar
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)
@@ -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
  }