@qwen-code/qwen-code 0.19.12-preview.0 → 0.20.0-nightly.20260720.0c271659d

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 (277) hide show
  1. package/bundled/qc-helper/docs/features/channels/overview.md +4 -2
  2. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  3. package/bundled/qc-helper/docs/qwen-serve.md +42 -5
  4. package/bundled/review/DESIGN.md +2 -2
  5. package/bundled/review/SKILL.md +13 -9
  6. package/chunks/{MaxSizedBox-3KIWAU6Z.js → MaxSizedBox-ED3QND6V.js} +30 -27
  7. package/chunks/{StandaloneSessionPicker-TF626NO7.js → StandaloneSessionPicker-NQVAOTKS.js} +50 -45
  8. package/chunks/{acpAgent-JDVJXVBO.js → acpAgent-HOBFF5B6.js} +353 -130
  9. package/chunks/{agent-BONWC4VY.js → agent-J7EPFLA6.js} +22 -22
  10. package/chunks/{agent-headless-H7HKMGLZ.js → agent-headless-RRG3JU7Q.js} +22 -22
  11. package/chunks/{anthropicContentGenerator-ZZRGFEES.js → anthropicContentGenerator-HVKLXOOU.js} +6 -5
  12. package/chunks/{artifact-tool-PHO5XEGZ.js → artifact-tool-WBCAMD3O.js} +2 -2
  13. package/chunks/{askUserQuestion-CEPBT47X.js → askUserQuestion-6DZC4UV5.js} +2 -2
  14. package/chunks/{bridge-ATN2TLWJ.js → bridge-OW5FZ6BF.js} +25 -25
  15. package/chunks/build-SSCNEHZZ.js +62 -0
  16. package/chunks/{channel-worker-group-S3H5QHTI.js → channel-worker-group-53CMOPFT.js} +4 -4
  17. package/chunks/{channel-worker-manager-ZJ4HTMO2.js → channel-worker-manager-UTXILKC2.js} +4 -4
  18. package/chunks/{channel-worker-supervisor-JA6VZ5V5.js → channel-worker-supervisor-ZGO2W2MD.js} +3 -3
  19. package/chunks/chunk-27AJEU6G.js +442 -0
  20. package/chunks/{chunk-53UMEONK.js → chunk-2HOVDT7W.js} +1 -1
  21. package/chunks/{chunk-6WZZHJSZ.js → chunk-2JOLZA6L.js} +5 -5
  22. package/chunks/{chunk-NSZJQACR.js → chunk-2TDSM7I6.js} +3 -3
  23. package/chunks/{chunk-ILQ42UG6.js → chunk-2YJLFCYI.js} +7 -7
  24. package/chunks/{chunk-CMHJEUVB.js → chunk-37MGCVTS.js} +1 -1
  25. package/chunks/{chunk-F2YCCUXI.js → chunk-3ML52IFS.js} +4 -4
  26. package/chunks/{chunk-3PE7OY2G.js → chunk-3QR5MOHP.js} +2 -2
  27. package/chunks/{chunk-4AGBO6RB.js → chunk-3SNKL6L6.js} +29 -13
  28. package/chunks/{chunk-OZWJAFFE.js → chunk-3ZL6YMO2.js} +3 -3
  29. package/chunks/chunk-43T5WDQ7.js +127 -0
  30. package/chunks/{chunk-E655RDRL.js → chunk-4ODB7WIB.js} +1 -1
  31. package/chunks/{chunk-66F4IJ4L.js → chunk-4UH63YE5.js} +5 -5
  32. package/chunks/{chunk-QGONRHUS.js → chunk-53OPIXUE.js} +3 -3
  33. package/chunks/{chunk-HTHUX2T5.js → chunk-5QWWOFGG.js} +0 -1
  34. package/chunks/{chunk-3DJY4IFO.js → chunk-5SCI6E3E.js} +1 -1
  35. package/chunks/{chunk-4CHDYDG3.js → chunk-6EFTQYW7.js} +1 -1
  36. package/chunks/{chunk-4W55BHOC.js → chunk-6HQW55TM.js} +29 -2
  37. package/chunks/{chunk-LODZMRXC.js → chunk-6MN6XJTR.js} +2379 -1291
  38. package/chunks/{chunk-EWPLL4OT.js → chunk-6VGRTGOG.js} +1 -1
  39. package/chunks/{chunk-R32BTEZY.js → chunk-7JQK6FXK.js} +198 -120
  40. package/chunks/{chunk-SMASS3CY.js → chunk-A4TJMY65.js} +1 -1
  41. package/chunks/{chunk-JUNVFQVY.js → chunk-AMRWCMX4.js} +4 -4
  42. package/chunks/{chunk-XAAEDML2.js → chunk-AYCDXHZB.js} +1 -1
  43. package/chunks/{chunk-VAJS2E2D.js → chunk-BDBMYST4.js} +1 -1
  44. package/chunks/{chunk-F2RR4HO2.js → chunk-BVLROR2T.js} +1 -1
  45. package/chunks/{chunk-UE5TZ55T.js → chunk-C27BYUX6.js} +29 -2
  46. package/chunks/{chunk-ZPVGEMVC.js → chunk-CL7IRYTA.js} +1 -1
  47. package/chunks/{chunk-DULSE2SH.js → chunk-COWNNAWJ.js} +1 -1
  48. package/chunks/{chunk-UOA2IHRI.js → chunk-CPCVCKKF.js} +1 -1
  49. package/chunks/{chunk-4RPARQ5D.js → chunk-D2VIDMVM.js} +2 -2
  50. package/chunks/{chunk-PTXVHS2O.js → chunk-DCCW7CRR.js} +6 -6
  51. package/chunks/chunk-DIKIJS6Z.js +114 -0
  52. package/chunks/{chunk-NVUGS23Y.js → chunk-DR5AUNJ2.js} +4 -4
  53. package/chunks/{chunk-7KS72E2N.js → chunk-DSBCU6JY.js} +3 -3
  54. package/chunks/{chunk-LKR7QQ63.js → chunk-EAUYY7SS.js} +3 -3
  55. package/chunks/{chunk-J2MKYJKZ.js → chunk-EIAK6Q2B.js} +2 -2
  56. package/chunks/{chunk-WEPXQKGP.js → chunk-EZVDJFZ7.js} +1 -1
  57. package/chunks/{chunk-WHQNBBWW.js → chunk-FLSVD6BS.js} +2 -2
  58. package/chunks/{chunk-XACBIZJB.js → chunk-FODJ5Q5K.js} +3 -3
  59. package/chunks/{chunk-4XCVGEEX.js → chunk-FSL5W5TI.js} +3 -3
  60. package/chunks/{chunk-K7P34F2J.js → chunk-FWT66O5E.js} +2 -2
  61. package/chunks/{chunk-OSSDHJDU.js → chunk-G45X5TRN.js} +1 -1
  62. package/chunks/{chunk-R4RIMOJL.js → chunk-G6MDKXDP.js} +12 -12
  63. package/chunks/{chunk-KANTXY7B.js → chunk-GKY2OJ7R.js} +2 -2
  64. package/chunks/chunk-GMGDLUC7.js +37 -0
  65. package/chunks/{chunk-J6NT5YTN.js → chunk-H2XVO6NE.js} +1 -289
  66. package/chunks/{chunk-7OZGMFHC.js → chunk-I4HZ4GOD.js} +8 -8
  67. package/chunks/{chunk-YN2I5I42.js → chunk-I6JUVU7J.js} +34 -24
  68. package/chunks/{chunk-LLIGYAQU.js → chunk-IDGTC5AS.js} +3 -3
  69. package/chunks/{chunk-LHEQDKAR.js → chunk-INL2RSLA.js} +1 -1
  70. package/chunks/{chunk-CXWUXRD5.js → chunk-INQQM52C.js} +18 -16
  71. package/chunks/{chunk-2DZ7E27L.js → chunk-JBCFW3IL.js} +2 -2
  72. package/chunks/{chunk-LPHGXXZX.js → chunk-JD3MKVKL.js} +1 -1
  73. package/chunks/{chunk-6TDA4EVC.js → chunk-JDPCOUZ3.js} +2282 -662
  74. package/chunks/{chunk-NUHSLBJZ.js → chunk-JNWZQ27S.js} +15 -9
  75. package/chunks/{chunk-IKLWU6YS.js → chunk-JRJ2LV6P.js} +6 -226
  76. package/chunks/{chunk-QSG4ZFG4.js → chunk-KTUQMDEP.js} +1 -1
  77. package/chunks/{chunk-HZXU6YZW.js → chunk-LTQ5C5AB.js} +4 -4
  78. package/chunks/{chunk-V4PCIS25.js → chunk-MAQQGNQ5.js} +44 -1
  79. package/chunks/{chunk-BEFQGC6H.js → chunk-NBMIC7DR.js} +2 -2
  80. package/chunks/{chunk-GEHSF7MS.js → chunk-NEEB7UEN.js} +2545 -1974
  81. package/chunks/{chunk-MHEZV3OY.js → chunk-NIJEXGV6.js} +250 -75
  82. package/chunks/{chunk-NGTQA57Y.js → chunk-NQVA6O7F.js} +2 -2
  83. package/chunks/{chunk-54KPEDM2.js → chunk-NT324EJ6.js} +13 -8
  84. package/chunks/{chunk-WTHRMVKB.js → chunk-O2SPEQFA.js} +5 -5
  85. package/chunks/{chunk-MCYZTKBV.js → chunk-OLMETXLX.js} +2 -2
  86. package/chunks/{chunk-JCJPZMJV.js → chunk-OOCI5VVU.js} +1 -1
  87. package/chunks/{chunk-XSPFQQRE.js → chunk-OONJNQ42.js} +3 -3
  88. package/chunks/{chunk-ANRANWVE.js → chunk-OP4MOGXF.js} +1 -1
  89. package/chunks/{chunk-SGPFJMRP.js → chunk-PBATSWUQ.js} +1 -1
  90. package/chunks/chunk-QKYTTBYW.js +624 -0
  91. package/chunks/{chunk-4OVECYBM.js → chunk-QOSKUG5P.js} +77 -20
  92. package/chunks/{chunk-76BFY7AF.js → chunk-QTERJVPZ.js} +1 -6
  93. package/chunks/{chunk-Y5UDBQYF.js → chunk-RB7NXUP5.js} +3 -3
  94. package/chunks/{chunk-HCCR43AY.js → chunk-RFIAR4YL.js} +1 -1
  95. package/chunks/{chunk-XFJU7SVP.js → chunk-RS5JPH6Y.js} +3 -3
  96. package/chunks/chunk-RS7MT2QG.js +305 -0
  97. package/chunks/{chunk-WACI4VES.js → chunk-SG2PEESS.js} +1106 -592
  98. package/chunks/{chunk-FEZXQXW2.js → chunk-SLLG5XXE.js} +1 -1
  99. package/chunks/{chunk-W4DFAUAO.js → chunk-SQMTULHJ.js} +1 -1
  100. package/chunks/{chunk-Z4ZCVYJ5.js → chunk-STFP7PJR.js} +6 -6
  101. package/chunks/chunk-SV5PQVQE.js +71 -0
  102. package/chunks/{chunk-7LMAKIWE.js → chunk-TFNZCC4B.js} +1 -1
  103. package/chunks/{chunk-ZFHHBRRA.js → chunk-THNJYTA6.js} +2 -2
  104. package/chunks/{chunk-6QGZVKOO.js → chunk-TN2BYMNH.js} +69 -2216
  105. package/chunks/{chunk-TFV3XVAZ.js → chunk-TQBA6DVX.js} +1 -1
  106. package/chunks/{chunk-AWOU24F6.js → chunk-U24E4R5U.js} +3 -3
  107. package/chunks/{chunk-4CA4WUMS.js → chunk-UEY4AYUL.js} +2 -2
  108. package/chunks/{chunk-DYUPBU7H.js → chunk-UGRL5B5F.js} +1 -1
  109. package/chunks/chunk-V7RNNPGC.js +44 -0
  110. package/chunks/{chunk-LYFDJTXE.js → chunk-VGFFYNBD.js} +1 -1
  111. package/chunks/chunk-VIOFKPPN.js +125 -0
  112. package/chunks/{chunk-BEZPRKD3.js → chunk-VLDBVLC4.js} +156 -2
  113. package/chunks/{chunk-HQ7MDVBO.js → chunk-VWLLDHAY.js} +6 -6
  114. package/chunks/chunk-WCDH2CRI.js +1187 -0
  115. package/chunks/{chunk-7SX6WZNO.js → chunk-XVVH63JG.js} +3 -3
  116. package/chunks/{chunk-HVWPSGDY.js → chunk-Y2ENGUD6.js} +1 -1
  117. package/chunks/{chunk-PSISZNIT.js → chunk-Y5534U4G.js} +346 -122
  118. package/chunks/{chunk-IQRQVPGN.js → chunk-YDZ6J2BY.js} +72 -159
  119. package/chunks/{chunk-7O7WZH7N.js → chunk-YNBP3YSU.js} +7 -6
  120. package/chunks/{chunk-NJQPQ4IO.js → chunk-YWEW33JY.js} +7 -7
  121. package/chunks/{chunk-335ECZTA.js → chunk-ZEOZL37W.js} +1 -1
  122. package/chunks/{chunk-SNONG66P.js → chunk-ZGJ4LDD2.js} +53 -28
  123. package/chunks/{computer-use-UY4A72X7.js → computer-use-ET5476VX.js} +22 -22
  124. package/chunks/{config-utils-KWTRFP7D.js → config-utils-AHQ6YZ66.js} +3 -3
  125. package/chunks/{contextCommand-3DZ2SVH6.js → contextCommand-QIULFDBF.js} +25 -26
  126. package/chunks/{create-sub-session-OT7WXLDO.js → create-sub-session-BVL2ZHTM.js} +22 -22
  127. package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-P26FE5GG.js} +2 -2
  128. package/chunks/{cron-create-X462ERYA.js → cron-create-JWFHBDRQ.js} +4 -4
  129. package/chunks/{cron-delete-SL5UJUM3.js → cron-delete-GDX4E26G.js} +4 -4
  130. package/chunks/{cron-list-3MD6SVXI.js → cron-list-USMAIWPT.js} +4 -4
  131. package/chunks/{daemon-ZW6LHOXT.js → daemon-EE5T3KOW.js} +169 -84
  132. package/chunks/{daemon-status-provider-GTZOYSBO.js → daemon-status-provider-L5UW7TGV.js} +29 -29
  133. package/chunks/{dist-RZBJT5O2.js → dist-2BHAYBKP.js} +1 -1
  134. package/chunks/{dist-O2IP3G5D.js → dist-2MIU4UUH.js} +1 -1
  135. package/chunks/{dist-HCUUS6IH.js → dist-53PZYC5B.js} +2 -2
  136. package/chunks/{dist-ZJHKKWUD.js → dist-AU7NQQRP.js} +1 -1
  137. package/chunks/{dist-YTPTCUAD.js → dist-FUTEXY6A.js} +1 -1
  138. package/chunks/{dist-Y54RURGT.js → dist-WGTQO7F2.js} +1 -1
  139. package/chunks/{earlyInputCapture-GGWVGBZ7.js → earlyInputCapture-ZLAL5GTE.js} +23 -23
  140. package/chunks/{edit-JN467GIR.js → edit-4ZOPT6OC.js} +23 -23
  141. package/chunks/{enter-worktree-MMO4VBQE.js → enter-worktree-DFP5CZYS.js} +22 -22
  142. package/chunks/{enterPlanMode-BRZOG4DB.js → enterPlanMode-7VEJ7A2A.js} +22 -22
  143. package/chunks/{environment-LOCDCWMZ.js → environment-KHS35XJY.js} +24 -24
  144. package/chunks/{errors-XXSL5HGG.js → errors-574WBU5R.js} +24 -24
  145. package/chunks/{exit-worktree-UD7PI5H5.js → exit-worktree-5Q7V6D4C.js} +22 -22
  146. package/chunks/{exitPlanMode-EIUETQI6.js → exitPlanMode-SX2F6PDJ.js} +22 -22
  147. package/chunks/{fast-path-ULGAEUVK.js → fast-path-G7BLOZVF.js} +2 -2
  148. package/chunks/{gemini-KW3APZ4P.js → gemini-M4JWSTGU.js} +70 -68
  149. package/chunks/{geminiContentGenerator-4BQ5QHPR.js → geminiContentGenerator-MKXLUFUH.js} +4 -4
  150. package/chunks/{glob-FPKAMR6B.js → glob-FPKZY5W6.js} +22 -22
  151. package/chunks/{grep-MOGRCYB4.js → grep-RS22OMZG.js} +22 -22
  152. package/chunks/{handleAutoUpdate-QUMRZZOS.js → handleAutoUpdate-RFNQ36JC.js} +27 -28
  153. package/chunks/{i18n-F3W6YUYP.js → i18n-MAEWSKYF.js} +23 -23
  154. package/chunks/{initializer-KLU2KAIZ.js → initializer-T2BFZJBP.js} +28 -28
  155. package/chunks/{installationInfo-P3ZP2SIZ.js → installationInfo-3UETF773.js} +25 -23
  156. package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-DWRJMNH3.js} +2 -2
  157. package/chunks/{list-4X6D5JD2.js → list-FWZUKWD2.js} +30 -30
  158. package/chunks/{loadedSettingsAdapter-446B6WKA.js → loadedSettingsAdapter-3DUNHAPX.js} +27 -27
  159. package/chunks/{loop-wakeup-6H7OENTB.js → loop-wakeup-5GLTUBHA.js} +5 -5
  160. package/chunks/{ls-APTSOOS5.js → ls-FHBY3Y7I.js} +4 -4
  161. package/chunks/{lsp-HPACPJAN.js → lsp-B6VMEW6Y.js} +2 -2
  162. package/chunks/{mcp-JYVOJZOD.js → mcp-POXS7QWD.js} +27 -27
  163. package/chunks/{monitor-KY7YH7TL.js → monitor-2ZZC2NKH.js} +22 -22
  164. package/chunks/nonInteractiveCli-WSJVCB2W.js +126 -0
  165. package/chunks/{notebook-edit-IHGW42QK.js → notebook-edit-BMQLME3Q.js} +23 -23
  166. package/chunks/{openaiContentGenerator-FURUCKQJ.js → openaiContentGenerator-GOREG72R.js} +11 -11
  167. package/chunks/{pidfile-WKUVXDMR.js → pidfile-MVZDE5TC.js} +23 -23
  168. package/chunks/{processUtils-LHSRN76X.js → processUtils-RH5KNLDH.js} +2 -2
  169. package/chunks/{qwenContentGenerator-NRLM7R36.js → qwenContentGenerator-R55BCLRI.js} +24 -24
  170. package/chunks/{qwenOAuth2-5FNX3AWH.js → qwenOAuth2-QZBI2SOZ.js} +11 -11
  171. package/chunks/react-SG7JAQSZ.js +8 -0
  172. package/chunks/{read-file-VLEAEXFP.js → read-file-CPS2CYYG.js} +8 -8
  173. package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-AKCL7I43.js} +2 -2
  174. package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-PEUB7727.js} +2 -2
  175. package/chunks/resumeHistoryUtils-YD6DSYHU.js +78 -0
  176. package/chunks/{ripGrep-MT23EIDD.js → ripGrep-UKGJ7RHZ.js} +22 -22
  177. package/chunks/{run-qwen-serve-5HWOQFLI.js → run-qwen-serve-GFKSKLF6.js} +1442 -148
  178. package/chunks/{runtime-6IVKJSLW.js → runtime-4KGNL3TP.js} +31 -31
  179. package/chunks/{scheduler-63GJG75U.js → scheduler-GJ3CELWI.js} +22 -22
  180. package/chunks/{send-message-5GZ4FX2V.js → send-message-3RHE7HSM.js} +3 -3
  181. package/chunks/{serve-3LL7RRDP.js → serve-UU6Z4C7W.js} +27 -27
  182. package/chunks/{server-AA24QLPA.js → server-RTJUMN24.js} +393 -256
  183. package/chunks/{session-LRVCFQQQ.js → session-EYD3CEB5.js} +79 -163
  184. package/chunks/{settings-ZX3OKUT4.js → settings-H5O22TGQ.js} +26 -26
  185. package/chunks/{shell-KR3IMYH6.js → shell-KVNHDHMT.js} +22 -22
  186. package/chunks/{skill-QLM2LSF7.js → skill-32525KCE.js} +10 -10
  187. package/chunks/{spawnChannel-6WFOK3SA.js → spawnChannel-G7DUQKHL.js} +24 -24
  188. package/chunks/{src-ADLNIPHD.js → src-DUFUUEHE.js} +52 -22
  189. package/chunks/{standalone-update-C54OTJWJ.js → standalone-update-UC6CWBLH.js} +24 -24
  190. package/chunks/{startInteractiveUI-KFAOS6HC.js → startInteractiveUI-A5YYAWLF.js} +5455 -2041
  191. package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-FG5PQKIR.js} +3 -3
  192. package/chunks/{task-create-DUE2PMNI.js → task-create-HX32YXO7.js} +7 -7
  193. package/chunks/{task-list-WVPNX7BZ.js → task-list-QWSY4ZIU.js} +5 -5
  194. package/chunks/{task-stop-CPEQWOT6.js → task-stop-GWC6UWAL.js} +2 -2
  195. package/chunks/{task-update-HY2LNFFB.js → task-update-NCTAB73Q.js} +7 -7
  196. package/chunks/{team-create-Q5B5M7UD.js → team-create-LS2Q32Y4.js} +22 -22
  197. package/chunks/{team-delete-JJV6IUOA.js → team-delete-KK37HTOG.js} +5 -5
  198. package/chunks/{team-plan-approval-J55PXNY2.js → team-plan-approval-DWCZABX6.js} +22 -22
  199. package/chunks/{theme-manager-QWTDRPHV.js → theme-manager-E22CNBIL.js} +23 -23
  200. package/chunks/{todoWrite-JHHIDOIV.js → todoWrite-ERCAMLFS.js} +4 -4
  201. package/chunks/{tool-search-LSSKWZKH.js → tool-search-MHXUDFD2.js} +9 -9
  202. package/chunks/{total-session-admission-S6ATY5HY.js → total-session-admission-KOPTGDJZ.js} +25 -25
  203. package/chunks/{trustedFolders-CY4TUPDJ.js → trustedFolders-ANQXYAQT.js} +23 -23
  204. package/chunks/{update-relaunch-IOKOUV3K.js → update-relaunch-HFGRB7PE.js} +9 -9
  205. package/chunks/{updateCheck-YNRFE4V7.js → updateCheck-EKIPND4B.js} +33 -26
  206. package/chunks/useAutoAcceptIndicator-EE22V2F5.js +80 -0
  207. package/chunks/{validateNonInterActiveAuth-OXTECS4B.js → validateNonInterActiveAuth-RUICXVPH.js} +61 -63
  208. package/chunks/{version-2CZQQDL5.js → version-QLT755OV.js} +1 -1
  209. package/chunks/{web-fetch-7QTEGJI5.js → web-fetch-DINW4Z65.js} +10 -10
  210. package/chunks/{workflow-G3CZU256.js → workflow-GPMXRWKK.js} +23 -23
  211. package/chunks/{workspace-providers-status-UHQOIPAZ.js → workspace-providers-status-XCQKBVSX.js} +30 -30
  212. package/chunks/{workspace-registration-store-5WPCMX4F.js → workspace-registration-store-4I4KL7TN.js} +1 -1
  213. package/chunks/{workspace-registry-LAQCRQTH.js → workspace-registry-N4J57SFQ.js} +25 -25
  214. package/chunks/{workspace-service-6ZEUJY2Z.js → workspace-service-JJNJWVH3.js} +32 -32
  215. package/chunks/{workspace-skills-status-YG6OITSM.js → workspace-skills-status-CEHLAQ2Y.js} +28 -28
  216. package/chunks/{write-file-E7T3PU3B.js → write-file-XRGEJRCC.js} +23 -23
  217. package/cli.js +11 -11
  218. package/package.json +3 -3
  219. package/web-shell/assets/{arc-_dVIKMdB.js → arc-DwJhljn9.js} +1 -1
  220. package/web-shell/assets/{architectureDiagram-3BPJPVTR-MuN3nKpL.js → architectureDiagram-3BPJPVTR-qdxSRav-.js} +1 -1
  221. package/web-shell/assets/{blockDiagram-GPEHLZMM-BtmvJjzx.js → blockDiagram-GPEHLZMM-2-dKM5aM.js} +1 -1
  222. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dvi58_BU.js → c4Diagram-AAUBKEIU-Dt_Nu2HD.js} +1 -1
  223. package/web-shell/assets/channel-C6uyh95L.js +1 -0
  224. package/web-shell/assets/{chunk-2J33WTMH-YqxOVhS1.js → chunk-2J33WTMH-CBCeeNfD.js} +1 -1
  225. package/web-shell/assets/{chunk-4BX2VUAB-DoBgbC9z.js → chunk-4BX2VUAB-DPAzjqNs.js} +1 -1
  226. package/web-shell/assets/{chunk-55IACEB6-3NEQrBAr.js → chunk-55IACEB6-yrqyxvIK.js} +1 -1
  227. package/web-shell/assets/{chunk-727SXJPM-DrCZQxp0.js → chunk-727SXJPM-DguD_BBT.js} +1 -1
  228. package/web-shell/assets/{chunk-AQP2D5EJ-m_g3zjgv.js → chunk-AQP2D5EJ-KRUOG9v0.js} +1 -1
  229. package/web-shell/assets/{chunk-FMBD7UC4-D1_crABJ.js → chunk-FMBD7UC4-C0lilT2U.js} +1 -1
  230. package/web-shell/assets/{chunk-ND2GUHAM-BdhgVtBx.js → chunk-ND2GUHAM-DG9epIWK.js} +1 -1
  231. package/web-shell/assets/{chunk-QZHKN3VN-BlmThhm-.js → chunk-QZHKN3VN-PdJDkYHw.js} +1 -1
  232. package/web-shell/assets/classDiagram-4FO5ZUOK-Cv8Ulf-B.js +1 -0
  233. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cv8Ulf-B.js +1 -0
  234. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cbjm_00Z.js → cose-bilkent-S5V4N54A-BAOPPuJm.js} +1 -1
  235. package/web-shell/assets/{dagre-BM42HDAG-C39QNVgC.js → dagre-BM42HDAG-CDHJv82_.js} +1 -1
  236. package/web-shell/assets/{diagram-2AECGRRQ-DNXSAixC.js → diagram-2AECGRRQ-C_hkG5fN.js} +1 -1
  237. package/web-shell/assets/{diagram-5GNKFQAL-BCbGUPEA.js → diagram-5GNKFQAL-e9zo_eKt.js} +1 -1
  238. package/web-shell/assets/{diagram-KO2AKTUF-1eujKSDC.js → diagram-KO2AKTUF-BFN41SCb.js} +1 -1
  239. package/web-shell/assets/{diagram-LMA3HP47-DUMKXgql.js → diagram-LMA3HP47-DG72N0W0.js} +1 -1
  240. package/web-shell/assets/{diagram-OG6HWLK6-BFktU3_u.js → diagram-OG6HWLK6-Dkmp-tdv.js} +1 -1
  241. package/web-shell/assets/{erDiagram-TEJ5UH35-BvJC7DLk.js → erDiagram-TEJ5UH35-CyS0GnQV.js} +1 -1
  242. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cgu3PlOt.js → flowDiagram-I6XJVG4X-Cg1SRmzV.js} +1 -1
  243. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DLNXN5Xh.js → ganttDiagram-6RSMTGT7-CoNkSLs3.js} +1 -1
  244. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BQFRDv6R.js → gitGraphDiagram-PVQCEYII-DEA6GWPa.js} +1 -1
  245. package/web-shell/assets/index-B49xd8_A.css +5 -0
  246. package/web-shell/assets/{index-CdC3pjP3.js → index-CMaZgs6B.js} +1 -1
  247. package/web-shell/assets/index-D-cDAZgO.js +1192 -0
  248. package/web-shell/assets/{infoDiagram-5YYISTIA-DT2mOSvp.js → infoDiagram-5YYISTIA-BZshyoGT.js} +1 -1
  249. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-9fy_K4bd.js → ishikawaDiagram-YF4QCWOH-CT2ssZqC.js} +1 -1
  250. package/web-shell/assets/{journeyDiagram-JHISSGLW-CoGSEuhE.js → journeyDiagram-JHISSGLW-BtMQ0rDG.js} +1 -1
  251. package/web-shell/assets/{kanban-definition-UN3LZRKU-BP9hHYIj.js → kanban-definition-UN3LZRKU-CoDbK5Db.js} +1 -1
  252. package/web-shell/assets/{linear-uIroDsmp.js → linear-CwhZ6u7u.js} +1 -1
  253. package/web-shell/assets/{mermaid.core-BUwoStsA.js → mermaid.core-C9nn0nrr.js} +5 -5
  254. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DZB-FWim.js → mindmap-definition-RKZ34NQL-BXUbjTeL.js} +1 -1
  255. package/web-shell/assets/{pieDiagram-4H26LBE5-YPptloKl.js → pieDiagram-4H26LBE5-JddiYlWQ.js} +1 -1
  256. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-dgk3DSzm.js → quadrantDiagram-W4KKPZXB-DK5HKzXO.js} +1 -1
  257. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BH2En2i9.js → requirementDiagram-4Y6WPE33-Y-uipa_6.js} +1 -1
  258. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BB98feeI.js → sankeyDiagram-5OEKKPKP-BbWeqo8H.js} +1 -1
  259. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CunAIGh8.js → sequenceDiagram-3UESZ5HK-tX2gOoo5.js} +1 -1
  260. package/web-shell/assets/{stateDiagram-AJRCARHV-DTJs_-I2.js → stateDiagram-AJRCARHV-CACN457G.js} +1 -1
  261. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DaUeO2zt.js +1 -0
  262. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cd4AN7O0.js → timeline-definition-PNZ67QCA-DnHWKSOq.js} +1 -1
  263. package/web-shell/assets/{vennDiagram-CIIHVFJN-xIG-rUU9.js → vennDiagram-CIIHVFJN-BO8Yl2FG.js} +1 -1
  264. package/web-shell/assets/{wardley-L42UT6IY-D1UyjIcG.js → wardley-L42UT6IY-1NMqqrBi.js} +1 -1
  265. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BVM0Mb99.js → wardleyDiagram-YWT4CUSO-C3eWgIvD.js} +1 -1
  266. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BX31JDSz.js → xychartDiagram-2RQKCTM6-D0h8FgFX.js} +1 -1
  267. package/web-shell/index.html +2 -2
  268. package/chunks/chunk-675SVDMD.js +0 -3288
  269. package/chunks/chunk-CHVH4DVN.js +0 -368
  270. package/chunks/chunk-JCYMQU5F.js +0 -709
  271. package/chunks/nonInteractiveCli-EK35TLVJ.js +0 -129
  272. package/web-shell/assets/channel-Bi5TehaT.js +0 -1
  273. package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +0 -1
  274. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +0 -1
  275. package/web-shell/assets/index-C_ouplMQ.js +0 -1187
  276. package/web-shell/assets/index-XGDFJE-X.css +0 -5
  277. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DrfFMYta.js +0 -1
