@moberg_hr/work-tree 2.0.13 → 2.1.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/{answer-IL5AQHRO.js → answer-EGNJ2KYK.js} +4 -4
- package/dist/{attach-MFU4KN47.js → attach-64ILZMTD.js} +6 -6
- package/dist/bin.js +2 -2
- package/dist/{block-OXGEQ2PZ.js → block-H74FYSLK.js} +5 -5
- package/dist/{broadcast-UJURJNEK.js → broadcast-WRHZWOQN.js} +2 -2
- package/dist/{catchup-HN4VL5XK.js → catchup-7QBOC5JJ.js} +7 -7
- package/dist/{chunk-EU3BS5A6.js → chunk-2LIVAJLK.js} +3 -3
- package/dist/{chunk-FX4IA5U4.js → chunk-2QZ3RZOY.js} +4 -4
- package/dist/{chunk-PUYXTZ32.js → chunk-37I2GFXK.js} +3 -3
- package/dist/{chunk-SH7NSDRW.js → chunk-3D7MELCW.js} +2 -2
- package/dist/{chunk-3XY76XBD.js → chunk-3NPEMTQT.js} +2 -2
- package/dist/{chunk-427RB7E4.js → chunk-4Y35ABCO.js} +2 -2
- package/dist/{chunk-7GQCPGKQ.js → chunk-6DWPIK7D.js} +4 -4
- package/dist/{chunk-ZFPV46FA.js → chunk-6OG3W3PY.js} +21 -12
- package/dist/chunk-6OG3W3PY.js.map +1 -0
- package/dist/{chunk-OQAQMCHF.js → chunk-723C3D5X.js} +1 -1
- package/dist/chunk-723C3D5X.js.map +1 -0
- package/dist/{chunk-R7B46WXN.js → chunk-A3M5WTVC.js} +3 -3
- package/dist/{chunk-YZLNJQAV.js → chunk-ATBH7QW3.js} +2 -2
- package/dist/{chunk-YXQIGBL6.js → chunk-DXAIGNWF.js} +2 -2
- package/dist/{chunk-KUWFGPGW.js → chunk-DXHZWRVE.js} +7 -7
- package/dist/{chunk-BSFL3WDR.js → chunk-HY566NNR.js} +44 -44
- package/dist/{chunk-7JPCVEOY.js → chunk-KFSLF65S.js} +3 -3
- package/dist/{chunk-PVN5IGDZ.js → chunk-LCSWFGIM.js} +2 -2
- package/dist/{chunk-MVU7JAKG.js → chunk-MLTMXVLD.js} +2 -2
- package/dist/{chunk-OZIR2255.js → chunk-MXIFBNCV.js} +5 -5
- package/dist/{chunk-RLR66XLG.js → chunk-NPVMYGT7.js} +2 -2
- package/dist/{chunk-M7AUWYOP.js → chunk-OND6YRWZ.js} +4 -4
- package/dist/{chunk-HDO3PXCU.js → chunk-ONEXQW7Q.js} +3 -3
- package/dist/{chunk-6O6765M7.js → chunk-POTGMLPV.js} +2 -2
- package/dist/{chunk-OW46TR4G.js → chunk-PYOSW6X5.js} +3 -3
- package/dist/{chunk-YJVZ5H3I.js → chunk-QXDBVVSC.js} +2 -2
- package/dist/{chunk-F375JY4M.js → chunk-S45H7N6X.js} +5 -5
- package/dist/{chunk-B2RCWZUW.js → chunk-SSVVCHJB.js} +35 -7
- package/dist/chunk-SSVVCHJB.js.map +1 -0
- package/dist/chunk-UIZEMKED.js +9 -0
- package/dist/{chunk-4KNBN2OF.js.map → chunk-UIZEMKED.js.map} +1 -1
- package/dist/{chunk-KSIXTTO6.js → chunk-XILMZRNS.js} +2 -2
- package/dist/{chunk-MIIJ2HQS.js → chunk-YEEDWV4H.js} +3 -3
- package/dist/{cleanup-LRT6J36R.js → cleanup-YSVZAGJF.js} +12 -12
- package/dist/{cli-VGUJI5WG.js → cli-XT4AS3M2.js} +3 -3
- package/dist/{config-SSWYCX4C.js → config-GQRUETZ6.js} +2 -2
- package/dist/{diff-JBCBQM4I.js → diff-L3TWGBA4.js} +4 -4
- package/dist/{digest-WCZD6N7M.js → digest-R52JZ3AK.js} +4 -4
- package/dist/{fork-RJ3ZPPWT.js → fork-MCPMOGS5.js} +12 -12
- package/dist/{hook-CA5X3VKU.js → hook-S64C4G2C.js} +4 -4
- package/dist/{hydrate-Q4FWUQRC.js → hydrate-G5AMKHRD.js} +2 -2
- package/dist/{init-AT3BQLXM.js → init-PCZCSRZI.js} +3 -3
- package/dist/{move-OLXCDNA3.js → move-MMGOA7MV.js} +4 -4
- package/dist/{note-JOR53JP4.js → note-WVKK65IH.js} +4 -4
- package/dist/{overlaps-GXSEH2LG.js → overlaps-REVVBZCX.js} +4 -4
- package/dist/{pin-DAWKCVB2.js → pin-NRSD2ZT7.js} +4 -4
- package/dist/{pr-RKOVRSHC.js → pr-JYOI7LCK.js} +3 -3
- package/dist/{prune-UYCQOEUF.js → prune-AGZ24MPD.js} +11 -11
- package/dist/{pty-host-X3QK2LSK.js → pty-host-AZ2ORVV2.js} +2 -2
- package/dist/{read-IKDSIDJD.js → read-A7LFAPPZ.js} +4 -4
- package/dist/{recent-2LM44HN2.js → recent-H2LD5JOK.js} +2 -2
- package/dist/{remove-6XACPXUU.js → remove-3HQTJQWN.js} +10 -10
- package/dist/{restart-6ZAFDRBO.js → restart-BTUO4DTI.js} +4 -4
- package/dist/{resume-VA34T7ZR.js → resume-I7GXT2II.js} +2 -2
- package/dist/{run-E2WZPHHK.js → run-TE2AFYA6.js} +2 -2
- package/dist/{screen-KUXSDDLB.js → screen-XZPDSK65.js} +4 -4
- package/dist/{search-FJUZPI3P.js → search-MGTME3CE.js} +2 -2
- package/dist/{section-QLUIAYAV.js → section-YVBDU5MO.js} +4 -4
- package/dist/{send-V6LL6YR6.js → send-WKIX3AT5.js} +5 -5
- package/dist/{sessions-MKXREA2M.js → sessions-2OWYXO55.js} +9 -9
- package/dist/{snooze-JXI7VZJ4.js → snooze-WKY2T4VZ.js} +4 -4
- package/dist/{start-5XFUYT6I.js → start-ZCQT7G4C.js} +4 -4
- package/dist/{status-U5HKQ7MY.js → status-INIBC7GA.js} +2 -2
- package/dist/{stop-PFI7J2CS.js → stop-H4PTRFNX.js} +4 -4
- package/dist/{sync-MSU7QJWN.js → sync-6SHCY6LZ.js} +11 -11
- package/dist/{time-VDRCEIYQ.js → time-XQ2R7Z33.js} +5 -5
- package/dist/{timesheet-LSRRWV7Z.js → timesheet-DX2TLHIB.js} +6 -6
- package/dist/{tree-MOIO4GQL.js → tree-5AAHU4K5.js} +6 -6
- package/dist/{update-DXIY6BEX.js → update-6G2E5QXG.js} +6 -6
- package/dist/{wait-KPH5BQUD.js → wait-LFFXWBY7.js} +5 -5
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/{PtyView-D1TEpjVE.js → PtyView-l4za-VIj.js} +2 -2
- package/dist/web/assets/{PtyView-D1TEpjVE.js.map → PtyView-l4za-VIj.js.map} +1 -1
- package/dist/web/assets/{index-BVeughC2.css → index-B4wFhe7U.css} +1 -1
- package/dist/web/assets/index-DaCK_AAw.js +118 -0
- package/dist/web/assets/index-DaCK_AAw.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-6AOR3MIE.js → web-MWSFIUIJ.js} +25 -25
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-4KNBN2OF.js +0 -9
- package/dist/chunk-B2RCWZUW.js.map +0 -1
- package/dist/chunk-OQAQMCHF.js.map +0 -1
- package/dist/chunk-ZFPV46FA.js.map +0 -1
- package/dist/web/assets/index-DoMf82kx.js +0 -118
- package/dist/web/assets/index-DoMf82kx.js.map +0 -1
- /package/dist/{answer-IL5AQHRO.js.map → answer-EGNJ2KYK.js.map} +0 -0
- /package/dist/{attach-MFU4KN47.js.map → attach-64ILZMTD.js.map} +0 -0
- /package/dist/{block-OXGEQ2PZ.js.map → block-H74FYSLK.js.map} +0 -0
- /package/dist/{broadcast-UJURJNEK.js.map → broadcast-WRHZWOQN.js.map} +0 -0
- /package/dist/{catchup-HN4VL5XK.js.map → catchup-7QBOC5JJ.js.map} +0 -0
- /package/dist/{chunk-EU3BS5A6.js.map → chunk-2LIVAJLK.js.map} +0 -0
- /package/dist/{chunk-FX4IA5U4.js.map → chunk-2QZ3RZOY.js.map} +0 -0
- /package/dist/{chunk-PUYXTZ32.js.map → chunk-37I2GFXK.js.map} +0 -0
- /package/dist/{chunk-SH7NSDRW.js.map → chunk-3D7MELCW.js.map} +0 -0
- /package/dist/{chunk-3XY76XBD.js.map → chunk-3NPEMTQT.js.map} +0 -0
- /package/dist/{chunk-427RB7E4.js.map → chunk-4Y35ABCO.js.map} +0 -0
- /package/dist/{chunk-7GQCPGKQ.js.map → chunk-6DWPIK7D.js.map} +0 -0
- /package/dist/{chunk-R7B46WXN.js.map → chunk-A3M5WTVC.js.map} +0 -0
- /package/dist/{chunk-YZLNJQAV.js.map → chunk-ATBH7QW3.js.map} +0 -0
- /package/dist/{chunk-YXQIGBL6.js.map → chunk-DXAIGNWF.js.map} +0 -0
- /package/dist/{chunk-KUWFGPGW.js.map → chunk-DXHZWRVE.js.map} +0 -0
- /package/dist/{chunk-BSFL3WDR.js.map → chunk-HY566NNR.js.map} +0 -0
- /package/dist/{chunk-7JPCVEOY.js.map → chunk-KFSLF65S.js.map} +0 -0
- /package/dist/{chunk-PVN5IGDZ.js.map → chunk-LCSWFGIM.js.map} +0 -0
- /package/dist/{chunk-MVU7JAKG.js.map → chunk-MLTMXVLD.js.map} +0 -0
- /package/dist/{chunk-OZIR2255.js.map → chunk-MXIFBNCV.js.map} +0 -0
- /package/dist/{chunk-RLR66XLG.js.map → chunk-NPVMYGT7.js.map} +0 -0
- /package/dist/{chunk-M7AUWYOP.js.map → chunk-OND6YRWZ.js.map} +0 -0
- /package/dist/{chunk-HDO3PXCU.js.map → chunk-ONEXQW7Q.js.map} +0 -0
- /package/dist/{chunk-6O6765M7.js.map → chunk-POTGMLPV.js.map} +0 -0
- /package/dist/{chunk-OW46TR4G.js.map → chunk-PYOSW6X5.js.map} +0 -0
- /package/dist/{chunk-YJVZ5H3I.js.map → chunk-QXDBVVSC.js.map} +0 -0
- /package/dist/{chunk-F375JY4M.js.map → chunk-S45H7N6X.js.map} +0 -0
- /package/dist/{chunk-KSIXTTO6.js.map → chunk-XILMZRNS.js.map} +0 -0
- /package/dist/{chunk-MIIJ2HQS.js.map → chunk-YEEDWV4H.js.map} +0 -0
- /package/dist/{cleanup-LRT6J36R.js.map → cleanup-YSVZAGJF.js.map} +0 -0
- /package/dist/{cli-VGUJI5WG.js.map → cli-XT4AS3M2.js.map} +0 -0
- /package/dist/{config-SSWYCX4C.js.map → config-GQRUETZ6.js.map} +0 -0
- /package/dist/{diff-JBCBQM4I.js.map → diff-L3TWGBA4.js.map} +0 -0
- /package/dist/{digest-WCZD6N7M.js.map → digest-R52JZ3AK.js.map} +0 -0
- /package/dist/{fork-RJ3ZPPWT.js.map → fork-MCPMOGS5.js.map} +0 -0
- /package/dist/{hook-CA5X3VKU.js.map → hook-S64C4G2C.js.map} +0 -0
- /package/dist/{hydrate-Q4FWUQRC.js.map → hydrate-G5AMKHRD.js.map} +0 -0
- /package/dist/{init-AT3BQLXM.js.map → init-PCZCSRZI.js.map} +0 -0
- /package/dist/{move-OLXCDNA3.js.map → move-MMGOA7MV.js.map} +0 -0
- /package/dist/{note-JOR53JP4.js.map → note-WVKK65IH.js.map} +0 -0
- /package/dist/{overlaps-GXSEH2LG.js.map → overlaps-REVVBZCX.js.map} +0 -0
- /package/dist/{pin-DAWKCVB2.js.map → pin-NRSD2ZT7.js.map} +0 -0
- /package/dist/{pr-RKOVRSHC.js.map → pr-JYOI7LCK.js.map} +0 -0
- /package/dist/{prune-UYCQOEUF.js.map → prune-AGZ24MPD.js.map} +0 -0
- /package/dist/{pty-host-X3QK2LSK.js.map → pty-host-AZ2ORVV2.js.map} +0 -0
- /package/dist/{read-IKDSIDJD.js.map → read-A7LFAPPZ.js.map} +0 -0
- /package/dist/{recent-2LM44HN2.js.map → recent-H2LD5JOK.js.map} +0 -0
- /package/dist/{remove-6XACPXUU.js.map → remove-3HQTJQWN.js.map} +0 -0
- /package/dist/{restart-6ZAFDRBO.js.map → restart-BTUO4DTI.js.map} +0 -0
- /package/dist/{resume-VA34T7ZR.js.map → resume-I7GXT2II.js.map} +0 -0
- /package/dist/{run-E2WZPHHK.js.map → run-TE2AFYA6.js.map} +0 -0
- /package/dist/{screen-KUXSDDLB.js.map → screen-XZPDSK65.js.map} +0 -0
- /package/dist/{search-FJUZPI3P.js.map → search-MGTME3CE.js.map} +0 -0
- /package/dist/{section-QLUIAYAV.js.map → section-YVBDU5MO.js.map} +0 -0
- /package/dist/{send-V6LL6YR6.js.map → send-WKIX3AT5.js.map} +0 -0
- /package/dist/{sessions-MKXREA2M.js.map → sessions-2OWYXO55.js.map} +0 -0
- /package/dist/{snooze-JXI7VZJ4.js.map → snooze-WKY2T4VZ.js.map} +0 -0
- /package/dist/{start-5XFUYT6I.js.map → start-ZCQT7G4C.js.map} +0 -0
- /package/dist/{status-U5HKQ7MY.js.map → status-INIBC7GA.js.map} +0 -0
- /package/dist/{stop-PFI7J2CS.js.map → stop-H4PTRFNX.js.map} +0 -0
- /package/dist/{sync-MSU7QJWN.js.map → sync-6SHCY6LZ.js.map} +0 -0
- /package/dist/{time-VDRCEIYQ.js.map → time-XQ2R7Z33.js.map} +0 -0
- /package/dist/{timesheet-LSRRWV7Z.js.map → timesheet-DX2TLHIB.js.map} +0 -0
- /package/dist/{tree-MOIO4GQL.js.map → tree-5AAHU4K5.js.map} +0 -0
- /package/dist/{update-DXIY6BEX.js.map → update-6G2E5QXG.js.map} +0 -0
- /package/dist/{wait-KPH5BQUD.js.map → wait-LFFXWBY7.js.map} +0 -0
- /package/dist/{web-6AOR3MIE.js.map → web-MWSFIUIJ.js.map} +0 -0
package/dist/web/index.html
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
}
|
|
21
21
|
})();
|
|
22
22
|
</script>
|
|
23
|
-
<script type="module" crossorigin src="/assets/index-
|
|
24
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-DaCK_AAw.js"></script>
|
|
24
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B4wFhe7U.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div id="root"></div>
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
serveSpa,
|
|
20
20
|
sessionBaseForPath,
|
|
21
21
|
submitReviewSchema
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SSVVCHJB.js";
|
|
23
23
|
import {
|
|
24
24
|
announceChange,
|
|
25
25
|
createArchivedRows,
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
sessionWire,
|
|
34
34
|
stageSeenKey,
|
|
35
35
|
storeHolding
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-MXIFBNCV.js";
|
|
37
37
|
import {
|
|
38
38
|
createDigestSource
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-37I2GFXK.js";
|
|
40
40
|
import {
|
|
41
41
|
agentsBySession,
|
|
42
42
|
createBuildFoldersJob,
|
|
@@ -45,12 +45,12 @@ import {
|
|
|
45
45
|
deleteMergedBranches,
|
|
46
46
|
findMergedBranches,
|
|
47
47
|
summarizeAgents
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-2QZ3RZOY.js";
|
|
49
49
|
import {
|
|
50
50
|
DiffStatCache,
|
|
51
51
|
findOverlaps,
|
|
52
52
|
wantsDiffStat
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-QXDBVVSC.js";
|
|
54
54
|
import {
|
|
55
55
|
defaultTimeDeps,
|
|
56
56
|
fetchIssueDetail,
|
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
graphProblem,
|
|
64
64
|
signOutGraph,
|
|
65
65
|
startDeviceLogin
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-OND6YRWZ.js";
|
|
67
67
|
import {
|
|
68
68
|
defaultCleanupDeps
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-S45H7N6X.js";
|
|
70
70
|
import {
|
|
71
71
|
LATER_TEXT,
|
|
72
72
|
restartCountsText
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
removeBlocker,
|
|
88
88
|
sweepBlocks,
|
|
89
89
|
unblockedPrompt
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-ATBH7QW3.js";
|
|
91
91
|
import {
|
|
92
92
|
jiraWorklogPoster,
|
|
93
93
|
logWorkDay,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
} from "./chunk-LPJEV4R2.js";
|
|
97
97
|
import {
|
|
98
98
|
sessionWorkTime
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-DXAIGNWF.js";
|
|
100
100
|
import {
|
|
101
101
|
sendToSession
|
|
102
102
|
} from "./chunk-RYNBBSLY.js";
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
archiveMergedSession,
|
|
123
123
|
archiveWaiting,
|
|
124
124
|
defaultArchiveDeps
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-DXHZWRVE.js";
|
|
126
126
|
import {
|
|
127
127
|
cleanupVerdict,
|
|
128
128
|
createCleanupJob
|
|
@@ -142,12 +142,12 @@ import {
|
|
|
142
142
|
defaultForkDeps,
|
|
143
143
|
forkSession,
|
|
144
144
|
startSessionWithPrompt
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-6DWPIK7D.js";
|
|
146
146
|
import {
|
|
147
147
|
createInChild,
|
|
148
148
|
createInProcess,
|
|
149
149
|
oneAtATime
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-PYOSW6X5.js";
|
|
151
151
|
import {
|
|
152
152
|
resolveWorkBinPath
|
|
153
153
|
} from "./chunk-AH5TM3NB.js";
|
|
@@ -155,7 +155,7 @@ import {
|
|
|
155
155
|
teardownWorktree,
|
|
156
156
|
toBaseSpec,
|
|
157
157
|
wouldRefuseRemoval
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-6OG3W3PY.js";
|
|
159
159
|
import {
|
|
160
160
|
isWorktreeFolder
|
|
161
161
|
} from "./chunk-L6RUHCKB.js";
|
|
@@ -183,7 +183,7 @@ import {
|
|
|
183
183
|
subscribeSession,
|
|
184
184
|
syncPtyPool,
|
|
185
185
|
writeToPty
|
|
186
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-KFSLF65S.js";
|
|
187
187
|
import {
|
|
188
188
|
dbPtySessions
|
|
189
189
|
} from "./chunk-U4UB4LG6.js";
|
|
@@ -203,28 +203,28 @@ import {
|
|
|
203
203
|
stackedOn,
|
|
204
204
|
updateFromBase,
|
|
205
205
|
updateFromMain
|
|
206
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-ONEXQW7Q.js";
|
|
207
207
|
import {
|
|
208
208
|
sessionStatusView,
|
|
209
209
|
shownState
|
|
210
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-4Y35ABCO.js";
|
|
211
211
|
import {
|
|
212
212
|
askCatchUp,
|
|
213
213
|
cachedCatchUp,
|
|
214
214
|
catchUp,
|
|
215
215
|
catchUpFacts,
|
|
216
216
|
forgetCatchUp
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-YEEDWV4H.js";
|
|
218
218
|
import {
|
|
219
219
|
runInternal,
|
|
220
220
|
summarizeCheckpoint,
|
|
221
221
|
throttleTrailing
|
|
222
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-A3M5WTVC.js";
|
|
223
223
|
import {
|
|
224
224
|
computeDiff,
|
|
225
225
|
computeRangeDiff,
|
|
226
226
|
parseGitDiff
|
|
227
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-POTGMLPV.js";
|
|
228
228
|
import {
|
|
229
229
|
applyPlacePatch,
|
|
230
230
|
applySectionOp,
|
|
@@ -239,7 +239,7 @@ import {
|
|
|
239
239
|
} from "./chunk-LNHSBM4L.js";
|
|
240
240
|
import {
|
|
241
241
|
VERSION
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-UIZEMKED.js";
|
|
243
243
|
import {
|
|
244
244
|
resolveProjectTarget
|
|
245
245
|
} from "./chunk-JTHILJFB.js";
|
|
@@ -281,13 +281,13 @@ import {
|
|
|
281
281
|
CONTEXT_WARN,
|
|
282
282
|
describeView,
|
|
283
283
|
writeAssistantContext
|
|
284
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-3NPEMTQT.js";
|
|
285
285
|
import {
|
|
286
286
|
NOTE_NUDGE,
|
|
287
287
|
findSessionForCwd,
|
|
288
288
|
readPendingForSession,
|
|
289
289
|
readPendingForWorktree
|
|
290
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-LCSWFGIM.js";
|
|
291
291
|
import "./chunk-ZSHWP2VS.js";
|
|
292
292
|
import {
|
|
293
293
|
getCommentFileStore
|
|
@@ -299,7 +299,7 @@ import {
|
|
|
299
299
|
checkTools,
|
|
300
300
|
saveFolders,
|
|
301
301
|
setupState
|
|
302
|
-
} from "./chunk-
|
|
302
|
+
} from "./chunk-NPVMYGT7.js";
|
|
303
303
|
import {
|
|
304
304
|
enrollProblem,
|
|
305
305
|
groupProblem,
|
|
@@ -388,7 +388,7 @@ import {
|
|
|
388
388
|
turnInProgress,
|
|
389
389
|
updateCheckpoint,
|
|
390
390
|
writeArchiveRecord
|
|
391
|
-
} from "./chunk-
|
|
391
|
+
} from "./chunk-723C3D5X.js";
|
|
392
392
|
import {
|
|
393
393
|
activityRoots,
|
|
394
394
|
agentOf,
|
|
@@ -8537,4 +8537,4 @@ export {
|
|
|
8537
8537
|
stopExisting,
|
|
8538
8538
|
webCommand
|
|
8539
8539
|
};
|
|
8540
|
-
//# sourceMappingURL=web-
|
|
8540
|
+
//# sourceMappingURL=web-MWSFIUIJ.js.map
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moberg_hr/work-tree",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@moberg_hr/work-tree",
|
|
9
|
-
"version": "2.0
|
|
9
|
+
"version": "2.1.0",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
package/dist/chunk-4KNBN2OF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/diff/diff-scope.ts","../src/core/platform/web-static.ts","../src/server/local-origin.ts","../src/server/local-server.ts","../src/server/spa-handler.ts","../src/server/diff-server.ts","../src/core/diff/file-context.ts","../src/core/comments/comment-schemas.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { git } from '../git/git.js';\nimport { loadHistory, type WorktreeSession } from '../sessions/history.js';\nimport type { RepoSpec } from './repo-spec.js';\nimport { report } from '../platform/report.js';\n\nexport interface DiffScope {\n isGroup: boolean;\n session: WorktreeSession | null;\n /** Repos to diff (1 for single, N for group). */\n repos: { name: string; root: string }[];\n /** Name of the repo whose subtree the user is in (initial active tab). */\n activeRepoName: string | null;\n}\n\nexport interface ResolvedBase {\n base: string;\n source: 'arg' | 'session' | 'auto-detected' | 'default';\n}\n\nfunction normPath(p: string): string {\n return path.resolve(p).replace(/\\\\/g, '/').toLowerCase();\n}\n\n/**\n * Like {@link normPath} but resolves to the OS-canonical real path.\n * `git rev-parse --show-toplevel` returns the realpath (e.g. macOS `/var` →\n * `/private/var`, and on Windows the long-form name), so comparing it to a\n * stored session path must canonicalize both sides the same way.\n *\n * Uses `realpathSync.native`: the plain `realpathSync` does NOT expand Windows\n * 8.3 short names (`SAMDEV~1` → `SamDev`), so a session path under a\n * short-name parent would never match git's long-form toplevel. `.native`\n * resolves both 8.3 and symlinks. Falls back to {@link normPath} for paths\n * that don't exist (e.g. unit-test fixtures).\n */\nfunction realNorm(p: string): string {\n try {\n return normPath(fs.realpathSync.native(p));\n } catch {\n return normPath(p);\n }\n}\n\n/**\n * Resolve what scope to diff based on cwd. Handles single-repo worktrees,\n * group worktrees (cwd at group root or anywhere inside a sub-repo), and\n * \"random\" git repos not managed by `work`.\n */\nexport function resolveScope(cwd: string): DiffScope | null {\n const normCwd = normPath(cwd);\n const sessions = loadHistory();\n\n // cwd's own git worktree root. Used to reject session-path matches that are\n // really a *parent* repo: linked worktrees often live physically inside\n // another repo (e.g. `<repo>/.claude/worktrees/<branch>`), so a naive prefix\n // match collapses every nested worktree onto the parent's scope — they'd\n // share one daemon and show each other's diff.\n const top = git(['rev-parse', '--show-toplevel'], cwd);\n const toplevel = top.exitCode === 0 && top.stdout ? top.stdout : null;\n const realTop = toplevel ? realNorm(toplevel) : null;\n\n // 1. cwd is at or inside one of a session's repo paths.\n for (const s of sessions) {\n for (const p of s.paths) {\n const np = normPath(p);\n if (normCwd === np || normCwd.startsWith(np + '/')) {\n // Only honour the match if this session path is cwd's actual worktree\n // root. When cwd is in a nested worktree, its toplevel is deeper than\n // `np` — skip so we resolve the real (nested) worktree below.\n if (realTop && realNorm(p) !== realTop) continue;\n if (s.isGroup) {\n return {\n isGroup: true,\n session: s,\n repos: s.paths.map((rp) => ({ name: path.basename(rp), root: rp })),\n activeRepoName: path.basename(p),\n };\n }\n return {\n isGroup: false,\n session: s,\n repos: [{ name: path.basename(p), root: p }],\n activeRepoName: path.basename(p),\n };\n }\n }\n }\n\n // 2. cwd is at the group root (parent of all of a group's repo paths).\n for (const s of sessions) {\n if (!s.isGroup || s.paths.length === 0) continue;\n const parents = s.paths.map((p) => normPath(path.dirname(p)));\n const groupRoot = parents[0];\n if (!parents.every((par) => par === groupRoot)) continue;\n if (normCwd === groupRoot || normCwd.startsWith(groupRoot + '/')) {\n return {\n isGroup: true,\n session: s,\n repos: s.paths.map((rp) => ({ name: path.basename(rp), root: rp })),\n activeRepoName: null,\n };\n }\n }\n\n // 3. Fall back to git rev-parse for repos not managed by `work`.\n if (!toplevel) return null;\n return {\n isGroup: false,\n session: null,\n repos: [{ name: path.basename(toplevel), root: toplevel }],\n activeRepoName: path.basename(toplevel),\n };\n}\n\n/**\n * Find any plausible parent branch — same candidate list as\n * `detectParentBranch`, but DOESN'T require the parent to have commits\n * past HEAD. Returns the candidate with the most-recent merge-base (or\n * null only if no candidates exist at all).\n *\n * Used by the static renderer and the diff server's `?base=branch`\n * route to decide whether to offer the \"Since branch\" tab. `detectParentBranch`\n * skips parents where merge-base == HEAD (correct for the CLI's \"show\n * me what I added past parent\" semantic — empty diff), but the toggle\n * should still appear in that case so the user can confirm \"no, there's\n * nothing committed yet\".\n */\nexport function findAnyParentBranch(cwd: string): string | null {\n return findParent(cwd, false);\n}\n\n/** Walk candidate base branches and pick the one with the most recent merge-base. */\nexport function detectParentBranch(cwd: string): string | null {\n return findParent(cwd, true);\n}\n\nfunction findParent(cwd: string, requireAheadOfParent: boolean): string | null {\n const currentResult = git(['rev-parse', '--abbrev-ref', 'HEAD'], cwd);\n const currentBranch = currentResult.exitCode === 0 ? currentResult.stdout : '';\n\n const candidates = ['main', 'master', 'dev', 'develop'].flatMap((name) => [name, `origin/${name}`]);\n\n let best: { ref: string; sha: string; time: number } | null = null;\n\n for (const ref of candidates) {\n if (ref === currentBranch) continue;\n const exists = git(['rev-parse', '--verify', '--quiet', ref], cwd);\n if (exists.exitCode !== 0 || !exists.stdout) continue;\n\n const mb = git(['merge-base', ref, 'HEAD'], cwd);\n if (mb.exitCode !== 0 || !mb.stdout) continue;\n\n // Skip parents where the merge-base IS HEAD only when the caller\n // asked us to (CLI \"show me what I added\" semantics). When called\n // for the toggle UI, we want to surface the parent even though the\n // diff will be empty.\n if (requireAheadOfParent) {\n const headSha = git(['rev-parse', 'HEAD'], cwd).stdout;\n if (mb.stdout === headSha) continue;\n }\n\n const timeResult = git(['show', '-s', '--format=%ct', mb.stdout], cwd);\n if (timeResult.exitCode !== 0) continue;\n const time = Number(timeResult.stdout);\n if (!Number.isFinite(time)) continue;\n\n if (!best || time > best.time) {\n best = { ref, sha: mb.stdout, time };\n }\n }\n\n return best?.ref ?? null;\n}\n\nexport function resolveBase(scope: DiffScope, argv: { base?: string; branch?: boolean }): ResolvedBase {\n if (argv.base) return { base: argv.base, source: 'arg' };\n\n if (argv.branch) {\n if (scope.session?.baseBranch) {\n return { base: scope.session.baseBranch, source: 'session' };\n }\n const primaryRoot = scope.repos.find((r) => r.name === scope.activeRepoName)?.root ?? scope.repos[0].root;\n const detected = detectParentBranch(primaryRoot);\n if (detected) return { base: detected, source: 'auto-detected' };\n\n report('error', 'Could not determine a parent branch for this worktree.');\n report('detail', 'Pass one explicitly: diff <ref>');\n process.exit(1);\n }\n\n return { base: 'HEAD', source: 'default' };\n}\n\n/**\n * Compute per-repo merge-base when comparing against a non-HEAD ref.\n *\n * `perRepoBase` (keyed by repo root) overrides `base` for individual repos —\n * used by group worktrees forked with different bases per repo\n * (`work tree --base backend=dev --base frontend=feat/x`). A repo without an\n * override falls back to the shared `base`.\n */\nexport function buildRepoSpecs(scope: DiffScope, base: string, perRepoBase?: Record<string, string>): RepoSpec[] {\n return scope.repos.map((r) => {\n const repoBase = perRepoBase?.[r.root] ?? base;\n let diffArg = repoBase;\n if (repoBase !== 'HEAD') {\n const mb = git(['merge-base', repoBase, 'HEAD'], r.root);\n if (mb.exitCode === 0 && mb.stdout) diffArg = mb.stdout;\n }\n return { name: r.name, root: r.root, diffArg };\n });\n}\n\nexport interface ResolvedRepoDiff {\n /** The git ref the diff was computed against. `HEAD` for uncommitted,\n * the resolved parent (e.g. `origin/main`) for branch mode. */\n resolvedBase: string;\n /** The actual argument passed to `git diff` — typically the merge-base\n * sha for branch mode, or `HEAD` for uncommitted. */\n diffArg: string;\n}\n\n/**\n * Resolve the diff target for a single repo. Centralises the\n * \"find-parent → merge-base → fall back to HEAD\" dance that previously\n * lived in three places (scope-routes, web-server, the static renderer).\n *\n * For `base === 'uncommitted'` this is trivially `HEAD`. For\n * `base === 'branch'` it prefers an explicit `sessionBaseBranch` (the\n * value the user recorded with `work tree --base`), falling back to\n * `findAnyParentBranch` (so the toggle stays available even when the\n * branch has no commits past parent yet — diff just renders empty).\n */\nexport function resolveRepoDiff(root: string, base: 'uncommitted' | 'branch', sessionBaseBranch?: string | null): ResolvedRepoDiff {\n if (base === 'uncommitted') {\n return { resolvedBase: 'HEAD', diffArg: 'HEAD' };\n }\n // Prefer a parent we're actually *ahead of* (`detectParentBranch` skips\n // candidates whose merge-base is HEAD, e.g. a `dev` that already contains\n // this branch). `findAnyParentBranch` would pick the most-recent merge-base\n // even when it's HEAD — yielding a useless 0-commit \"since branch\" diff.\n // Fall back to it only so the toggle still resolves to *something*.\n const parent = sessionBaseBranch ?? detectParentBranch(root) ?? findAnyParentBranch(root);\n if (!parent) return { resolvedBase: 'HEAD', diffArg: 'HEAD' };\n let diffArg = 'HEAD';\n const mb = git(['merge-base', parent, 'HEAD'], root);\n if (mb.exitCode === 0 && mb.stdout) diffArg = mb.stdout;\n return { resolvedBase: parent, diffArg };\n}\n\n/**\n * Look up the recorded fork point for a worktree path from session history.\n * Prefers the per-repo base (`baseBranches`) for that exact path, falling\n * back to the session's representative `baseBranch`. Returns undefined when\n * the path isn't a known worktree — callers then auto-detect.\n *\n * Used by the scope diff route, which only carries repo paths (no session),\n * so a `wd` forked with `--base feat/x` still diffs against `feat/x` even\n * though auto-detection wouldn't find a non-mainline parent.\n */\nexport function sessionBaseForPath(root: string): string | undefined {\n const norm = normPath(root);\n for (const s of loadHistory()) {\n for (const p of s.paths) {\n if (normPath(p) === norm) {\n return s.baseBranches?.[p] ?? s.baseBranch;\n }\n }\n }\n return undefined;\n}\n","import fs from 'node:fs';\nimport { packageRoot } from './package-root.js';\nimport http from 'node:http';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst MIME: Record<string, string> = {\n '.html': 'text/html; charset=utf-8',\n '.js': 'application/javascript; charset=utf-8',\n '.mjs': 'application/javascript; charset=utf-8',\n '.css': 'text/css; charset=utf-8',\n '.json': 'application/json; charset=utf-8',\n '.svg': 'image/svg+xml',\n '.ico': 'image/x-icon',\n '.map': 'application/json; charset=utf-8',\n};\n\n/** Resolve the directory shipped by the Vite build. */\nexport function resolveWebRoot(): string | null {\n const entryDir = path.dirname(process.argv[1] ?? '');\n const moduleDir = path.dirname(fileURLToPath(import.meta.url));\n const candidates = [\n path.join(entryDir, 'web'),\n // bundled: this module is inlined into dist/<bin>.js, so dist/web is a\n // sibling of the bundle. Works even when argv[1] is an npm bin symlink\n // (which is not realpath'd, so the entryDir candidate above misses).\n path.join(moduleDir, 'web'),\n // dev/tsx: the package's dist/web (wherever under src/ this module sits).\n ...(packageRoot() ? [path.join(packageRoot()!, 'dist', 'web')] : []),\n ];\n for (const c of candidates) {\n if (fs.existsSync(path.join(c, 'index.html'))) return c;\n }\n return null;\n}\n\n/**\n * Serve a static file under `root`. Returns true if it served a file. Does\n * NOT do SPA fallback — caller decides whether to re-try with /index.html\n * on miss.\n */\nexport function serveStatic(root: string, urlPath: string, res: http.ServerResponse): boolean {\n const clean = urlPath.split('?')[0];\n const requested = clean === '/' ? '/index.html' : clean;\n const filePath = path.join(root, requested);\n const norm = path.normalize(filePath);\n const base = path.normalize(root);\n if (norm !== base && !norm.startsWith(base + path.sep)) return false;\n let stat: fs.Stats;\n try {\n stat = fs.statSync(norm);\n } catch {\n return false;\n }\n if (!stat.isFile()) return false;\n const ext = path.extname(norm).toLowerCase();\n res.writeHead(200, {\n 'Content-Type': MIME[ext] ?? 'application/octet-stream',\n 'Cache-Control': 'no-cache',\n });\n fs.createReadStream(norm).pipe(res);\n return true;\n}\n\n/** Convenience: serve the file if it exists, else fall back to index.html. */\nexport function serveStaticOrShell(root: string, urlPath: string, res: http.ServerResponse): boolean {\n if (serveStatic(root, urlPath, res)) return true;\n if (serveStatic(root, '/index.html', res)) return true;\n return false;\n}\n","/**\n * Who may talk to our localhost servers (work web / wd / comment server).\n *\n * Binding to 127.0.0.1 keeps the network out, and the Host check stops DNS\n * rebinding — but neither stops a web page you have open from making YOUR\n * browser send requests to 127.0.0.1:<port> (cross-site request forgery).\n * The port is predictable and session ids are guessable, and the terminal\n * WebSocket types straight into Claude — so every request that changes\n * something, and every WebSocket upgrade, must come from our own origin.\n *\n * Rules:\n * - Host must be 127.0.0.1:<port> or localhost:<port> (DNS rebinding).\n * - A browser marking the request `Sec-Fetch-Site: cross-site` (or\n * `same-site`: another localhost port) is refused,\n * except a top-level page load (GET/HEAD, `Sec-Fetch-Mode: navigate`,\n * `Sec-Fetch-Dest: document`): clicking a dashboard or diff link in\n * GitHub, Jira or Slack must open it. The opening site can't read the\n * response and a GET changes nothing; frames stay refused, so no other\n * page can embed the dashboard.\n * - Mutating requests (anything but GET/HEAD/OPTIONS) and WebSocket\n * upgrades: `Origin` must be absent (non-browser callers — the Claude\n * hooks, `wd`, the CLI — send none) or exactly our own origin. Browsers\n * always send Origin on cross-origin POSTs and on every WebSocket, and a\n * page can't forge it. `Origin: null` (sandboxed frames, file://) is\n * refused.\n */\n\nexport function allowedHost(host: string | undefined, port: number): boolean {\n return host === `127.0.0.1:${port}` || host === `localhost:${port}`;\n}\n\nexport function allowedOrigin(origin: string | undefined, port: number): boolean {\n if (origin === undefined || origin === '') return true;\n return origin === `http://127.0.0.1:${port}` || origin === `http://localhost:${port}`;\n}\n\nconst SAFE_METHODS = new Set(['GET', 'HEAD', 'OPTIONS']);\n\nexport interface RequestFacts {\n method: string;\n host?: string;\n origin?: string;\n secFetchSite?: string;\n secFetchMode?: string;\n secFetchDest?: string;\n /** A WebSocket upgrade — always checked like a mutating request. */\n upgrade?: boolean;\n}\n\n/** Null when allowed, else a short reason (for the 403 body / logs). */\nexport function refuseReason(req: RequestFacts, port: number): string | null {\n if (!allowedHost(req.host, port)) return 'bad host';\n const mutating = req.upgrade || !SAFE_METHODS.has(req.method.toUpperCase());\n const pageLoad =\n !req.upgrade &&\n ['GET', 'HEAD'].includes(req.method.toUpperCase()) &&\n req.secFetchMode === 'navigate' &&\n req.secFetchDest === 'document';\n // same-site = another localhost port (your dev servers, say): the\n // dashboard itself is always same-origin, so treat it like cross-site.\n if ((req.secFetchSite === 'cross-site' || req.secFetchSite === 'same-site') && !pageLoad) return 'cross-site request';\n if (mutating && !allowedOrigin(req.origin, port)) return 'foreign origin';\n return null;\n}\n","import { report } from '../core/platform/report.js';\nimport { Hono } from 'hono';\nimport { serve, type ServerType } from '@hono/node-server';\nimport { refuseReason } from './local-origin.js';\n\n// The one way to start a local HTTP server (work web, wd, the comment\n// server, the demo): 127.0.0.1 only, random port, behind the Host/Origin\n// guard. Its own module so a server that needs no git/fs — the demo — can\n// use it without importing the diff server.\n\nexport interface DiffServerHandle {\n url: string;\n port: number;\n stop(): Promise<void>;\n}\n\n/** Start a Hono app on a random port; resolve when it's listening. The\n * raw Node server is exposed via `httpServer` so callers can attach\n * WebSocket upgrade handlers (the terminal bridge).\n *\n * Installs a guard (core/local-origin.ts): Host must be ours (DNS\n * rebinding), and mutating requests must not come from another origin\n * (cross-site request forgery from any page open in the browser). The SPA\n * is served same-origin, and Node callers send no Origin, so both pass.\n */\nexport function launch(app: Hono): Promise<DiffServerHandle & { httpServer: ServerType }> {\n return new Promise((resolve) => {\n // Captured before serve() resolves; first guarded request runs after\n // this is set because serve() doesn't accept connections until it's\n // bound, and bind precedes the info-callback.\n let listenPort = 0;\n const guard = new Hono();\n guard.use('*', async (c, next) => {\n // Host (DNS rebinding) + Origin / Sec-Fetch-Site (cross-site request\n // forgery from any page open in the browser) — see local-origin.ts.\n const reason = refuseReason(\n {\n method: c.req.method,\n host: c.req.header('host'),\n origin: c.req.header('origin'),\n secFetchSite: c.req.header('sec-fetch-site'),\n secFetchMode: c.req.header('sec-fetch-mode'),\n secFetchDest: c.req.header('sec-fetch-dest'),\n },\n listenPort,\n );\n if (reason) return c.text(`Forbidden (${reason})`, 403);\n await next();\n });\n guard.route('/', app);\n\n const server: ServerType = serve({ fetch: guard.fetch, port: 0, hostname: '127.0.0.1' }, (info) => {\n listenPort = info.port;\n const url = `http://127.0.0.1:${info.port}/`;\n report('detail', `[server] listening at ${url}`);\n resolve({\n url,\n port: info.port,\n httpServer: server,\n stop: () =>\n new Promise<void>((res) => {\n server.close(() => res());\n }),\n });\n });\n });\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport type { Context } from 'hono';\n\nconst MIME: Record<string, string> = {\n '.html': 'text/html; charset=utf-8',\n '.js': 'application/javascript; charset=utf-8',\n '.mjs': 'application/javascript; charset=utf-8',\n '.css': 'text/css; charset=utf-8',\n '.json': 'application/json; charset=utf-8',\n '.svg': 'image/svg+xml',\n '.ico': 'image/x-icon',\n '.map': 'application/json; charset=utf-8',\n};\n\nfunction readFile(root: string, relPath: string): { body: Buffer; ext: string } | null {\n const clean = relPath.split('?')[0];\n const requested = clean === '/' ? '/index.html' : clean;\n const filePath = path.join(root, requested);\n const norm = path.normalize(filePath);\n if (!norm.startsWith(path.normalize(root))) return null;\n let stat: fs.Stats;\n try {\n stat = fs.statSync(norm);\n } catch {\n return null;\n }\n if (!stat.isFile()) return null;\n const ext = path.extname(norm).toLowerCase();\n return { body: fs.readFileSync(norm), ext };\n}\n\n/**\n * Hono handler for the bundled SPA. Tries to serve the requested file; if it\n * doesn't exist, falls back to index.html so client-side routing works on\n * deep links. Skips /api/* paths entirely (those should be handled by\n * earlier routes; if we reach here it's a 404).\n */\nexport function serveSpa(c: Context, webRoot: string): Response {\n const url = new URL(c.req.url);\n if (url.pathname.startsWith('/api/')) {\n return c.json({ error: 'not found' }, 404);\n }\n const hit = readFile(webRoot, url.pathname) ?? readFile(webRoot, '/index.html');\n if (!hit) return c.json({ error: 'not found' }, 404);\n return new Response(new Uint8Array(hit.body), {\n status: 200,\n headers: {\n 'Content-Type': MIME[hit.ext] ?? 'application/octet-stream',\n 'Cache-Control': 'no-cache',\n },\n });\n}\n","import { launch, type DiffServerHandle } from './local-server.js';\n\nexport { launch, type DiffServerHandle } from './local-server.js';\nimport { Hono, type Context } from 'hono';\nimport { streamSSE } from 'hono/streaming';\nimport { computeDiff } from '../core/diff/diff-pipeline.js';\nimport { readContextLines } from '../core/diff/file-context.js';\nimport { createFsWatcher } from '../core/platform/fs-watcher.js';\nimport { resolveRepoDiff } from '../core/diff/diff-scope.js';\nimport { git } from '../core/git/git.js';\nimport { resolveWebRoot } from '../core/platform/web-static.js';\nimport { serveSpa } from './spa-handler.js';\nimport type { RepoSpec } from '../core/diff/repo-spec.js';\n\nexport interface DiffServerOptions {\n /** Repos this server scopes to. */\n repos: RepoSpec[];\n /** Short human-readable label for /api/context. */\n scopeLabel: string;\n /** Optional session baseBranch (the value captured at `work tree --base`).\n * When set, the `?base=branch` route uses it instead of auto-detection,\n * so the diff matches what the user actually declared. */\n sessionBaseBranch?: string;\n /** Per-repo fork points keyed by repo root. Overrides `sessionBaseBranch`\n * for individual repos in a group forked with different bases per repo. */\n sessionBaseBranches?: Record<string, string>;\n /** Debounce for fs.watch events before broadcasting diff-changed. */\n watchDebounceMs?: number;\n /** When true, /api/context advertises readOnly=true and the SPA hides\n * the comment UI. Default false. */\n readOnly?: boolean;\n /** Called once the base app is built so feature apps (e.g. comments) can\n * mount themselves and emit events via the SSE hub. */\n attachRoutes?: (api: DiffServerApi) => void;\n}\n\n/** A typed SSE event broadcast to every connected client. */\nexport interface SseEvent {\n event: string;\n data: unknown;\n}\n\nexport interface DiffServerApi {\n /** Mount a Hono sub-app at the given path prefix. */\n route(prefix: string, app: Hono): void;\n /** Broadcast on the shared SSE hub. Fan-out is one-shot per client. */\n broadcast(event: string, data: unknown): void;\n}\n\n/**\n * The shared local HTTP server used by both `wd` (read-only) and `wd -c`\n * (comments). Owns the fs watcher, the SSE hub, and the three routes every\n * mode needs: GET /api/context, GET /api/diff, GET /events. Comment routes\n * register themselves via `attachRoutes`.\n */\nexport async function startDiffServer(opts: DiffServerOptions): Promise<DiffServerHandle> {\n const webRoot = resolveWebRoot();\n if (!webRoot) {\n throw new Error('Could not find dist/web/. Run `npm run build` first.');\n }\n\n const sseListeners = new Set<(e: SseEvent) => void>();\n const watcher = createFsWatcher({\n roots: opts.repos.map((r) => r.root),\n debounceMs: opts.watchDebounceMs,\n onChange: () => broadcast('diff-changed', { ts: Date.now() }),\n });\n\n function broadcast(event: string, data: unknown): void {\n const payload: SseEvent = { event, data };\n for (const cb of sseListeners) cb(payload);\n }\n\n const app = new Hono();\n // No CORS headers and no OPTIONS preflight handler — the SPA is served\n // same-origin so its requests don't trigger preflight. The Host guard in\n // `launch` rejects cross-origin requests before they reach any handler.\n\n app.get('/api/context', (c) => {\n // Current branch of the primary repo, for the \"<branch> vs <base>\" title.\n const primaryRoot = opts.repos[0]?.root;\n let headBranch: string | undefined;\n if (primaryRoot) {\n const head = git(['rev-parse', '--abbrev-ref', 'HEAD'], primaryRoot);\n if (head.exitCode === 0 && head.stdout && head.stdout !== 'HEAD') {\n headBranch = head.stdout;\n }\n }\n return c.json({\n mode: 'review',\n scopeLabel: opts.scopeLabel,\n repos: opts.repos.map((r) => ({ name: r.name })),\n readOnly: !!opts.readOnly,\n headBranch,\n });\n });\n\n app.get('/api/diff', (c) => {\n const base = c.req.query('base') === 'branch' ? 'branch' : 'uncommitted';\n try {\n // For 'uncommitted' we honour the configured `diffArg` (typically\n // HEAD) so single-repo callers preserve whatever ref they\n // configured. For 'branch' we delegate to `resolveRepoDiff` per\n // repo — each one resolves its own parent and merge-base. The\n // top-level `resolvedBase` is the primary repo's value (matches\n // scope-routes and web-server behavior for the badge label).\n const resolved = opts.repos.map((r) =>\n base === 'uncommitted'\n ? { resolvedBase: 'HEAD', diffArg: r.diffArg }\n : resolveRepoDiff(r.root, 'branch', opts.sessionBaseBranches?.[r.root] ?? opts.sessionBaseBranch),\n );\n const repos = opts.repos.map((r, i) => ({\n name: r.name,\n root: r.root,\n resolvedBase: resolved[i].resolvedBase,\n files: computeDiff({ root: r.root, diffArg: resolved[i].diffArg }),\n }));\n const resolvedBase = resolved[0]?.resolvedBase ?? 'HEAD';\n return c.json({ repos, base, resolvedBase });\n } catch (err) {\n return c.json({ error: (err as Error).message }, 500);\n }\n });\n\n // Reveal unchanged context lines around a hunk (\"expand lines\"). Maps the\n // SPA's repo name back to its RepoSpec root; single-repo scopes (the\n // common standalone case) skip the lookup.\n app.get('/api/file-lines', (c) => {\n const repoName = c.req.query('repo') ?? '';\n const relPath = c.req.query('path') ?? '';\n const start = Number(c.req.query('start'));\n const end = Number(c.req.query('end'));\n const ref = c.req.query('ref') || undefined;\n if (!relPath || !Number.isInteger(start) || !Number.isInteger(end)) {\n return c.json({ error: 'bad path/start/end' }, 400);\n }\n const root = opts.repos.length === 1 ? opts.repos[0].root : opts.repos.find((r) => r.name === repoName)?.root;\n if (!root) return c.json({ error: 'unknown repo' }, 404);\n const result = readContextLines({ root, relPath, start, end, ref });\n if (!result) return c.json({ error: 'cannot read file' }, 400);\n return c.json(result);\n });\n\n app.get('/events', (c) =>\n streamSSE(c, async (stream) => {\n const listener = (e: SseEvent) => {\n stream.writeSSE({ event: e.event, data: JSON.stringify(e.data) }).catch(() => {\n /* client gone */\n });\n };\n sseListeners.add(listener);\n await stream.writeSSE({ event: 'connected', data: '' });\n // Keep the stream open until the client disconnects.\n await new Promise<void>((resolve) => {\n stream.onAbort(() => {\n sseListeners.delete(listener);\n resolve();\n });\n });\n }),\n );\n\n // attachRoutes can mount Hono sub-apps with their own routes.\n if (opts.attachRoutes) {\n opts.attachRoutes({\n route: (prefix, sub) => app.route(prefix, sub),\n broadcast,\n });\n }\n\n // SPA fallback for the bundled web assets.\n app.get('*', (c: Context) => serveSpa(c, webRoot));\n\n // Wrap the handle so server shutdown also tears down our chokidar watcher.\n // Without this the watcher keeps Node's event loop open after `stop()` —\n // a real test/teardown leak (vitest hangs after a suite that exercises\n // the server) and a wasteful long-running ghost in dev.\n const handle = await launch(app);\n const baseStop = handle.stop;\n return {\n ...handle,\n stop: async () => {\n try {\n watcher.stop();\n } catch {\n /* */\n }\n await baseStop();\n },\n };\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport spawn from '../platform/spawn.js';\nimport { isInsideRoot } from './diff-pipeline.js';\n\nexport interface ContextLinesOptions {\n /** Git toplevel (repo root) the file lives under. */\n root: string;\n /** Repo-relative path of the file. */\n relPath: string;\n /** 1-based inclusive first line to return. */\n start: number;\n /** 1-based inclusive last line to return. */\n end: number;\n /** When omitted or `'working'`, read the working-tree file. Otherwise the\n * content comes from `git show <ref>:<relPath>` — used when the diff's\n * \"new\" side is a committed snapshot (checkpoint range) rather than the\n * live tree. */\n ref?: string;\n}\n\nexport interface ContextLinesResult {\n /** The requested slice. Shorter than `end - start + 1` when the file ends\n * before `end`. */\n lines: string[];\n /** Echoed 1-based first line of `lines` (clamped to >= 1). */\n start: number;\n /** Total line count of the file at this ref. */\n totalLines: number;\n /** True when `end` reached (or passed) the last line — there is nothing\n * further below to expand. */\n eof: boolean;\n}\n\n/**\n * Read a contiguous range of lines from a file so the diff viewer can\n * reveal the unchanged context around hunks (\"expand lines\" in GitHub's\n * UI). The expandable region is, by definition, identical on both diff\n * sides, so a single read of the appropriate side is enough — the caller\n * maps the old line numbers via the constant gap offset.\n *\n * Path safety mirrors `readMarkdownContent` in diff-pipeline: the textual\n * `relPath` is rejected if it escapes `root`, and the working-tree read is\n * symlink-canonicalised so a `notes.md -> /etc/passwd` symlink can't\n * exfiltrate an out-of-tree file into the payload.\n *\n * Returns `null` when the path is rejected or the content can't be read\n * (missing file, unknown ref, binary). Callers surface that as a 404/400.\n */\nexport function readContextLines(opts: ContextLinesOptions): ContextLinesResult | null {\n const { root, relPath, ref } = opts;\n if (!relPath || !isInsideRoot(root, relPath)) return null;\n\n const start = Math.max(1, Math.floor(opts.start));\n const end = Math.max(start, Math.floor(opts.end));\n\n const content = !ref || ref === 'working' ? readWorkingTree(root, relPath) : readAtRef(root, ref, relPath);\n if (content === null) return null;\n\n // Split on either line ending; drop the trailing empty element a final\n // newline produces so `totalLines` matches the line count git/editors\n // report. Matches how `parseGitDiff` strips line endings from hunk text,\n // so revealed context lines render identically to diff context lines.\n const all = content.split(/\\r?\\n/);\n if (all.length > 0 && all[all.length - 1] === '') all.pop();\n\n const totalLines = all.length;\n // start past EOF → empty slice, eof true.\n const slice = all.slice(start - 1, end);\n return {\n lines: slice,\n start,\n totalLines,\n eof: end >= totalLines,\n };\n}\n\n/** Symlink-safe working-tree read. Returns null on any failure. */\nfunction readWorkingTree(root: string, relPath: string): string | null {\n try {\n const absPath = path.join(root, relPath);\n const realRoot = fs.realpathSync(path.resolve(root));\n const realPath = fs.realpathSync(absPath);\n const sep = path.sep;\n if (realPath !== realRoot && !realPath.startsWith(realRoot + sep)) {\n return null;\n }\n return fs.readFileSync(absPath, 'utf-8');\n } catch {\n return null;\n }\n}\n\n/**\n * A ref we may hand to `git show`: a commit id, or a plain ref name. It\n * comes from a query string, and `git show` takes options — a ref of\n * `--output=/some/file` would make it WRITE a file. So nothing that starts\n * with `-`, and only characters refs actually use.\n */\nexport function isSafeRef(ref: string): boolean {\n return /^[A-Za-z0-9_][A-Za-z0-9._/~^@{}+-]{0,199}$/.test(ref) && !ref.includes('..');\n}\n\n/** `git show <ref>:<relPath>`. Uses cross-spawn directly (not the trimming\n * `git()` helper) so trailing newlines survive. Returns null on failure\n * (including a ref that isn't safe to pass — see isSafeRef). */\nfunction readAtRef(root: string, ref: string, relPath: string): string | null {\n if (!isSafeRef(ref)) return null;\n const r = spawn.sync('git', ['show', '--end-of-options', `${ref}:${relPath}`], {\n cwd: root,\n encoding: 'utf-8',\n maxBuffer: 64 * 1024 * 1024,\n windowsHide: true,\n });\n if (r.status === 0 && typeof r.stdout === 'string') return r.stdout;\n return null;\n}\n","/**\n * Shared zod schemas for the comment HTTP surface. Kept separate from\n * `comment-types.ts` because the SPA imports `comment-types.ts` for the\n * type-only exports and pulling zod into the SPA bundle is wasteful —\n * the schemas are server-side validation only.\n */\n\nimport { z } from 'zod';\n\nexport const commentInputSchema = z.object({\n repo: z.string().optional(),\n file: z.string().optional(),\n line: z.number().int().optional(),\n side: z.enum(['left', 'right', 'general', 'file']).optional(),\n body: z.string().min(1),\n status: z.enum(['published', 'draft']).optional(),\n lineContent: z.string().optional(),\n parentId: z.string().optional(),\n author: z.enum(['user', 'claude']).optional(),\n});\n\nexport const submitReviewSchema = z.object({\n summary: z.string().optional(),\n});\n\nexport const resolveSchema = z.object({\n resolved: z.boolean(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAoBjB,SAAS,SAAS,GAAmB;AACnC,SAAO,KAAK,QAAQ,CAAC,EAAE,QAAQ,OAAO,GAAG,EAAE,YAAY;AACzD;AAcA,SAAS,SAAS,GAAmB;AACnC,MAAI;AACF,WAAO,SAAS,GAAG,aAAa,OAAO,CAAC,CAAC;AAAA,EAC3C,QAAQ;AACN,WAAO,SAAS,CAAC;AAAA,EACnB;AACF;AAOO,SAAS,aAAa,KAA+B;AAC1D,QAAM,UAAU,SAAS,GAAG;AAC5B,QAAM,WAAW,YAAY;AAO7B,QAAM,MAAM,IAAI,CAAC,aAAa,iBAAiB,GAAG,GAAG;AACrD,QAAM,WAAW,IAAI,aAAa,KAAK,IAAI,SAAS,IAAI,SAAS;AACjE,QAAM,UAAU,WAAW,SAAS,QAAQ,IAAI;AAGhD,aAAW,KAAK,UAAU;AACxB,eAAW,KAAK,EAAE,OAAO;AACvB,YAAM,KAAK,SAAS,CAAC;AACrB,UAAI,YAAY,MAAM,QAAQ,WAAW,KAAK,GAAG,GAAG;AAIlD,YAAI,WAAW,SAAS,CAAC,MAAM,QAAS;AACxC,YAAI,EAAE,SAAS;AACb,iBAAO;AAAA,YACL,SAAS;AAAA,YACT,SAAS;AAAA,YACT,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,EAAE,GAAG,MAAM,GAAG,EAAE;AAAA,YAClE,gBAAgB,KAAK,SAAS,CAAC;AAAA,UACjC;AAAA,QACF;AACA,eAAO;AAAA,UACL,SAAS;AAAA,UACT,SAAS;AAAA,UACT,OAAO,CAAC,EAAE,MAAM,KAAK,SAAS,CAAC,GAAG,MAAM,EAAE,CAAC;AAAA,UAC3C,gBAAgB,KAA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