@@ -1,5 +1,10 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ openQwenAsrRealtimeStream,
5
+ openVoiceStream,
6
+ openVoiceStreamWithRetry
7
+ } from "./chunk-GKY2OJ7R.js";
3
8
  import {
4
9
  GENERATION_MAX_PROMPT_BYTES,
5
10
  MAX_REMEMBER_CONTENT_BYTES,
@@ -14,12 +19,7 @@ import {
14
19
  shouldSuppressRememberErrorDetails,
15
20
  workspaceMemoryFailureCode,
16
21
  workspaceMemoryFailureDiagnostics
17
- } from "./chunk-4AGBO6RB.js";
18
- import {
19
- openQwenAsrRealtimeStream,
20
- openVoiceStream,
21
- openVoiceStreamWithRetry
22
- } from "./chunk-KANTXY7B.js";
22
+ } from "./chunk-3SNKL6L6.js";
23
23
  import {
24
24
  SetupGithubError,
25
25
  collectSessionData,
@@ -30,16 +30,16 @@ import {
30
30
  toJson,
31
31
  toJsonl,
32
32
  toMarkdown
33
- } from "./chunk-WACI4VES.js";
33
+ } from "./chunk-SG2PEESS.js";
34
34
  import {
35
35
  OBSERVED_CONTACT_MAX_FRESH_WITHIN_SECONDS,
36
36
  ObservedChannelContactStore
37
- } from "./chunk-QSG4ZFG4.js";
38
- import "./chunk-7LMAKIWE.js";
39
- import "./chunk-J6NT5YTN.js";
37
+ } from "./chunk-KTUQMDEP.js";
38
+ import "./chunk-TFNZCC4B.js";
39
+ import "./chunk-RS7MT2QG.js";
40
+ import "./chunk-H2XVO6NE.js";
40
41
  import "./chunk-QHTIBUWB.js";
41
- import "./chunk-76BFY7AF.js";
42
- import "./chunk-HTHUX2T5.js";
42
+ import "./chunk-QTERJVPZ.js";
43
43
  import "./chunk-L573Z2QZ.js";
44
44
  import {
45
45
  createSingleWorkspaceRegistry,
@@ -77,6 +77,7 @@ import {
77
77
  getDeferredRuntimeRequestTiming,
78
78
  getServeProtocolVersions,
79
79
  hostAllowlist,
80
+ installAccessLogMiddleware,
80
81
  isBrowserAutomationMcpAvailable,
81
82
  isDeepHealthQuery,
82
83
  parseAllowOriginPatterns,
@@ -99,29 +100,29 @@ import {
99
100
  setRateLimiter,
100
101
  unsafeRevealSecret,
101
102
  validateMcpRuntimeServerName
102
- } from "./chunk-BEZPRKD3.js";
103
+ } from "./chunk-VLDBVLC4.js";
103
104
  import {
104
105
  isLoopbackBind
105
106
  } from "./chunk-RXFQM6FQ.js";
106
107
  import {
107
108
  createDaemonStatusProvider
108
- } from "./chunk-JUNVFQVY.js";
109
+ } from "./chunk-AMRWCMX4.js";
109
110
  import "./chunk-LXXMOYPL.js";
110
- import "./chunk-F2YCCUXI.js";
111
+ import "./chunk-3ML52IFS.js";
111
112
  import "./chunk-E5Z2AVNV.js";
112
113
  import {
113
114
  createWorkspaceProvidersStatusProvider
114
- } from "./chunk-7OZGMFHC.js";
115
+ } from "./chunk-I4HZ4GOD.js";
115
116
  import {
116
117
  getAuthTypeFromEnv,
117
118
  resolveCliGenerationConfig
118
- } from "./chunk-2DZ7E27L.js";
119
+ } from "./chunk-JBCFW3IL.js";
119
120
  import {
120
121
  snapshotProcessEnv
121
- } from "./chunk-ZFHHBRRA.js";
122
+ } from "./chunk-THNJYTA6.js";
122
123
  import {
123
124
  createWorkspaceSkillsStatusProvider
124
- } from "./chunk-AWOU24F6.js";
125
+ } from "./chunk-U24E4R5U.js";
125
126
  import "./chunk-2W3OOD4W.js";
126
127
  import {
127
128
  EMPTY_WORKSPACE_VOICE_UPDATE_ERROR,
@@ -136,14 +137,14 @@ import {
136
137
  validateWorkspaceSkillName,
137
138
  validateWorkspaceVoiceState,
138
139
  voiceSettingsScopeToWire
139
- } from "./chunk-SNONG66P.js";
140
+ } from "./chunk-ZGJ4LDD2.js";
140
141
  import {
141
142
  PermissionRulesValidationError,
142
143
  buildPermissionSettings,
143
144
  isPermissionRuleType,
144
145
  normalizePermissionRules,
145
146
  readPermissionRuleSet
146
- } from "./chunk-LHEQDKAR.js";
147
+ } from "./chunk-INL2RSLA.js";
147
148
  import {
148
149
  assertVoiceBaseUrlNetworkAllowed,
149
150
  isStreamingVoiceModel,
@@ -151,13 +152,13 @@ import {
151
152
  resolveVoiceTranscriptionConfig,
152
153
  sanitizeVoiceErrorMessage,
153
154
  transcribeVoiceAudio
154
- } from "./chunk-XACBIZJB.js";
155
+ } from "./chunk-FODJ5Q5K.js";
155
156
  import {
156
157
  isVoiceEnabled,
157
158
  isVoiceMode,
158
159
  readVoiceModel
159
- } from "./chunk-SMASS3CY.js";
160
- import "./chunk-F2RR4HO2.js";
160
+ } from "./chunk-A4TJMY65.js";
161
+ import "./chunk-BVLROR2T.js";
161
162
  import {
162
163
  WorkspacePermissionRulesSessionRequiredError,
163
164
  WorkspaceSettingsPartialPersistError,
@@ -173,14 +174,14 @@ import {
173
174
  SessionArtifactValidationError,
174
175
  createAcpSessionBridge,
175
176
  parseSessionSource
176
- } from "./chunk-4OVECYBM.js";
177
+ } from "./chunk-QOSKUG5P.js";
177
178
  import {
178
179
  EVENT_SCHEMA_VERSION,
179
180
  SubscriberLimitExceededError
180
181
  } from "./chunk-6RLROE6G.js";
181
182
  import "./chunk-COH43MRJ.js";
182
183
  import "./chunk-QR6U5QPP.js";
183
- import "./chunk-FEZXQXW2.js";
184
+ import "./chunk-SLLG5XXE.js";
184
185
  import {
185
186
  BranchWhilePromptActiveError,
186
187
  CancelSentinelCollisionError,
@@ -217,25 +218,25 @@ import {
217
218
  STATUS_SCHEMA_VERSION,
218
219
  createIdleWorkspaceMemoryStatus,
219
220
  mapDomainErrorToErrorKind
220
- } from "./chunk-TFV3XVAZ.js";
221
+ } from "./chunk-TQBA6DVX.js";
221
222
  import "./chunk-WBL3FJEU.js";
222
223
  import {
223
224
  daemonObservedContactsPath,
224
225
  loadChannelsConfig
225
- } from "./chunk-HQ7MDVBO.js";
226
- import "./chunk-HZXU6YZW.js";
226
+ } from "./chunk-VWLLDHAY.js";
227
+ import "./chunk-LTQ5C5AB.js";
227
228
  import "./chunk-57OAHC2Y.js";
228
229
  import {
229
230
  parseChannelWebhookConfigLenient
230
- } from "./chunk-NJQPQ4IO.js";
231
- import "./chunk-E655RDRL.js";
231
+ } from "./chunk-YWEW33JY.js";
232
+ import "./chunk-4ODB7WIB.js";
232
233
  import "./chunk-V6WHFGST.js";
233
234
  import {
234
235
  MAX_REGISTERED_WORKSPACES,
235
236
  WorkspaceRegistrationStoreCommittedError,
236
237
  WorkspaceRegistrationStoreLimitError,
237
238
  workspaceRegistrationId
238
- } from "./chunk-EWPLL4OT.js";
239
+ } from "./chunk-6VGRTGOG.js";
239
240
  import {
240
241
  MAX_WORKSPACE_PATH_LENGTH,
241
242
  canonicalizeWorkspace,
@@ -249,7 +250,7 @@ import {
249
250
  QWEN_SERVER_TOKEN_ENV,
250
251
  isChannelWebhookEnqueueError,
251
252
  normalizeWorkerDiagnostic
252
- } from "./chunk-HVWPSGDY.js";
253
+ } from "./chunk-Y2ENGUD6.js";
253
254
  import {
254
255
  normalizeServeChannelSelection
255
256
  } from "./chunk-TJTKSVIV.js";
@@ -260,7 +261,7 @@ import "./chunk-5HBA2Z7V.js";
260
261
  import "./chunk-T2NCM2ET.js";
261
262
  import {
262
263
  sanitizeLogText
263
- } from "./chunk-MHEZV3OY.js";
264
+ } from "./chunk-NIJEXGV6.js";
264
265
  import "./chunk-UDXSXLER.js";
265
266
  import {
266
267
  getDialogSettingKeys,
@@ -271,20 +272,20 @@ import {
271
272
  getWritableScopes,
272
273
  loadSettings,
273
274
  validateSettingValue
274
- } from "./chunk-ILQ42UG6.js";
275
+ } from "./chunk-2YJLFCYI.js";
275
276
  import "./chunk-RKUWKYED.js";
276
277
  import "./chunk-GOXKNSDZ.js";
277
278
  import "./chunk-IDS7MSUP.js";
278
279
  import {
279
280
  SUPPORTED_LANGUAGES
280
- } from "./chunk-3PE7OY2G.js";
281
- import "./chunk-NGTQA57Y.js";
281
+ } from "./chunk-3QR5MOHP.js";
282
+ import "./chunk-NQVA6O7F.js";
282
283
  import "./chunk-QRUIS3DN.js";
283
- import "./chunk-W4DFAUAO.js";
284
+ import "./chunk-SQMTULHJ.js";
284
285
  import "./chunk-VJNBRRZG.js";
285
286
  import {
286
287
  getWorkspaceTrustStatus
287
- } from "./chunk-XFJU7SVP.js";
288
+ } from "./chunk-RS5JPH6Y.js";
288
289
  import "./chunk-ALGGS7UH.js";
289
290
  import {
290
291
  isWithinRoot as isWithinRoot2
@@ -300,6 +301,7 @@ import {
300
301
  ClientMcpRegistrar,
301
302
  ExtensionManager,
302
303
  GROUP_COLOR_OPTIONS,
304
+ GitWorktreeService,
303
305
  IMAGE_CAPABILITY,
304
306
  InvalidSessionTranscriptCursorError,
305
307
  ModelsConfig,
@@ -332,6 +334,7 @@ import {
332
334
  loadIgnoreRules,
333
335
  loadUsageHistoryWithLive,
334
336
  parseInstallSource,
337
+ readWorktreeSession,
335
338
  redactUrlCredentials,
336
339
  resolveBranchName,
337
340
  resolveProviderProtocol,
@@ -339,18 +342,20 @@ import {
339
342
  stripAnsiAndControl,
340
343
  stripTerminalControlSequences,
341
344
  watchRepoBranch,
342
- writeWorkspaceContextFile
343
- } from "./chunk-6TDA4EVC.js";
345
+ writeWorkspaceContextFile,
346
+ writeWorktreeSession,
347
+ writeWorktreeSessionMarker
348
+ } from "./chunk-JDPCOUZ3.js";
344
349
  import "./chunk-5M6IDOMF.js";
345
350
  import "./chunk-T4TZQJ7W.js";
346
351
  import "./chunk-H6XPXXMH.js";
347
352
  import {
348
353
  MAX_JOBS,
349
354
  nextDurableFireMs
350
- } from "./chunk-LKR7QQ63.js";
351
- import "./chunk-4XCVGEEX.js";
352
- import "./chunk-XSPFQQRE.js";
353
- import "./chunk-4RPARQ5D.js";
355
+ } from "./chunk-EAUYY7SS.js";
356
+ import "./chunk-FSL5W5TI.js";
357
+ import "./chunk-OONJNQ42.js";
358
+ import "./chunk-D2VIDMVM.js";
354
359
  import "./chunk-E2UVIFI2.js";
355
360
  import {
356
361
  nextFireTime,
@@ -364,7 +369,7 @@ import {
364
369
  readCronTasks,
365
370
  taskHasLegacyCondition,
366
371
  updateCronTasks
367
- } from "./chunk-J2MKYJKZ.js";
372
+ } from "./chunk-EIAK6Q2B.js";
368
373
  import "./chunk-SZRN75WQ.js";
369
374
  import "./chunk-HTO4JFDZ.js";
370
375
  import "./chunk-CPBF7KYF.js";
@@ -372,12 +377,12 @@ import {
372
377
  APPROVAL_MODES,
373
378
  SubagentError,
374
379
  SubagentErrorCode
375
- } from "./chunk-UOA2IHRI.js";
380
+ } from "./chunk-CPCVCKKF.js";
376
381
  import "./chunk-6AM5D4ME.js";
377
- import "./chunk-OSSDHJDU.js";
378
- import "./chunk-SGPFJMRP.js";
379
- import "./chunk-335ECZTA.js";
380
- import "./chunk-JCJPZMJV.js";
382
+ import "./chunk-G45X5TRN.js";
383
+ import "./chunk-PBATSWUQ.js";
384
+ import "./chunk-ZEOZL37W.js";
385
+ import "./chunk-OOCI5VVU.js";
381
386
  import {
382
387
  QwenOAuth2Client,
383
388
  QwenOAuthPollError,
@@ -386,8 +391,8 @@ import {
386
391
  isDeviceAuthorizationSuccess,
387
392
  isDeviceTokenPending,
388
393
  isDeviceTokenSuccess
389
- } from "./chunk-QGONRHUS.js";
390
- import "./chunk-7KS72E2N.js";
394
+ } from "./chunk-53OPIXUE.js";
395
+ import "./chunk-DSBCU6JY.js";
391
396
  import "./chunk-JESCGQM3.js";
392
397
  import {
393
398
  addDaemonRequestAttribute,
@@ -402,20 +407,20 @@ import {
402
407
  recordDaemonHttpRequest,
403
408
  recordDaemonHttpResponse,
404
409
  withDaemonRequestSpan
405
- } from "./chunk-YN2I5I42.js";
410
+ } from "./chunk-I6JUVU7J.js";
406
411
  import "./chunk-4WKAA4KS.js";
407
412
  import "./chunk-CR3C7WXL.js";
408
413
  import "./chunk-VGC4I5JJ.js";
409
- import "./chunk-LPHGXXZX.js";
410
- import "./chunk-4CA4WUMS.js";
411
- import "./chunk-VAJS2E2D.js";
412
- import "./chunk-WEPXQKGP.js";
413
- import "./chunk-ANRANWVE.js";
414
+ import "./chunk-JD3MKVKL.js";
415
+ import "./chunk-UEY4AYUL.js";
416
+ import "./chunk-BDBMYST4.js";
417
+ import "./chunk-EZVDJFZ7.js";
418
+ import "./chunk-OP4MOGXF.js";
414
419
  import "./chunk-XVNQMZ2I.js";
415
420
  import "./chunk-FEOZBUMT.js";
416
421
  import "./chunk-DJ2GSRLV.js";
417
- import "./chunk-4CHDYDG3.js";
418
- import "./chunk-V4PCIS25.js";
422
+ import "./chunk-6EFTQYW7.js";
423
+ import "./chunk-MAQQGNQ5.js";
419
424
  import "./chunk-A4UCTEB5.js";
420
425
  import "./chunk-XWRJCPHC.js";
421
426
  import "./chunk-TYQMGACW.js";
@@ -428,7 +433,7 @@ import {
428
433
  Storage,
429
434
  createDebugLogger,
430
435
  runWithoutDebugLogSession
431
- } from "./chunk-UE5TZ55T.js";
436
+ } from "./chunk-C27BYUX6.js";
432
437
  import "./chunk-75DOP5OR.js";
433
438
  import "./chunk-DMTGGOSA.js";
434
439
  import "./chunk-YQ3U5MUC.js";
@@ -1742,17 +1747,17 @@ var WorkspaceFileSystemImpl = class {
1742
1747
  * for their `sendFsError` serializer.
1743
1748
  */
1744
1749
  recordAndWrap(err, intent, input) {
1745
- const fs3 = wrapAsFsError(err);
1750
+ const fs4 = wrapAsFsError(err);
1746
1751
  this.deps.audit.recordDenied(this.deps.ctx, {
1747
1752
  intent,
1748
1753
  input,
1749
- errorKind: fs3.kind,
1750
- hint: fs3.hint,
1754
+ errorKind: fs4.kind,
1755
+ hint: fs4.hint,
1751
1756
  // Quote the underlying OS / FsError message so audit
1752
1757
  // consumers debugging a production incident can see the
1753
1758
  // actual cause (errno text, byte counts, glob pattern,
1754
1759
  // etc.) rather than just `errorKind` + `hint`.
1755
- message: fs3.message,
1760
+ message: fs4.message,
1756
1761
  // For glob denials (parse_error pattern rejection,
1757
1762
  // catastrophic walk failures) the input IS the pattern
1758
1763
  // already; surfacing it on the dedicated `pattern` field
@@ -1761,7 +1766,7 @@ var WorkspaceFileSystemImpl = class {
1761
1766
  // branching on intent.
1762
1767
  pattern: intent === "glob" ? input : void 0
1763
1768
  });
1764
- return fs3;
1769
+ return fs4;
1765
1770
  }
1766
1771
  };
1767
1772
  var CONTENT_HASH_RE = /^sha256:[0-9a-f]{64}$/;
@@ -2243,7 +2248,7 @@ async function renameWithRetryLocal(src, dest, retries, delayMs) {
2243
2248
  const retryable = code === "EPERM" || code === "EACCES";
2244
2249
  if (!retryable || attempt === retries) throw err;
2245
2250
  await new Promise(
2246
- (resolve5) => setTimeout(resolve5, delayMs * 2 ** attempt)
2251
+ (resolve6) => setTimeout(resolve6, delayMs * 2 ** attempt)
2247
2252
  );
2248
2253
  }
2249
2254
  }
@@ -2498,12 +2503,12 @@ __name(applyReadHeaders, "applyReadHeaders");
2498
2503
  function sendFsError(res, err, route) {
2499
2504
  applyReadHeaders(res);
2500
2505
  if (isFsError(err)) {
2501
- const fs3 = err;
2502
- res.status(fs3.status).json({
2503
- errorKind: fs3.kind,
2504
- error: fs3.message,
2505
- hint: fs3.hint,
2506
- status: fs3.status
2506
+ const fs4 = err;
2507
+ res.status(fs4.status).json({
2508
+ errorKind: fs4.kind,
2509
+ error: fs4.message,
2510
+ hint: fs4.hint,
2511
+ status: fs4.status
2507
2512
  });
2508
2513
  return;
2509
2514
  }
@@ -2605,13 +2610,13 @@ async function handleGetFile(req, res, deps) {
2605
2610
  });
2606
2611
  return;
2607
2612
  }
2608
- const fs3 = factory.forRequest({
2613
+ const fs4 = factory.forRequest({
2609
2614
  originatorClientId: clientId ?? void 0,
2610
2615
  route: ROUTE2
2611
2616
  });
2612
2617
  try {
2613
- const resolved = await fs3.resolve(queryPath, "read");
2614
- const out = await fs3.readText(resolved, { maxBytes, line, limit });
2618
+ const resolved = await fs4.resolve(queryPath, "read");
2619
+ const out = await fs4.readText(resolved, { maxBytes, line, limit });
2615
2620
  const returnedBytes = Buffer.byteLength(out.content, "utf-8");
2616
2621
  applyReadHeaders(res);
2617
2622
  res.status(200).json({
@@ -2665,13 +2670,13 @@ async function handleGetFileBytes(req, res, deps) {
2665
2670
  });
2666
2671
  return;
2667
2672
  }
2668
- const fs3 = factory.forRequest({
2673
+ const fs4 = factory.forRequest({
2669
2674
  originatorClientId: clientId ?? void 0,
2670
2675
  route: ROUTE2
2671
2676
  });
2672
2677
  try {
2673
- const resolved = await fs3.resolve(queryPath, "read");
2674
- const out = await fs3.readBytesWindow(resolved, {
2678
+ const resolved = await fs4.resolve(queryPath, "read");
2679
+ const out = await fs4.readBytesWindow(resolved, {
2675
2680
  offset: offset ?? 0,
2676
2681
  maxBytes: maxBytes ?? DEFAULT_FILE_BYTES_MAX_BYTES
2677
2682
  });
@@ -2699,13 +2704,13 @@ async function handleGetStat(req, res, deps) {
2699
2704
  if (clientId === null) return;
2700
2705
  const queryPath = requireStringQuery(res, req.query["path"], "path", ROUTE2);
2701
2706
  if (queryPath === null) return;
2702
- const fs3 = factory.forRequest({
2707
+ const fs4 = factory.forRequest({
2703
2708
  originatorClientId: clientId ?? void 0,
2704
2709
  route: ROUTE2
2705
2710
  });
2706
2711
  try {
2707
- const resolved = await fs3.resolve(queryPath, "stat");
2708
- const st = await fs3.stat(resolved);
2712
+ const resolved = await fs4.resolve(queryPath, "stat");
2713
+ const st = await fs4.stat(resolved);
2709
2714
  applyReadHeaders(res);
2710
2715
  res.status(200).json({
2711
2716
  kind: "stat",
@@ -2728,13 +2733,13 @@ async function handleGetList(req, res, deps) {
2728
2733
  const queryPath = requireStringQuery(res, req.query["path"], "path", ROUTE2);
2729
2734
  if (queryPath === null) return;
2730
2735
  const includeIgnored = parseBoolFlag(req.query["includeIgnored"]);
2731
- const fs3 = factory.forRequest({
2736
+ const fs4 = factory.forRequest({
2732
2737
  originatorClientId: clientId ?? void 0,
2733
2738
  route: ROUTE2
2734
2739
  });
2735
2740
  try {
2736
- const resolved = await fs3.resolve(queryPath, "list");
2737
- const entries = await fs3.list(resolved, {
2741
+ const resolved = await fs4.resolve(queryPath, "list");
2742
+ const entries = await fs4.list(resolved, {
2738
2743
  includeIgnored,
2739
2744
  maxEntries: MAX_LIST_ENTRIES + 1
2740
2745
  });
@@ -2787,15 +2792,15 @@ async function handleGetGlob(req, res, deps) {
2787
2792
  }
2788
2793
  const cwdRaw = req.query["cwd"];
2789
2794
  const cwdString = typeof cwdRaw === "string" && cwdRaw.length > 0 ? cwdRaw : void 0;
2790
- const fs3 = factory.forRequest({
2795
+ const fs4 = factory.forRequest({
2791
2796
  originatorClientId: clientId ?? void 0,
2792
2797
  route: ROUTE2
2793
2798
  });
2794
2799
  const start = performance.now();
2795
2800
  try {
2796
- const cwdResolved = cwdString ? await fs3.resolve(cwdString, "list") : void 0;
2801
+ const cwdResolved = cwdString ? await fs4.resolve(cwdString, "list") : void 0;
2797
2802
  const cap = maxResults ?? DEFAULT_GLOB_MAX_RESULTS;
2798
- const probe = await fs3.glob(pattern, {
2803
+ const probe = await fs4.glob(pattern, {
2799
2804
  cwd: cwdResolved,
2800
2805
  includeIgnored,
2801
2806
  maxResults: cap + 1
@@ -2857,7 +2862,7 @@ function registerWorkspaceFileReadRoutes(app, deps) {
2857
2862
  }
2858
2863
  __name(registerWorkspaceFileReadRoutes, "registerWorkspaceFileReadRoutes");
2859
2864
  function registerWorkspaceQualifiedFileReadRoutes(app, deps) {
2860
- const resolve5 = /* @__PURE__ */ __name((req, res) => {
2865
+ const resolve6 = /* @__PURE__ */ __name((req, res) => {
2861
2866
  const runtime = resolveWorkspaceRuntimeFromParam(
2862
2867
  deps.workspaceRegistry,
2863
2868
  req,
@@ -2871,23 +2876,23 @@ function registerWorkspaceQualifiedFileReadRoutes(app, deps) {
2871
2876
  return true;
2872
2877
  }, "resolve");
2873
2878
  app.get("/workspaces/:workspace/file", (req, res) => {
2874
- if (!resolve5(req, res)) return;
2879
+ if (!resolve6(req, res)) return;
2875
2880
  void handleGetFile(req, res, deps);
2876
2881
  });
2877
2882
  app.get("/workspaces/:workspace/file/bytes", (req, res) => {
2878
- if (!resolve5(req, res)) return;
2883
+ if (!resolve6(req, res)) return;
2879
2884
  void handleGetFileBytes(req, res, deps);
2880
2885
  });
2881
2886
  app.get("/workspaces/:workspace/stat", (req, res) => {
2882
- if (!resolve5(req, res)) return;
2887
+ if (!resolve6(req, res)) return;
2883
2888
  void handleGetStat(req, res, deps);
2884
2889
  });
2885
2890
  app.get("/workspaces/:workspace/list", (req, res) => {
2886
- if (!resolve5(req, res)) return;
2891
+ if (!resolve6(req, res)) return;
2887
2892
  void handleGetList(req, res, deps);
2888
2893
  });
2889
2894
  app.get("/workspaces/:workspace/glob", (req, res) => {
2890
- if (!resolve5(req, res)) return;
2895
+ if (!resolve6(req, res)) return;
2891
2896
  void handleGetGlob(req, res, deps);
2892
2897
  });
2893
2898
  }
@@ -2969,7 +2974,7 @@ function validateClientId(clientId, deps, res) {
2969
2974
  }
2970
2975
  __name(validateClientId, "validateClientId");
2971
2976
  function createSetupGithubFileOps(factory, route, originatorClientId) {
2972
- const fs3 = factory.forRequest({
2977
+ const fs4 = factory.forRequest({
2973
2978
  route,
2974
2979
  ...originatorClientId ? { originatorClientId } : {}
2975
2980
  });
@@ -2992,14 +2997,14 @@ function createSetupGithubFileOps(factory, route, originatorClientId) {
2992
2997
  ]);
2993
2998
  },
2994
2999
  async writeTextFile(_gitRepoRoot, relativePath, content) {
2995
- const resolved = await fs3.resolve(relativePath, "write");
2996
- const out = await fs3.writeTextOverwrite(resolved, content);
3000
+ const resolved = await fs4.resolve(relativePath, "write");
3001
+ const out = await fs4.writeTextOverwrite(resolved, content);
2997
3002
  return { sizeBytes: out.sizeBytes };
2998
3003
  },
2999
3004
  async readTextFile(_gitRepoRoot, relativePath) {
3000
3005
  try {
3001
- const resolved = await fs3.resolve(relativePath, "read");
3002
- const out = await fs3.readText(resolved);
3006
+ const resolved = await fs4.resolve(relativePath, "read");
3007
+ const out = await fs4.readText(resolved);
3003
3008
  return out.content;
3004
3009
  } catch (error2) {
3005
3010
  if (isFsError(error2) && error2.kind === "path_not_found") {
@@ -8973,7 +8978,7 @@ var AcpDispatcher = class {
8973
8978
  );
8974
8979
  return;
8975
8980
  }
8976
- const fs3 = this.fsFactory.forRequest({
8981
+ const fs4 = this.fsFactory.forRequest({
8977
8982
  originatorClientId: conn.clientId,
8978
8983
  route: `ACP ${method}`
8979
8984
  });
@@ -9025,8 +9030,8 @@ var AcpDispatcher = class {
9025
9030
  );
9026
9031
  return;
9027
9032
  }
9028
- const resolved = await fs3.resolve(p, "read");
9029
- const out = await fs3.readText(resolved, { maxBytes, line, limit });
9033
+ const resolved = await fs4.resolve(p, "read");
9034
+ const out = await fs4.readText(resolved, { maxBytes, line, limit });
9030
9035
  this.replyConn(conn, id, {
9031
9036
  path: p,
9032
9037
  content: out.content,
@@ -9048,7 +9053,7 @@ var AcpDispatcher = class {
9048
9053
  conn.sendConn(error(id, RPC.INVALID_PARAMS, "`path` required"));
9049
9054
  return;
9050
9055
  }
9051
- const fs3 = this.fsFactory.forRequest({
9056
+ const fs4 = this.fsFactory.forRequest({
9052
9057
  originatorClientId: conn.clientId,
9053
9058
  route: `ACP ${method}`
9054
9059
  });
@@ -9084,8 +9089,8 @@ var AcpDispatcher = class {
9084
9089
  );
9085
9090
  return;
9086
9091
  }
9087
- const resolved = await fs3.resolve(p, "read");
9088
- const buf = await fs3.readBytesWindow(resolved, { offset, maxBytes });
9092
+ const resolved = await fs4.resolve(p, "read");
9093
+ const buf = await fs4.readBytesWindow(resolved, { offset, maxBytes });
9089
9094
  this.replyConn(conn, id, { path: p, ...buf });
9090
9095
  return;
9091
9096
  }
@@ -9103,12 +9108,12 @@ var AcpDispatcher = class {
9103
9108
  conn.sendConn(error(id, RPC.INVALID_PARAMS, "`path` required"));
9104
9109
  return;
9105
9110
  }
9106
- const fs3 = this.fsFactory.forRequest({
9111
+ const fs4 = this.fsFactory.forRequest({
9107
9112
  originatorClientId: conn.clientId,
9108
9113
  route: `ACP ${method}`
9109
9114
  });
9110
- const resolved = await fs3.resolve(p, "read");
9111
- const result = await fs3.stat(resolved);
9115
+ const resolved = await fs4.resolve(p, "read");
9116
+ const result = await fs4.stat(resolved);
9112
9117
  this.replyConn(conn, id, { path: p, ...result });
9113
9118
  return;
9114
9119
  }
@@ -9126,13 +9131,13 @@ var AcpDispatcher = class {
9126
9131
  conn.sendConn(error(id, RPC.INVALID_PARAMS, "`path` required"));
9127
9132
  return;
9128
9133
  }
9129
- const fs3 = this.fsFactory.forRequest({
9134
+ const fs4 = this.fsFactory.forRequest({
9130
9135
  originatorClientId: conn.clientId,
9131
9136
  route: `ACP ${method}`
9132
9137
  });
9133
- const resolved = await fs3.resolve(p, "read");
9138
+ const resolved = await fs4.resolve(p, "read");
9134
9139
  const MAX_LIST = 2e3;
9135
- const entries = await fs3.list(resolved, { maxEntries: MAX_LIST + 1 });
9140
+ const entries = await fs4.list(resolved, { maxEntries: MAX_LIST + 1 });
9136
9141
  const truncated = entries.length > MAX_LIST;
9137
9142
  this.replyConn(conn, id, {
9138
9143
  path: p,
@@ -9157,7 +9162,7 @@ var AcpDispatcher = class {
9157
9162
  );
9158
9163
  return;
9159
9164
  }
9160
- const fs3 = this.fsFactory.forRequest({
9165
+ const fs4 = this.fsFactory.forRequest({
9161
9166
  originatorClientId: conn.clientId,
9162
9167
  route: `ACP ${method}`
9163
9168
  });
@@ -9177,7 +9182,7 @@ var AcpDispatcher = class {
9177
9182
  );
9178
9183
  return;
9179
9184
  }
9180
- const matches = await fs3.glob(pattern, {
9185
+ const matches = await fs4.glob(pattern, {
9181
9186
  maxResults: maxResults + 1
9182
9187
  });
9183
9188
  const truncated = matches.length > maxResults;
@@ -9209,11 +9214,11 @@ var AcpDispatcher = class {
9209
9214
  );
9210
9215
  return;
9211
9216
  }
9212
- const fs3 = this.fsFactory.forRequest({
9217
+ const fs4 = this.fsFactory.forRequest({
9213
9218
  originatorClientId: conn.clientId,
9214
9219
  route: `ACP ${method}`
9215
9220
  });
9216
- const resolved = await fs3.resolve(p, "write");
9221
+ const resolved = await fs4.resolve(p, "write");
9217
9222
  if (Buffer.byteLength(params["content"], "utf8") > 10 * 1024 * 1024) {
9218
9223
  if (id !== void 0)
9219
9224
  conn.sendConn(
@@ -9221,7 +9226,7 @@ var AcpDispatcher = class {
9221
9226
  );
9222
9227
  return;
9223
9228
  }
9224
- await fs3.writeTextOverwrite(resolved, params["content"]);
9229
+ await fs4.writeTextOverwrite(resolved, params["content"]);
9225
9230
  this.replyConn(conn, id, { ok: true, path: p });
9226
9231
  return;
9227
9232
  }
@@ -9250,12 +9255,12 @@ var AcpDispatcher = class {
9250
9255
  );
9251
9256
  return;
9252
9257
  }
9253
- const fs3 = this.fsFactory.forRequest({
9258
+ const fs4 = this.fsFactory.forRequest({
9254
9259
  originatorClientId: conn.clientId,
9255
9260
  route: `ACP ${method}`
9256
9261
  });
9257
- const resolved = await fs3.resolve(p, "write");
9258
- const result = await fs3.edit(
9262
+ const resolved = await fs4.resolve(p, "write");
9263
+ const result = await fs4.edit(
9259
9264
  resolved,
9260
9265
  params["oldText"],
9261
9266
  params["newText"]
@@ -10798,9 +10803,9 @@ var SseStream = class {
10798
10803
  return next;
10799
10804
  }
10800
10805
  doWrite(chunk) {
10801
- return new Promise((resolve5, reject) => {
10806
+ return new Promise((resolve6, reject) => {
10802
10807
  if (this.closed || this.res.writableEnded) {
10803
- resolve5();
10808
+ resolve6();
10804
10809
  return;
10805
10810
  }
10806
10811
  let ok;
@@ -10811,7 +10816,7 @@ var SseStream = class {
10811
10816
  return;
10812
10817
  }
10813
10818
  if (ok) {
10814
- resolve5();
10819
+ resolve6();
10815
10820
  return;
10816
10821
  }
10817
10822
  const cleanup = /* @__PURE__ */ __name(() => {
@@ -10821,11 +10826,11 @@ var SseStream = class {
10821
10826
  }, "cleanup");
10822
10827
  const onDrain = /* @__PURE__ */ __name(() => {
10823
10828
  cleanup();
10824
- resolve5();
10829
+ resolve6();
10825
10830
  }, "onDrain");
10826
10831
  const onCloseEv = /* @__PURE__ */ __name(() => {
10827
10832
  cleanup();
10828
- resolve5();
10833
+ resolve6();
10829
10834
  }, "onCloseEv");
10830
10835
  const onErrorEv = /* @__PURE__ */ __name((err) => {
10831
10836
  cleanup();
@@ -10887,14 +10892,14 @@ var WsStream = class {
10887
10892
  send(message, _id) {
10888
10893
  const data = JSON.stringify(message);
10889
10894
  const next = this.writeChain.then(
10890
- () => new Promise((resolve5, reject) => {
10895
+ () => new Promise((resolve6, reject) => {
10891
10896
  if (this._closed) {
10892
- resolve5();
10897
+ resolve6();
10893
10898
  return;
10894
10899
  }
10895
10900
  this.ws.send(data, (err) => {
10896
10901
  if (err) reject(err);
10897
- else resolve5();
10902
+ else resolve6();
10898
10903
  });
10899
10904
  })
10900
10905
  );
@@ -11199,7 +11204,7 @@ var CdpReverseLink = class {
11199
11204
  throw { code: -32e3, message: "CDP tunnel closed" };
11200
11205
  }
11201
11206
  await this.attach();
11202
- return new Promise((resolve5, reject) => {
11207
+ return new Promise((resolve6, reject) => {
11203
11208
  if (this.disposed) {
11204
11209
  reject({ code: -32e3, message: "CDP tunnel closed" });
11205
11210
  return;
@@ -11210,7 +11215,7 @@ var CdpReverseLink = class {
11210
11215
  `CDP command id=${id} method=${method} timed out after ${this.commandTimeoutMs}ms`
11211
11216
  );
11212
11217
  const progressTimer = this.armProgressLog(id, method);
11213
- this.pending.set(id, { resolve: resolve5, reject, timer, progressTimer });
11218
+ this.pending.set(id, { resolve: resolve6, reject, timer, progressTimer });
11214
11219
  try {
11215
11220
  this.log?.(
11216
11221
  `qwen serve: /cdp forwarded command id=${id} method=${method} to extension`
@@ -11237,7 +11242,7 @@ var CdpReverseLink = class {
11237
11242
  if (this.attached) return Promise.resolve({});
11238
11243
  if (this.attachPromise) return this.attachPromise;
11239
11244
  this.attachPromise = new Promise(
11240
- (resolve5, reject) => {
11245
+ (resolve6, reject) => {
11241
11246
  if (this.disposed) {
11242
11247
  reject({ code: -32e3, message: "CDP tunnel closed" });
11243
11248
  return;
@@ -11247,7 +11252,7 @@ var CdpReverseLink = class {
11247
11252
  this.pendingAttach = {
11248
11253
  id,
11249
11254
  pending: {
11250
- resolve: /* @__PURE__ */ __name((result) => resolve5(result ?? {}), "resolve"),
11255
+ resolve: /* @__PURE__ */ __name((result) => resolve6(result ?? {}), "resolve"),
11251
11256
  reject,
11252
11257
  timer
11253
11258
  }
@@ -11815,7 +11820,7 @@ function isAcpChannelUnavailable(err) {
11815
11820
  }
11816
11821
  __name(isAcpChannelUnavailable, "isAcpChannelUnavailable");
11817
11822
  function delay(ms) {
11818
- return new Promise((resolve5) => setTimeout(resolve5, ms));
11823
+ return new Promise((resolve6) => setTimeout(resolve6, ms));
11819
11824
  }
11820
11825
  __name(delay, "delay");
11821
11826
  function buildChromeDevToolsMcpRuntimeConfig(localPort, hostname, env) {
@@ -11940,7 +11945,7 @@ function mountAcpHttp(app, bridge, opts) {
11940
11945
  if (!enabled) return void 0;
11941
11946
  const daemonEnv = opts.daemonEnv ?? process.env;
11942
11947
  const primaryEnv = opts.workspaceRegistry ? runtimeEffectiveEnv(opts.workspaceRegistry.primary, daemonEnv) : daemonEnv;
11943
- const path15 = opts.path ?? "/acp";
11948
+ const path16 = opts.path ?? "/acp";
11944
11949
  const dispatcherRef = {};
11945
11950
  let disposed = false;
11946
11951
  const rejectIfDisposed = /* @__PURE__ */ __name((res) => {
@@ -12102,7 +12107,7 @@ function mountAcpHttp(app, bridge, opts) {
12102
12107
  const primaryMount = {
12103
12108
  primary: true,
12104
12109
  workspaceCwd: opts.boundWorkspace,
12105
- routeLabel: logSafe(path15),
12110
+ routeLabel: logSafe(path16),
12106
12111
  rateLimitScope: opts.workspaceRegistry?.primary.workspaceId ?? "primary",
12107
12112
  registry,
12108
12113
  dispatcher,
@@ -12256,7 +12261,7 @@ function mountAcpHttp(app, bridge, opts) {
12256
12261
  });
12257
12262
  }, "handleAcpPost");
12258
12263
  app.post(
12259
- path15,
12264
+ path16,
12260
12265
  (req, res) => handleAcpPost(primaryMount, req, res)
12261
12266
  );
12262
12267
  const handleAcpGet = /* @__PURE__ */ __name((mount, req, res) => {
@@ -12346,10 +12351,10 @@ function mountAcpHttp(app, bridge, opts) {
12346
12351
  onPumpSettled();
12347
12352
  });
12348
12353
  }, "handleAcpGet");
12349
- app.get(path15, (req, res) => {
12354
+ app.get(path16, (req, res) => {
12350
12355
  handleAcpGet(primaryMount, req, res);
12351
12356
  });
12352
- app.delete(path15, (req, res) => {
12357
+ app.delete(path16, (req, res) => {
12353
12358
  handleAcpDelete(primaryMount, req, res);
12354
12359
  });
12355
12360
  const createSecondaryAcpMount = /* @__PURE__ */ __name((rt) => {
@@ -12541,7 +12546,7 @@ function mountAcpHttp(app, bridge, opts) {
12541
12546
  const isPluralAcpShape = pluralRawSelector !== null;
12542
12547
  const pluralVoiceRawSelector = opts.workspaceVoiceConnection ? pluralWorkspaceRawSelector(rawPath, PLURAL_VOICE_WS_SUFFIX) : null;
12543
12548
  const isPluralVoiceShape = pluralVoiceRawSelector !== null;
12544
- if (rawPath !== path15 && !isCdpPath && !extraRoute && !isPluralAcpShape && !isPluralVoiceShape) {
12549
+ if (rawPath !== path16 && !isCdpPath && !extraRoute && !isPluralAcpShape && !isPluralVoiceShape) {
12545
12550
  logReject(`unknown-path ${logSafe(rawPath)}`);
12546
12551
  socket.destroy();
12547
12552
  return;
@@ -13066,7 +13071,7 @@ function mountAcpHttp(app, bridge, opts) {
13066
13071
  });
13067
13072
  }, "upgradeListener");
13068
13073
  httpServer.on("upgrade", upgradeListener);
13069
- writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${path15}`);
13074
+ writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${path16}`);
13070
13075
  }
13071
13076
  __name(setupWebSocket, "setupWebSocket");
13072
13077
  return {
@@ -15105,7 +15110,7 @@ function createFifoTaskQueue(limit) {
15105
15110
  Promise.resolve().then(() => item.task(release)).then(item.resolve, item.reject).finally(release);
15106
15111
  }
15107
15112
  }, "pump");
15108
- const enqueue = /* @__PURE__ */ __name((task, options = {}) => new Promise((resolve5, reject) => {
15113
+ const enqueue = /* @__PURE__ */ __name((task, options = {}) => new Promise((resolve6, reject) => {
15109
15114
  if (options.signal?.aborted) {
15110
15115
  reject(abortReason(options.signal));
15111
15116
  return;
@@ -15114,7 +15119,7 @@ function createFifoTaskQueue(limit) {
15114
15119
  task,
15115
15120
  ...options.signal ? { signal: options.signal } : {},
15116
15121
  ...options.onStart ? { onStart: options.onStart } : {},
15117
- resolve: resolve5,
15122
+ resolve: resolve6,
15118
15123
  reject
15119
15124
  };
15120
15125
  if (options.signal) {
@@ -15935,7 +15940,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
15935
15940
  ...interaction,
15936
15941
  id: crypto2.randomUUID()
15937
15942
  };
15938
- return new Promise((resolve5, reject) => {
15943
+ return new Promise((resolve6, reject) => {
15939
15944
  const timeout = setTimeout(() => {
15940
15945
  pendingExtensionInteractions.delete(operationId);
15941
15946
  controller.updateOperation(operationId, {
@@ -15949,7 +15954,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
15949
15954
  timeout.unref?.();
15950
15955
  pendingExtensionInteractions.set(operationId, {
15951
15956
  interaction: pendingInteraction,
15952
- resolve: resolve5,
15957
+ resolve: resolve6,
15953
15958
  reject,
15954
15959
  timeout
15955
15960
  });
@@ -15994,8 +15999,8 @@ function registerWorkspaceExtensionRoutes(app, deps) {
15994
15999
  const reserveRuntimeReconciliation = /* @__PURE__ */ __name(() => {
15995
16000
  let provideTask;
15996
16001
  const task = new Promise(
15997
- (resolve5) => {
15998
- provideTask = resolve5;
16002
+ (resolve6) => {
16003
+ provideTask = resolve6;
15999
16004
  }
16000
16005
  );
16001
16006
  const queued = runtimeReconciliationQueue.run(async () => {
@@ -16096,9 +16101,9 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16096
16101
  generationPoller.unref();
16097
16102
  app.locals.stopExtensionGenerationReconciler = () => clearInterval(generationPoller);
16098
16103
  }
16099
- const registerFor = /* @__PURE__ */ __name((base, resolve5) => {
16104
+ const registerFor = /* @__PURE__ */ __name((base, resolve6) => {
16100
16105
  app.get(base, async (req, res) => {
16101
- const ctrl = resolve5(req, res, false);
16106
+ const ctrl = resolve6(req, res, false);
16102
16107
  if (!ctrl) return;
16103
16108
  try {
16104
16109
  res.status(200).json(await ctrl.buildLocalExtensionsStatus());
@@ -16107,12 +16112,12 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16107
16112
  }
16108
16113
  });
16109
16114
  app.get(`${base}/operations`, async (req, res) => {
16110
- const ctrl = resolve5(req, res, false);
16115
+ const ctrl = resolve6(req, res, false);
16111
16116
  if (!ctrl) return;
16112
16117
  res.status(200).json({ v: 1, operations: ctrl.getActiveOperations() });
16113
16118
  });
16114
16119
  app.get(`${base}/operations/:operationId`, async (req, res) => {
16115
- const ctrl = resolve5(req, res, false);
16120
+ const ctrl = resolve6(req, res, false);
16116
16121
  if (!ctrl) return;
16117
16122
  try {
16118
16123
  const operationId = req.params["operationId"];
@@ -16156,7 +16161,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16156
16161
  `${base}/operations/:operationId/interactions/:interactionId`,
16157
16162
  mutate({ strict: true }),
16158
16163
  async (req, res) => {
16159
- const ctrl = resolve5(req, res, false);
16164
+ const ctrl = resolve6(req, res, false);
16160
16165
  if (!ctrl) return;
16161
16166
  try {
16162
16167
  if (!ctrl.validateExtensionMutationClient(req, res, {
@@ -16225,7 +16230,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16225
16230
  }
16226
16231
  );
16227
16232
  app.post(`${base}/install`, mutate({ strict: true }), async (req, res) => {
16228
- const ctrl = resolve5(req, res, true);
16233
+ const ctrl = resolve6(req, res, true);
16229
16234
  if (!ctrl) return;
16230
16235
  try {
16231
16236
  if (!ctrl.validateExtensionMutationClient(req, res, {
@@ -16408,7 +16413,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16408
16413
  `${base}/check-updates`,
16409
16414
  mutate({ strict: true }),
16410
16415
  async (req, res) => {
16411
- const ctrl = resolve5(req, res, true);
16416
+ const ctrl = resolve6(req, res, true);
16412
16417
  if (!ctrl) return;
16413
16418
  let timer;
16414
16419
  let releaseOperationSlot;
@@ -16472,7 +16477,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16472
16477
  }
16473
16478
  );
16474
16479
  app.post(`${base}/refresh`, mutate({ strict: true }), async (req, res) => {
16475
- const ctrl = resolve5(req, res, true);
16480
+ const ctrl = resolve6(req, res, true);
16476
16481
  if (!ctrl) return;
16477
16482
  try {
16478
16483
  if (!ctrl.validateExtensionMutationClient(req, res, {
@@ -16496,7 +16501,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16496
16501
  `${base}/:name/enable`,
16497
16502
  mutate({ strict: true }),
16498
16503
  async (req, res) => {
16499
- const ctrl = resolve5(req, res, true);
16504
+ const ctrl = resolve6(req, res, true);
16500
16505
  if (!ctrl) return;
16501
16506
  try {
16502
16507
  if (!ctrl.validateExtensionMutationClient(req, res, {
@@ -16543,7 +16548,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16543
16548
  `${base}/:name/disable`,
16544
16549
  mutate({ strict: true }),
16545
16550
  async (req, res) => {
16546
- const ctrl = resolve5(req, res, true);
16551
+ const ctrl = resolve6(req, res, true);
16547
16552
  if (!ctrl) return;
16548
16553
  try {
16549
16554
  if (!ctrl.validateExtensionMutationClient(req, res, {
@@ -16590,7 +16595,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16590
16595
  `${base}/:name/update`,
16591
16596
  mutate({ strict: true }),
16592
16597
  async (req, res) => {
16593
- const ctrl = resolve5(req, res, true);
16598
+ const ctrl = resolve6(req, res, true);
16594
16599
  if (!ctrl) return;
16595
16600
  try {
16596
16601
  if (!ctrl.validateExtensionMutationClient(req, res, {
@@ -16673,7 +16678,7 @@ function registerWorkspaceExtensionRoutes(app, deps) {
16673
16678
  }
16674
16679
  );
16675
16680
  app.delete(`${base}/:name`, mutate({ strict: true }), async (req, res) => {
16676
- const ctrl = resolve5(req, res, true);
16681
+ const ctrl = resolve6(req, res, true);
16677
16682
  if (!ctrl) return;
16678
16683
  try {
16679
16684
  if (!ctrl.validateExtensionMutationClient(req, res, {
@@ -17435,13 +17440,13 @@ async function handlePostFileWrite(req, res, deps) {
17435
17440
  req
17436
17441
  );
17437
17442
  if (originatorClientId === null) return;
17438
- const fs3 = factory.forRequest({
17443
+ const fs4 = factory.forRequest({
17439
17444
  originatorClientId,
17440
17445
  route: ROUTE2
17441
17446
  });
17442
17447
  try {
17443
- const resolved = await fs3.resolve(queryPath, "write");
17444
- const out = await fs3.writeTextAtomic(resolved, content, {
17448
+ const resolved = await fs4.resolve(queryPath, "write");
17449
+ const out = await fs4.writeTextAtomic(resolved, content, {
17445
17450
  mode,
17446
17451
  ...expectedHash ? { expectedHash } : {},
17447
17452
  ...bom !== void 0 ? { bom } : {},
@@ -17494,13 +17499,13 @@ async function handlePostFileEdit(req, res, deps) {
17494
17499
  req
17495
17500
  );
17496
17501
  if (originatorClientId === null) return;
17497
- const fs3 = factory.forRequest({
17502
+ const fs4 = factory.forRequest({
17498
17503
  originatorClientId,
17499
17504
  route: ROUTE2
17500
17505
  });
17501
17506
  try {
17502
- const resolved = await fs3.resolve(queryPath, "edit");
17503
- const out = await fs3.editAtomic(resolved, oldText, newText, {
17507
+ const resolved = await fs4.resolve(queryPath, "edit");
17508
+ const out = await fs4.editAtomic(resolved, oldText, newText, {
17504
17509
  expectedHash
17505
17510
  });
17506
17511
  applyReadHeaders(res);
@@ -17534,7 +17539,7 @@ function registerWorkspaceFileWriteRoutes(app, deps) {
17534
17539
  }
17535
17540
  __name(registerWorkspaceFileWriteRoutes, "registerWorkspaceFileWriteRoutes");
17536
17541
  function registerWorkspaceQualifiedFileWriteRoutes(app, deps) {
17537
- const resolve5 = /* @__PURE__ */ __name((req, res) => {
17542
+ const resolve6 = /* @__PURE__ */ __name((req, res) => {
17538
17543
  const runtime = resolveWorkspaceRuntimeFromParam(
17539
17544
  deps.workspaceRegistry,
17540
17545
  req,
@@ -17552,7 +17557,7 @@ function registerWorkspaceQualifiedFileWriteRoutes(app, deps) {
17552
17557
  "/workspaces/:workspace/file/write",
17553
17558
  deps.mutate({ strict: true }),
17554
17559
  (req, res) => {
17555
- if (!resolve5(req, res)) return;
17560
+ if (!resolve6(req, res)) return;
17556
17561
  void handlePostFileWrite(req, res, deps);
17557
17562
  }
17558
17563
  );
@@ -17560,7 +17565,7 @@ function registerWorkspaceQualifiedFileWriteRoutes(app, deps) {
17560
17565
  "/workspaces/:workspace/file/edit",
17561
17566
  deps.mutate({ strict: true }),
17562
17567
  (req, res) => {
17563
- if (!resolve5(req, res)) return;
17568
+ if (!resolve6(req, res)) return;
17564
17569
  void handlePostFileEdit(req, res, deps);
17565
17570
  }
17566
17571
  );
@@ -18043,8 +18048,8 @@ function decodePathSegment(value) {
18043
18048
  }
18044
18049
  __name(decodePathSegment, "decodePathSegment");
18045
18050
  function matchLegacySessionTelemetryRoute(method, requestPath) {
18046
- const path15 = requestPath.length > 1 && requestPath.endsWith("/") ? requestPath.slice(0, -1) : requestPath;
18047
- const requestSegments = path15.split("/").slice(1);
18051
+ const path16 = requestPath.length > 1 && requestPath.endsWith("/") ? requestPath.slice(0, -1) : requestPath;
18052
+ const requestSegments = path16.split("/").slice(1);
18048
18053
  const prefix = requestSegments[0]?.toLowerCase();
18049
18054
  if (prefix !== "session" && prefix !== "sessions" && prefix !== "permission") {
18050
18055
  return void 0;
@@ -18096,23 +18101,23 @@ __name(setDaemonTelemetryWorkspace, "setDaemonTelemetryWorkspace");
18096
18101
  function resolveDaemonTelemetryRoute(req) {
18097
18102
  const legacyRoute = matchLegacySessionTelemetryRoute(req.method, req.path);
18098
18103
  if (legacyRoute) return legacyRoute;
18099
- const path15 = req.path.replace(/\/$/, "") || "/";
18100
- if (req.method === "GET" && path15 === "/daemon/status") {
18104
+ const path16 = req.path.replace(/\/$/, "") || "/";
18105
+ if (req.method === "GET" && path16 === "/daemon/status") {
18101
18106
  return { route: "GET /daemon/status" };
18102
18107
  }
18103
- if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(path15)) {
18108
+ if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(path16)) {
18104
18109
  return { route: "GET /workspace/:id/sessions" };
18105
18110
  }
18106
- if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(path15)) {
18111
+ if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(path16)) {
18107
18112
  return { route: "GET /workspace/:id/sessions" };
18108
18113
  }
18109
- if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(path15)) {
18114
+ if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(path16)) {
18110
18115
  return { route: "GET /workspace/:id/session-info" };
18111
18116
  }
18112
- if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(path15)) {
18117
+ if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(path16)) {
18113
18118
  return { route: "GET /workspace/:id/session-info" };
18114
18119
  }
18115
- const workspaceTranscript = path15.match(
18120
+ const workspaceTranscript = path16.match(
18116
18121
  /^\/workspaces\/[^/]+\/session\/([^/]+)\/transcript$/
18117
18122
  );
18118
18123
  if (workspaceTranscript?.[1] && req.method === "GET") {
@@ -18121,7 +18126,7 @@ function resolveDaemonTelemetryRoute(req) {
18121
18126
  sessionId: decodePathSegment(workspaceTranscript[1])
18122
18127
  };
18123
18128
  }
18124
- const workspaceExport = path15.match(
18129
+ const workspaceExport = path16.match(
18125
18130
  /^\/workspaces\/[^/]+\/session\/([^/]+)\/export$/
18126
18131
  );
18127
18132
  if (workspaceExport?.[1] && req.method === "GET") {
@@ -18130,7 +18135,7 @@ function resolveDaemonTelemetryRoute(req) {
18130
18135
  sessionId: decodePathSegment(workspaceExport[1])
18131
18136
  };
18132
18137
  }
18133
- const workspaceArchivedExport = path15.match(
18138
+ const workspaceArchivedExport = path16.match(
18134
18139
  /^\/workspaces\/[^/]+\/session\/([^/]+)\/archive\/export$/
18135
18140
  );
18136
18141
  if (workspaceArchivedExport?.[1] && req.method === "GET") {
@@ -18140,8 +18145,8 @@ function resolveDaemonTelemetryRoute(req) {
18140
18145
  };
18141
18146
  }
18142
18147
  const pluralWorkspacePrefix = /^\/workspaces\/[^/]+/;
18143
- if (pluralWorkspacePrefix.test(path15)) {
18144
- const suffix = path15.replace(pluralWorkspacePrefix, "/workspace");
18148
+ if (pluralWorkspacePrefix.test(path16)) {
18149
+ const suffix = path16.replace(pluralWorkspacePrefix, "/workspace");
18145
18150
  if (req.method === "GET") {
18146
18151
  if (suffix === "/workspace/mcp" || suffix === "/workspace/skills" || suffix === "/workspace/tools" || suffix === "/workspace/providers" || suffix === "/workspace/env" || suffix === "/workspace/preflight" || suffix === "/workspace/hooks" || suffix === "/workspace/settings" || suffix === "/workspace/voice" || suffix === "/workspace/permissions" || suffix === "/workspace/trust" || suffix === "/workspace/memory" || suffix === "/workspace/agents") {
18147
18152
  return { route: `GET ${suffix}` };
@@ -18200,58 +18205,58 @@ function resolveDaemonTelemetryRoute(req) {
18200
18205
  return { route: "DELETE /workspace/session-groups/:groupId" };
18201
18206
  }
18202
18207
  }
18203
- if (req.method === "POST" && path15 === "/workspace/init") {
18208
+ if (req.method === "POST" && path16 === "/workspace/init") {
18204
18209
  return { route: "POST /workspace/init" };
18205
18210
  }
18206
- if (req.method === "POST" && path15 === "/workspace/setup-github") {
18211
+ if (req.method === "POST" && path16 === "/workspace/setup-github") {
18207
18212
  return { route: "POST /workspace/setup-github" };
18208
18213
  }
18209
- if (req.method === "POST" && path15 === "/workspace/reload") {
18214
+ if (req.method === "POST" && path16 === "/workspace/reload") {
18210
18215
  return { route: "POST /workspace/reload" };
18211
18216
  }
18212
- const mcpRestart = path15.match(/^\/workspace\/mcp\/([^/]+)\/restart$/);
18217
+ const mcpRestart = path16.match(/^\/workspace\/mcp\/([^/]+)\/restart$/);
18213
18218
  if (mcpRestart?.[1] && req.method === "POST") {
18214
18219
  return { route: "POST /workspace/mcp/:server/restart" };
18215
18220
  }
18216
- if (req.method === "POST" && path15 === "/workspace/mcp/servers") {
18221
+ if (req.method === "POST" && path16 === "/workspace/mcp/servers") {
18217
18222
  return { route: "POST /workspace/mcp/servers" };
18218
18223
  }
18219
- const mcpDelete = path15.match(/^\/workspace\/mcp\/servers\/([^/]+)$/);
18224
+ const mcpDelete = path16.match(/^\/workspace\/mcp\/servers\/([^/]+)$/);
18220
18225
  if (mcpDelete?.[1] && req.method === "DELETE") {
18221
18226
  return { route: "DELETE /workspace/mcp/servers/:name" };
18222
18227
  }
18223
- if (req.method === "POST" && path15 === "/workspace/auth/device-flow") {
18228
+ if (req.method === "POST" && path16 === "/workspace/auth/device-flow") {
18224
18229
  return { route: "POST /workspace/auth/device-flow" };
18225
18230
  }
18226
- const deviceFlowDelete = path15.match(
18231
+ const deviceFlowDelete = path16.match(
18227
18232
  /^\/workspace\/auth\/device-flow\/([^/]+)$/
18228
18233
  );
18229
18234
  if (deviceFlowDelete?.[1] && req.method === "DELETE") {
18230
18235
  return { route: "DELETE /workspace/auth/device-flow/:id" };
18231
18236
  }
18232
- const toolEnable = path15.match(/^\/workspace\/tools\/([^/]+)\/enable$/);
18237
+ const toolEnable = path16.match(/^\/workspace\/tools\/([^/]+)\/enable$/);
18233
18238
  if (toolEnable?.[1] && req.method === "POST") {
18234
18239
  return { route: "POST /workspace/tools/:name/enable" };
18235
18240
  }
18236
- if (path15 === "/workspace/settings") {
18241
+ if (path16 === "/workspace/settings") {
18237
18242
  if (req.method === "GET") return { route: "GET /workspace/settings" };
18238
18243
  if (req.method === "POST") return { route: "POST /workspace/settings" };
18239
18244
  }
18240
- if (path15 === "/workspace/permissions") {
18245
+ if (path16 === "/workspace/permissions") {
18241
18246
  if (req.method === "GET") return { route: "GET /workspace/permissions" };
18242
18247
  if (req.method === "POST") return { route: "POST /workspace/permissions" };
18243
18248
  }
18244
- if (path15 === "/workspace/trust") {
18249
+ if (path16 === "/workspace/trust") {
18245
18250
  if (req.method === "GET") return { route: "GET /workspace/trust" };
18246
18251
  }
18247
- if (req.method === "POST" && path15 === "/workspace/trust/request") {
18252
+ if (req.method === "POST" && path16 === "/workspace/trust/request") {
18248
18253
  return { route: "POST /workspace/trust/request" };
18249
18254
  }
18250
- if (path15 === "/workspace/voice") {
18255
+ if (path16 === "/workspace/voice") {
18251
18256
  if (req.method === "GET") return { route: "GET /workspace/voice" };
18252
18257
  if (req.method === "POST") return { route: "POST /workspace/voice" };
18253
18258
  }
18254
- if (req.method === "POST" && path15 === "/workspace/voice/transcribe") {
18259
+ if (req.method === "POST" && path16 === "/workspace/voice/transcribe") {
18255
18260
  return { route: "POST /workspace/voice/transcribe" };
18256
18261
  }
18257
18262
  return void 0;
@@ -18305,7 +18310,7 @@ function daemonTelemetryMiddleware(resolveWorkspaceCwd, recordRequest) {
18305
18310
  deferredRuntimePath: deferredRuntime.path
18306
18311
  } : {}
18307
18312
  },
18308
- async (span) => await new Promise((resolve5, reject) => {
18313
+ async (span) => await new Promise((resolve6, reject) => {
18309
18314
  let done = false;
18310
18315
  const finish = /* @__PURE__ */ __name(() => {
18311
18316
  if (done) return;
@@ -18335,7 +18340,7 @@ function daemonTelemetryMiddleware(resolveWorkspaceCwd, recordRequest) {
18335
18340
  if (!successfulSse && route.route !== "GET /daemon/status" && route.route !== "POST /session/:id/heartbeat") {
18336
18341
  recordRequest?.(durationMs, res.statusCode);
18337
18342
  }
18338
- resolve5();
18343
+ resolve6();
18339
18344
  }, "finish");
18340
18345
  res.once("finish", finish);
18341
18346
  res.once("close", finish);
@@ -18634,6 +18639,25 @@ function encodeMetadataSessionCursor(last, filter, archiveState) {
18634
18639
  ).toString("base64url");
18635
18640
  }
18636
18641
  __name(encodeMetadataSessionCursor, "encodeMetadataSessionCursor");
18642
+ async function enrichWorktreeSidecars(bySessionId, sessionService, archiveState = "active") {
18643
+ for (const [sessionId, summary] of bySessionId) {
18644
+ if (summary.worktree) continue;
18645
+ const sidecar = await readWorktreeSession(
18646
+ sessionService.getWorktreeSessionPathForArchiveState(
18647
+ sessionId,
18648
+ archiveState
18649
+ )
18650
+ ).catch(() => null);
18651
+ if (sidecar) {
18652
+ summary.worktree = {
18653
+ slug: sidecar.slug,
18654
+ path: sidecar.worktreePath,
18655
+ branch: sidecar.worktreeBranch
18656
+ };
18657
+ }
18658
+ }
18659
+ }
18660
+ __name(enrichWorktreeSidecars, "enrichWorktreeSidecars");
18637
18661
  function toSummary2(item) {
18638
18662
  return {
18639
18663
  sessionId: item.sessionId,
@@ -18779,6 +18803,7 @@ async function listOrganizedWorkspaceSessionsForResponse(bridge, workspaceCwd, o
18779
18803
  applyOrganization(session, snapshot.sessions.get(session.sessionId))
18780
18804
  );
18781
18805
  }
18806
+ await enrichWorktreeSidecars(bySessionId, sessionService, archiveState);
18782
18807
  if (readOptions.mergeLive !== false && archiveState !== "archived" && isFirstPage) {
18783
18808
  try {
18784
18809
  const liveSessions = bridge.listWorkspaceSessions(workspaceCwd);
@@ -18864,6 +18889,7 @@ async function listWorkspaceSessionsByMetadataForResponse(bridge, workspaceCwd,
18864
18889
  for (const session of persisted.sessions) {
18865
18890
  bySessionId.set(session.sessionId, session);
18866
18891
  }
18892
+ await enrichWorktreeSidecars(bySessionId, sessionService, archiveState);
18867
18893
  let liveMergeFailed = false;
18868
18894
  if (readOptions.mergeLive !== false && archiveState !== "archived") {
18869
18895
  try {
@@ -18966,6 +18992,7 @@ async function listWorkspaceSessionsForResponse(bridge, workspaceCwd, options, r
18966
18992
  for (const item of persisted.items) {
18967
18993
  bySessionId.set(item.sessionId, toSummary2(item));
18968
18994
  }
18995
+ await enrichWorktreeSidecars(bySessionId, sessionService, archiveState);
18969
18996
  if (archiveState === "archived" || readOptions.mergeLive === false) {
18970
18997
  const sessions2 = [...bySessionId.values()];
18971
18998
  const nextCursor2 = persisted.nextCursor != null ? String(persisted.nextCursor) : void 0;
@@ -19137,7 +19164,7 @@ function writeGenerationSseChunk(res, chunk) {
19137
19164
  if (writable) {
19138
19165
  return res.destroyed ? Promise.reject(new Error("Generation SSE connection destroyed")) : Promise.resolve();
19139
19166
  }
19140
- return new Promise((resolve5, reject) => {
19167
+ return new Promise((resolve6, reject) => {
19141
19168
  const cleanup = /* @__PURE__ */ __name(() => {
19142
19169
  res.off("drain", onDrain);
19143
19170
  res.off("close", onClose);
@@ -19145,7 +19172,7 @@ function writeGenerationSseChunk(res, chunk) {
19145
19172
  }, "cleanup");
19146
19173
  const onDrain = /* @__PURE__ */ __name(() => {
19147
19174
  cleanup();
19148
- resolve5();
19175
+ resolve6();
19149
19176
  }, "onDrain");
19150
19177
  const onClose = /* @__PURE__ */ __name(() => {
19151
19178
  cleanup();
@@ -19915,6 +19942,68 @@ function registerSessionRoutes(app, deps) {
19915
19942
  }
19916
19943
  const clientId = parseClientIdHeader(req, res);
19917
19944
  if (clientId === null) return;
19945
+ let worktreeMeta;
19946
+ const rawWorktree = body["worktree"];
19947
+ if (rawWorktree !== void 0 && rawWorktree !== null) {
19948
+ if (typeof rawWorktree !== "object" || Array.isArray(rawWorktree)) {
19949
+ res.status(400).json({
19950
+ error: '`worktree` must be an object (e.g. `{}` or `{"slug":"my-task"}`)',
19951
+ code: "invalid_worktree"
19952
+ });
19953
+ return;
19954
+ }
19955
+ const wtReq = rawWorktree;
19956
+ let wtService;
19957
+ try {
19958
+ wtService = new GitWorktreeService(workspaceCwd);
19959
+ } catch {
19960
+ res.status(500).json({
19961
+ error: "Failed to initialize worktree service",
19962
+ code: "worktree_init_failed"
19963
+ });
19964
+ return;
19965
+ }
19966
+ if (!await wtService.isGitRepository()) {
19967
+ res.status(400).json({
19968
+ error: "Worktree isolation requires a git repository",
19969
+ code: "worktree_not_git_repo"
19970
+ });
19971
+ return;
19972
+ }
19973
+ const rawSlug = wtReq["slug"];
19974
+ let slug;
19975
+ if (rawSlug === void 0 || rawSlug === null) {
19976
+ slug = GitWorktreeService.generateAutoSlug();
19977
+ } else if (typeof rawSlug !== "string" || rawSlug.length === 0) {
19978
+ res.status(400).json({
19979
+ error: "`worktree.slug` must be a non-empty string when provided",
19980
+ code: "worktree_invalid_slug"
19981
+ });
19982
+ return;
19983
+ } else {
19984
+ slug = rawSlug;
19985
+ }
19986
+ const slugError = GitWorktreeService.validateUserWorktreeSlug(slug);
19987
+ if (slugError) {
19988
+ res.status(400).json({ error: slugError, code: "worktree_invalid_slug" });
19989
+ return;
19990
+ }
19991
+ const baseBranch = await wtService.getCurrentBranch().catch(() => void 0);
19992
+ const wtResult = await wtService.createUserWorktree(slug, baseBranch);
19993
+ if (!wtResult.success || !wtResult.worktree) {
19994
+ res.status(500).json({
19995
+ error: wtResult.error ?? "Failed to create worktree",
19996
+ code: "worktree_create_failed"
19997
+ });
19998
+ return;
19999
+ }
20000
+ worktreeMeta = {
20001
+ slug,
20002
+ path: wtResult.worktree.path,
20003
+ branch: wtResult.worktree.branch
20004
+ };
20005
+ sessionScope = "thread";
20006
+ }
19918
20007
  try {
19919
20008
  const session = await runtime.bridge.spawnOrAttach({
19920
20009
  workspaceCwd,
@@ -19923,7 +20012,8 @@ function registerSessionRoutes(app, deps) {
19923
20012
  ...sessionScope !== void 0 ? { sessionScope } : {},
19924
20013
  ...approvalMode !== void 0 ? { approvalMode } : {},
19925
20014
  ...source.sourceType !== void 0 ? { sourceType: source.sourceType } : {},
19926
- ...source.sourceId !== void 0 ? { sourceId: source.sourceId } : {}
20015
+ ...source.sourceId !== void 0 ? { sourceId: source.sourceId } : {},
20016
+ ...worktreeMeta ? { worktree: worktreeMeta } : {}
19927
20017
  });
19928
20018
  if (daemonLog) {
19929
20019
  daemonLog.info(
@@ -19950,6 +20040,10 @@ function registerSessionRoutes(app, deps) {
19950
20040
  await new SessionService(runtime.workspaceCwd).removeSession(
19951
20041
  session.sessionId
19952
20042
  );
20043
+ if (worktreeMeta) {
20044
+ await new GitWorktreeService(workspaceCwd).removeUserWorktree(worktreeMeta.slug, { deleteBranch: true }).catch(() => {
20045
+ });
20046
+ }
19953
20047
  }
19954
20048
  } catch {
19955
20049
  }
@@ -19959,8 +20053,57 @@ function registerSessionRoutes(app, deps) {
19959
20053
  }
19960
20054
  return;
19961
20055
  }
20056
+ if (worktreeMeta) {
20057
+ try {
20058
+ await runtime.bridge.changeSessionCwd(session.sessionId, {
20059
+ path: worktreeMeta.path
20060
+ });
20061
+ await writeWorktreeSessionMarker(
20062
+ worktreeMeta.path,
20063
+ session.sessionId
20064
+ ).catch(() => {
20065
+ });
20066
+ await writeWorktreeSession(
20067
+ new SessionService(workspaceCwd).getWorktreeSessionPath(
20068
+ session.sessionId
20069
+ ),
20070
+ {
20071
+ slug: worktreeMeta.slug,
20072
+ worktreePath: worktreeMeta.path,
20073
+ worktreeBranch: worktreeMeta.branch,
20074
+ originalCwd: workspaceCwd,
20075
+ originalBranch: "",
20076
+ originalHeadCommit: ""
20077
+ }
20078
+ ).catch(() => {
20079
+ });
20080
+ } catch (cdErr) {
20081
+ if (daemonLog) {
20082
+ daemonLog.warn("worktree cd failed, rolling back", {
20083
+ sessionId: session.sessionId,
20084
+ error: cdErr instanceof Error ? cdErr.message : String(cdErr)
20085
+ });
20086
+ }
20087
+ const killed = await runtime.bridge.killSession(session.sessionId, { requireZeroAttaches: true }).catch(() => false);
20088
+ if (killed) {
20089
+ await new SessionService(workspaceCwd).removeSession(session.sessionId).catch(() => {
20090
+ });
20091
+ }
20092
+ await new GitWorktreeService(workspaceCwd).removeUserWorktree(worktreeMeta.slug, { deleteBranch: true }).catch(() => {
20093
+ });
20094
+ res.status(500).json({
20095
+ error: "Failed to relocate session into worktree",
20096
+ code: "worktree_relocate_failed"
20097
+ });
20098
+ return;
20099
+ }
20100
+ }
19962
20101
  res.status(200).json(session);
19963
20102
  } catch (err) {
20103
+ if (worktreeMeta) {
20104
+ await new GitWorktreeService(workspaceCwd).removeUserWorktree(worktreeMeta.slug, { deleteBranch: true }).catch(() => {
20105
+ });
20106
+ }
19964
20107
  sendBridgeError2(res, err, { route: "POST /session" });
19965
20108
  }
19966
20109
  });
@@ -22877,7 +23020,7 @@ async function rehydrateScheduledTaskSessions(deps) {
22877
23020
  }
22878
23021
  __name(rehydrateScheduledTaskSessions, "rehydrateScheduledTaskSessions");
22879
23022
  function withTimeout(p, ms, label) {
22880
- return new Promise((resolve5, reject) => {
23023
+ return new Promise((resolve6, reject) => {
22881
23024
  const timer = setTimeout(() => {
22882
23025
  reject(new Error(`${label} timed out after ${ms}ms`));
22883
23026
  }, ms);
@@ -22885,7 +23028,7 @@ function withTimeout(p, ms, label) {
22885
23028
  p.then(
22886
23029
  (v) => {
22887
23030
  clearTimeout(timer);
22888
- resolve5(v);
23031
+ resolve6(v);
22889
23032
  },
22890
23033
  (e) => {
22891
23034
  clearTimeout(timer);
@@ -22969,7 +23112,7 @@ function registerWorkspaceStatusRoutes(app, deps) {
22969
23112
  const ctx = buildWorkspaceCtx("POST /workspace/acp/preheat");
22970
23113
  const timeoutMsRaw = req.query["timeoutMs"];
22971
23114
  const timeoutMs = typeof timeoutMsRaw === "string" && timeoutMsRaw.trim() ? Number(timeoutMsRaw) : void 0;
22972
- if (timeoutMs !== void 0 && (!Number.isFinite(timeoutMs) || !Number.isInteger(timeoutMs) || timeoutMs <= 0 || timeoutMs > MAX_ACP_PREHEAT_TIMEOUT_MS)) {
23115
+ if (timeoutMsRaw !== void 0 && (timeoutMs === void 0 || !Number.isFinite(timeoutMs) || !Number.isInteger(timeoutMs) || timeoutMs <= 0 || timeoutMs > MAX_ACP_PREHEAT_TIMEOUT_MS)) {
22973
23116
  res.status(400).json({
22974
23117
  error: "`timeoutMs` must be a positive integer no greater than 60000",
22975
23118
  code: "invalid_timeout"
@@ -24615,9 +24758,9 @@ function registerSseEventsRoutes(app, deps) {
24615
24758
  let writeChain = Promise.resolve();
24616
24759
  const trackWriterIdle = writerIdleTimeoutMs !== void 0 && writerIdleTimeoutMs > 0;
24617
24760
  let lastWriteAt = trackWriterIdle ? Date.now() : 0;
24618
- const doWrite = /* @__PURE__ */ __name((chunk) => new Promise((resolve5, reject) => {
24761
+ const doWrite = /* @__PURE__ */ __name((chunk) => new Promise((resolve6, reject) => {
24619
24762
  if (res.writableEnded) {
24620
- resolve5();
24763
+ resolve6();
24621
24764
  return;
24622
24765
  }
24623
24766
  let ok;
@@ -24629,19 +24772,19 @@ function registerSseEventsRoutes(app, deps) {
24629
24772
  }
24630
24773
  if (ok) {
24631
24774
  if (trackWriterIdle) lastWriteAt = Date.now();
24632
- resolve5();
24775
+ resolve6();
24633
24776
  return;
24634
24777
  }
24635
24778
  const onDrain = /* @__PURE__ */ __name(() => {
24636
24779
  res.off("close", onClose);
24637
24780
  res.off("error", onError);
24638
24781
  if (trackWriterIdle) lastWriteAt = Date.now();
24639
- resolve5();
24782
+ resolve6();
24640
24783
  }, "onDrain");
24641
24784
  const onClose = /* @__PURE__ */ __name(() => {
24642
24785
  res.off("drain", onDrain);
24643
24786
  res.off("error", onError);
24644
- resolve5();
24787
+ resolve6();
24645
24788
  }, "onClose");
24646
24789
  const onError = /* @__PURE__ */ __name((err) => {
24647
24790
  res.off("drain", onDrain);
@@ -25234,47 +25377,6 @@ function dropNestedWorkspacesPreservingPrimary(workspaces) {
25234
25377
  }
25235
25378
  __name(dropNestedWorkspacesPreservingPrimary, "dropNestedWorkspacesPreservingPrimary");
25236
25379
 
25237
- // packages/cli/src/serve/server/access-log.ts
25238
- init_esbuild_shims();
25239
- var SESSION_ID_RE = /\/session\/([^/]+)/;
25240
- function installAccessLogMiddleware(app, daemonLog) {
25241
- if (!daemonLog) return;
25242
- app.use((req, res, next) => {
25243
- const { method, path: reqPath } = req;
25244
- if (method === "GET" && reqPath === "/health" || method === "POST" && reqPath.endsWith("/heartbeat")) {
25245
- return next();
25246
- }
25247
- const startMs = Date.now();
25248
- res.on("finish", () => {
25249
- try {
25250
- const status = res.statusCode;
25251
- if (method === "GET" && reqPath.endsWith("/events") && status === 200) {
25252
- return;
25253
- }
25254
- const durationMs = Date.now() - startMs;
25255
- const sessionMatch = reqPath.match(SESSION_ID_RE);
25256
- const sessionId = sessionMatch?.[1];
25257
- const clientId = req.headers["x-qwen-client-id"];
25258
- const ctx = {
25259
- route: `${method} ${reqPath}`,
25260
- ...sessionId ? { sessionId } : {},
25261
- ...clientId ? { clientId } : {},
25262
- status,
25263
- durationMs
25264
- };
25265
- if (status >= 400) {
25266
- daemonLog.warn("request completed", ctx);
25267
- } else {
25268
- daemonLog.info("request completed", ctx);
25269
- }
25270
- } catch {
25271
- }
25272
- });
25273
- next();
25274
- });
25275
- }
25276
- __name(installAccessLogMiddleware, "installAccessLogMiddleware");
25277
-
25278
25380
  // packages/cli/src/serve/server/device-flow-registry.ts
25279
25381
  init_esbuild_shims();
25280
25382
 
@@ -25576,10 +25678,10 @@ function installRateLimiter(app, opts, daemonLog, options = {}) {
25576
25678
  { tier, key: key.slice(0, 64) }
25577
25679
  );
25578
25680
  } : void 0,
25579
- onError: daemonLog ? (err, path15) => {
25681
+ onError: daemonLog ? (err, path16) => {
25580
25682
  daemonLog.warn(
25581
25683
  `rate limiter error (fail-open): ${err instanceof Error ? err.message : String(err)}`,
25582
- { path: path15 }
25684
+ { path: path16 }
25583
25685
  );
25584
25686
  } : void 0
25585
25687
  });
@@ -26576,6 +26678,8 @@ __name(registerWorkspaceManagementRoutes, "registerWorkspaceManagementRoutes");
26576
26678
 
26577
26679
  // packages/cli/src/serve/routes/workspace-git.ts
26578
26680
  init_esbuild_shims();
26681
+ import * as fs3 from "node:fs";
26682
+ import * as path15 from "node:path";
26579
26683
  function registerWorkspaceGitRoutes(app, deps) {
26580
26684
  app.get("/workspace/git", async (_req, res) => {
26581
26685
  try {
@@ -26597,10 +26701,43 @@ function registerWorkspaceQualifiedGitRoutes(app, deps) {
26597
26701
  const runtime = resolveTrustedRuntime2(deps.workspaceRegistry, req, res);
26598
26702
  if (!runtime) return;
26599
26703
  const route = "GET /workspaces/:workspace/git";
26704
+ const rawCwd = req.query["cwd"];
26705
+ let gitCwd = runtime.workspaceCwd;
26706
+ if (typeof rawCwd === "string" && rawCwd.length > 0) {
26707
+ try {
26708
+ const resolved = fs3.realpathSync(path15.resolve(rawCwd));
26709
+ const root = fs3.realpathSync(runtime.workspaceCwd);
26710
+ const rel = path15.relative(root, resolved);
26711
+ if (!rel.startsWith("..") && !path15.isAbsolute(rel)) {
26712
+ gitCwd = resolved;
26713
+ }
26714
+ } catch {
26715
+ }
26716
+ }
26600
26717
  try {
26601
- res.status(200).json(
26602
- await deps.gitState.getStatus(runtime.workspaceCwd, runtime.bridge)
26603
- );
26718
+ if (gitCwd !== runtime.workspaceCwd) {
26719
+ const status = await getGitWorkingTreeStatus(gitCwd).catch(() => null);
26720
+ res.status(200).json(
26721
+ status ? {
26722
+ v: 2,
26723
+ workspaceCwd: gitCwd,
26724
+ branch: status.branch ?? null,
26725
+ detached: status.detached,
26726
+ staged: status.staged,
26727
+ unstaged: status.unstaged,
26728
+ untracked: status.untracked,
26729
+ conflicted: status.conflicted,
26730
+ hasUpstream: status.hasUpstream,
26731
+ ahead: status.ahead,
26732
+ behind: status.behind,
26733
+ stashCount: status.stashCount,
26734
+ ...status.operation ? { operation: status.operation } : {},
26735
+ computedAt: Date.now()
26736
+ } : { v: 2, workspaceCwd: gitCwd, branch: null }
26737
+ );
26738
+ } else {
26739
+ res.status(200).json(await deps.gitState.getStatus(gitCwd, runtime.bridge));
26740
+ }
26604
26741
  } catch (err) {
26605
26742
  deps.sendBridgeError(res, err, { route });
26606
26743
  }
@@ -26623,8 +26760,8 @@ function buildDiffList(workspaceCwd, result) {
26623
26760
  hiddenCount: 0
26624
26761
  };
26625
26762
  }
26626
- const files = [...result.perFileStats.entries()].map(([path15, s]) => ({
26627
- path: path15,
26763
+ const files = [...result.perFileStats.entries()].map(([path16, s]) => ({
26764
+ path: path16,
26628
26765
  oldPath: s.oldPath,
26629
26766
  added: s.added,
26630
26767
  removed: s.removed,