@qwen-code/qwen-code 0.21.11 → 0.21.12-preview.3

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 (255) hide show
  1. package/chunks/{MaxSizedBox-G7QPSZTF.js → MaxSizedBox-EIK4BHBQ.js} +24 -24
  2. package/chunks/{StandaloneSessionPicker-3CTEPV7S.js → StandaloneSessionPicker-NHVJDRYD.js} +44 -43
  3. package/chunks/{acpAgent-43JURWOW.js → acpAgent-37UDZP64.js} +103 -97
  4. package/chunks/{agent-MIY4LJJJ.js → agent-FAWBG7PP.js} +20 -20
  5. package/chunks/{agent-headless-LWVA6GR5.js → agent-headless-SHK4PCCH.js} +20 -20
  6. package/chunks/{anthropicContentGenerator-7HEP7Q5D.js → anthropicContentGenerator-4JSC3ZFL.js} +20 -20
  7. package/chunks/{bridge-PTTJEBNP.js → bridge-DEAYNDCI.js} +22 -22
  8. package/chunks/{build-GDBLPA24.js → build-RZS65IIX.js} +1 -1
  9. package/chunks/{channel-management-service-PQ6SU56M.js → channel-management-service-SKAN6NOB.js} +1 -1
  10. package/chunks/{channel-settings-store-IKK34GMH.js → channel-settings-store-UIGYER6R.js} +27 -27
  11. package/chunks/{channel-worker-group-WBRE33ZV.js → channel-worker-group-YPTB5ASD.js} +3 -3
  12. package/chunks/{channel-worker-manager-V4LYVTPH.js → channel-worker-manager-4EHJSPRH.js} +3 -3
  13. package/chunks/{channel-worker-supervisor-YDAGW2RP.js → channel-worker-supervisor-DZKHYFHV.js} +2 -2
  14. package/chunks/{chunk-QG2IEE2E.js → chunk-2J53A6MV.js} +6 -6
  15. package/chunks/{chunk-2IIJTXYF.js → chunk-2SB4SLKC.js} +3 -1
  16. package/chunks/{chunk-TNS2M7VL.js → chunk-32VOOMEF.js} +6 -6
  17. package/chunks/{chunk-MCHGE3EC.js → chunk-3TT6MZHJ.js} +52 -830
  18. package/chunks/{chunk-BTYS2JAY.js → chunk-3XZYK76R.js} +1 -1
  19. package/chunks/{chunk-RUVZZKDH.js → chunk-3ZYX7AUR.js} +1 -1
  20. package/chunks/{chunk-YIKMBYMT.js → chunk-4ETA3KRC.js} +1 -1
  21. package/chunks/{chunk-NFSSQDB5.js → chunk-4GLFFNP3.js} +4 -4
  22. package/chunks/{chunk-JOXXPM3X.js → chunk-4M2F7OG7.js} +4 -4
  23. package/chunks/{chunk-4EX3DBFH.js → chunk-575MI5K3.js} +4 -4
  24. package/chunks/{chunk-DEKY5Y7V.js → chunk-5I5NMQCU.js} +1 -1
  25. package/chunks/{chunk-XBLYC4MI.js → chunk-5TXOGH4I.js} +1 -1
  26. package/chunks/{chunk-F4T5J34H.js → chunk-5UPJ774B.js} +1 -1
  27. package/chunks/{chunk-XUMBOJC2.js → chunk-6AECVSVX.js} +3 -3
  28. package/chunks/{chunk-2XZWO53E.js → chunk-6XZERB6P.js} +3 -3
  29. package/chunks/{chunk-J4EVBAB3.js → chunk-6ZIIHBNV.js} +4 -4
  30. package/chunks/{chunk-45HPDU3F.js → chunk-7D4KEFOT.js} +2 -2
  31. package/chunks/{chunk-W2PNY24B.js → chunk-7LZ7DK4D.js} +1 -1
  32. package/chunks/{chunk-OGQERNHD.js → chunk-AJX4ITUG.js} +2 -2
  33. package/chunks/chunk-CG3OQDNY.js +649 -0
  34. package/chunks/{chunk-3LHYTQ2R.js → chunk-CZXQ4UZA.js} +1 -1
  35. package/chunks/{chunk-MLZCPGDX.js → chunk-DAX3G67A.js} +1 -1
  36. package/chunks/{chunk-JPA7IDTE.js → chunk-DEG7R6Z6.js} +2 -2
  37. package/chunks/{chunk-X5GLCWPX.js → chunk-DYVCDQW2.js} +1 -1
  38. package/chunks/{chunk-TYAMGABM.js → chunk-E3GLDLYB.js} +6 -0
  39. package/chunks/{chunk-HUE2M6VI.js → chunk-E5BWLU5J.js} +1 -1
  40. package/chunks/{chunk-7QE3QFU3.js → chunk-EXG2R5UR.js} +9 -9
  41. package/chunks/{chunk-MZQ4I4AP.js → chunk-EYY4IBPV.js} +2 -2
  42. package/chunks/{chunk-PBYVS6QT.js → chunk-FDWH6CBK.js} +4 -4
  43. package/chunks/{chunk-TNQLAI6I.js → chunk-FRH4SSGX.js} +3 -1
  44. package/chunks/{chunk-KFCTC5IJ.js → chunk-GYBDYWMV.js} +1 -1
  45. package/chunks/{chunk-U2JLICUY.js → chunk-HB6QW4LM.js} +7 -7
  46. package/chunks/{chunk-ESVSQKPY.js → chunk-HBZUU4AE.js} +6 -8
  47. package/chunks/{chunk-XT6TGJFD.js → chunk-I4XSOFH2.js} +1 -1
  48. package/chunks/{chunk-G64M7R2Y.js → chunk-ILVATFYJ.js} +6 -6
  49. package/chunks/{chunk-RUKNJEJO.js → chunk-J7DNMZFO.js} +1 -1
  50. package/chunks/{chunk-AKLY5M2C.js → chunk-JEMR2FTD.js} +3 -3
  51. package/chunks/{chunk-UEUE6LJX.js → chunk-JL3LC3CQ.js} +1 -1
  52. package/chunks/{chunk-JKEO6OQY.js → chunk-JXK3WAP7.js} +5 -5
  53. package/chunks/{chunk-2R2HYSUQ.js → chunk-KIFRFCCB.js} +6 -4
  54. package/chunks/{chunk-JHMFKJEP.js → chunk-KNQZXSLW.js} +8 -2
  55. package/chunks/{chunk-BR6TUEKJ.js → chunk-KNXA5XXK.js} +28 -9
  56. package/chunks/chunk-L34XSHIZ.js +28 -0
  57. package/chunks/{chunk-T4576UW4.js → chunk-L7T742G2.js} +1 -1
  58. package/chunks/{chunk-22C7BQ6D.js → chunk-LHOG4E6Y.js} +3 -3
  59. package/chunks/{chunk-N3ZWGKXN.js → chunk-LHY6HBRA.js} +4 -4
  60. package/chunks/{chunk-EOBM4T2Z.js → chunk-M2PY7CNK.js} +1 -1
  61. package/chunks/{chunk-AZQ3DT76.js → chunk-M4NWDIFU.js} +1 -1
  62. package/chunks/{chunk-DSKLWQHC.js → chunk-M4OYAR6J.js} +2 -2
  63. package/chunks/{chunk-UIZGNLBP.js → chunk-M6HXP2SG.js} +152 -149
  64. package/chunks/{chunk-4PFKN7CQ.js → chunk-M6SXIXBV.js} +7 -7
  65. package/chunks/{chunk-BNRNVMOT.js → chunk-MDFUBQAQ.js} +20 -18
  66. package/chunks/chunk-N2TNM3QB.js +9 -0
  67. package/chunks/{chunk-QGZN4RYB.js → chunk-N3FJOQX7.js} +3 -3
  68. package/chunks/{chunk-LA3FF7RO.js → chunk-N5ULBHP3.js} +1 -1
  69. package/chunks/{chunk-EN2J77G7.js → chunk-NELCY6JT.js} +2 -0
  70. package/chunks/{chunk-23GFHEM3.js → chunk-NPE3STIW.js} +6 -6
  71. package/chunks/{chunk-BJKREW56.js → chunk-O5AZPHYZ.js} +1 -1
  72. package/chunks/{chunk-2AAFGCWP.js → chunk-O5G7IQGM.js} +4 -4
  73. package/chunks/{chunk-KCDQGIHS.js → chunk-P2UCMHDT.js} +1 -1
  74. package/chunks/{chunk-YVVIFFU4.js → chunk-P64FPV3G.js} +2 -2
  75. package/chunks/{chunk-JLYYGKRN.js → chunk-QZ5G26ZE.js} +19 -19
  76. package/chunks/{chunk-P7KCJGBR.js → chunk-RQVVXDHS.js} +3 -3
  77. package/chunks/{chunk-UM57UTTV.js → chunk-RRQJPCRQ.js} +1 -1
  78. package/chunks/{chunk-DM4C3OX5.js → chunk-SSAOTDK7.js} +1 -1
  79. package/chunks/{chunk-NM3E6GGL.js → chunk-TEKFBSMY.js} +2 -2
  80. package/chunks/{chunk-U7QUDFPD.js → chunk-TRYJ3BVE.js} +5 -5
  81. package/chunks/{chunk-OC5SKSNX.js → chunk-TYCXSMZU.js} +2 -2
  82. package/chunks/{chunk-TKAEODJR.js → chunk-TYGKUOEG.js} +9 -0
  83. package/chunks/{chunk-HMCSRTDY.js → chunk-U6PTKAOW.js} +1 -1
  84. package/chunks/{chunk-AAOONL5N.js → chunk-UNCIELQJ.js} +1 -1
  85. package/chunks/chunk-UOMZKPI5.js +830 -0
  86. package/chunks/{chunk-TTB6GBJ6.js → chunk-UZPWH6SP.js} +42 -42
  87. package/chunks/{chunk-SUTP6CZA.js → chunk-V4MJ56RS.js} +3 -3
  88. package/chunks/{chunk-P5Y23G2L.js → chunk-V7RNNPGC.js} +1 -18
  89. package/chunks/{chunk-HZV75ET2.js → chunk-VQZXRLEX.js} +1 -1
  90. package/chunks/{chunk-W2ITCESM.js → chunk-VWD7SNNN.js} +6 -127
  91. package/chunks/chunk-WFRHWDBT.js +622 -0
  92. package/chunks/chunk-WLML6VIA.js +18 -0
  93. package/chunks/{chunk-MDQSCFAZ.js → chunk-XWUQ4IH5.js} +6 -6
  94. package/chunks/{chunk-4C4QSXE3.js → chunk-Y66OOMKS.js} +73 -610
  95. package/chunks/{chunk-BIXG46YI.js → chunk-YI6UGZF5.js} +10 -10
  96. package/chunks/{chunk-VRWOMUZM.js → chunk-YTYPRVIZ.js} +1 -1
  97. package/chunks/{chunk-3SOTXJNO.js → chunk-YZJVVQD3.js} +4 -4
  98. package/chunks/chunk-ZBBVBZBR.js +137 -0
  99. package/chunks/{chunk-NQPYPDOY.js → chunk-ZQSNP4TG.js} +1 -1
  100. package/chunks/chunk-bdqvmfwv-OHYAFAAO.js +17446 -0
  101. package/chunks/{computer-use-7TIKEXBX.js → computer-use-S4JEU5P7.js} +23 -23
  102. package/chunks/{config-utils-6MVJ54TY.js → config-utils-TXVKR27S.js} +2 -2
  103. package/chunks/{contextCommand-5QKI7MRY.js → contextCommand-2H5OH2HW.js} +22 -22
  104. package/chunks/{core-runtime-USS7ZF3H.js → core-runtime-IAQ4DD4Y.js} +20 -20
  105. package/chunks/{create-sub-session-ZD2F3BH2.js → create-sub-session-EKHKXJAA.js} +20 -20
  106. package/chunks/{daemon-Y3NOHFKQ.js → daemon-PXIC4ZDK.js} +148 -0
  107. package/chunks/{daemon-status-provider-PMP4J7BC.js → daemon-status-provider-LPYR2GXY.js} +26 -26
  108. package/chunks/{daemon-trust-policy-2252VKXI.js → daemon-trust-policy-7JOBVFH3.js} +26 -26
  109. package/chunks/{daemon-trust-policy-monitor-OSGGKJXT.js → daemon-trust-policy-monitor-OU3NRHAR.js} +26 -26
  110. package/chunks/{deferred-core-runtime-3VD4V6YZ.js → deferred-core-runtime-SFT3KI2C.js} +22 -22
  111. package/chunks/{devtools-4QFYJT6U.js → devtools-X6ROTKHE.js} +1 -1
  112. package/chunks/dispatch-B53LNEO4.js +37 -0
  113. package/chunks/{dist-MAIUUIWN.js → dist-BW2LDPV3.js} +1 -1
  114. package/chunks/{dist-Q2WJ2IZU.js → dist-KTYDJNYM.js} +1 -1
  115. package/chunks/{earlyInputCapture-ER4HGLJN.js → earlyInputCapture-27RPWE2D.js} +20 -20
  116. package/chunks/{edit-B3MT7O53.js → edit-WXVZ7FHS.js} +28 -28
  117. package/chunks/{enter-worktree-WVIYVSDJ.js → enter-worktree-TYMVXFLA.js} +25 -25
  118. package/chunks/{enterPlanMode-DDCIM6HA.js → enterPlanMode-FT4MRU5N.js} +28 -28
  119. package/chunks/{environment-LITGMOUP.js → environment-Z6OMA34I.js} +22 -22
  120. package/chunks/{errors-E5CIOR2I.js → errors-YMXK2GG3.js} +22 -22
  121. package/chunks/{exit-worktree-NQ2A6URE.js → exit-worktree-ODZUQLGJ.js} +25 -25
  122. package/chunks/{exitPlanMode-YXSWN4D3.js → exitPlanMode-MBPAPBBV.js} +20 -20
  123. package/chunks/{fast-path-PH3DBS6X.js → fast-path-ZU5T6XSN.js} +2 -2
  124. package/chunks/{gemini-4YPO4ADY.js → gemini-OZK6AIMC.js} +74 -71
  125. package/chunks/{geminiContentGenerator-GMSVVXOU.js → geminiContentGenerator-MC6ZKWZG.js} +8 -8
  126. package/chunks/{glob-3Y3VHLM2.js → glob-KJ4A4ZOM.js} +27 -27
  127. package/chunks/{grep-VUHUDZYG.js → grep-QWBLG564.js} +27 -27
  128. package/chunks/{handleAutoUpdate-OBFFPWSJ.js → handleAutoUpdate-M3ACKDKF.js} +24 -24
  129. package/chunks/{i18n-4PJA5KKU.js → i18n-FPW7XZL5.js} +21 -21
  130. package/chunks/{image-gen-4IFV4HES.js → image-gen-OTFC2S7L.js} +7 -7
  131. package/chunks/{initializer-ZTY3VSWL.js → initializer-5HKUXXBT.js} +27 -27
  132. package/chunks/{installationInfo-6USRNCD2.js → installationInfo-4OA6UW7V.js} +21 -21
  133. package/chunks/{list-U2ZDKYWN.js → list-3TKZ264A.js} +29 -29
  134. package/chunks/{loadedSettingsAdapter-WW4HIVLO.js → loadedSettingsAdapter-IRUANLS2.js} +26 -26
  135. package/chunks/{loggingContentGenerator-XXG6YWUE.js → loggingContentGenerator-D4URLH2A.js} +25 -25
  136. package/chunks/{managed-npm-update-7GM2LPLL.js → managed-npm-update-2O7XSAWJ.js} +21 -21
  137. package/chunks/{mcp-7KZW2T5P.js → mcp-AFVHCHKT.js} +26 -26
  138. package/chunks/{monitor-RQROQHLD.js → monitor-PY4WDSX3.js} +25 -25
  139. package/chunks/{node-UUDY34IG.js → node-YSOU44FX.js} +3 -3
  140. package/chunks/{nonInteractiveCli-U7JNJGS6.js → nonInteractiveCli-ZHW6F76F.js} +61 -58
  141. package/chunks/{notebook-edit-XQA6YCH2.js → notebook-edit-GEPL33NO.js} +28 -28
  142. package/chunks/{openaiContentGenerator-BZW2IB42.js → openaiContentGenerator-ACYSXQ6R.js} +20 -20
  143. package/chunks/opentui-entry-SBAOWW7M.js +52325 -0
  144. package/chunks/{pidfile-NX5VZ3IK.js → pidfile-SUNYCAA4.js} +20 -20
  145. package/chunks/{processUtils-M635AD23.js → processUtils-F7LP7YUV.js} +2 -2
  146. package/chunks/{qwenContentGenerator-KHJ73E2C.js → qwenContentGenerator-BB6IPELF.js} +26 -26
  147. package/chunks/{qwenOAuth2-QMK25XO7.js → qwenOAuth2-OU3WGDOI.js} +4 -4
  148. package/chunks/{read-file-6LKIKKXD.js → read-file-GORBXJTS.js} +5 -5
  149. package/chunks/{resumeHistoryUtils-RR2KEVH5.js → resumeHistoryUtils-FOAJJJWK.js} +27 -27
  150. package/chunks/{ripGrep-CF2WRBYV.js → ripGrep-RNLIZGCY.js} +20 -20
  151. package/chunks/{run-qwen-serve-L5TF57J4.js → run-qwen-serve-GVMMX3IU.js} +47 -47
  152. package/chunks/{runtime-3RE3BPR4.js → runtime-RNBZ5FDD.js} +29 -29
  153. package/chunks/runtime-gate-T4ICWGQJ.js +89 -0
  154. package/chunks/{scheduler-LXQZAMYT.js → scheduler-NTRFSPIP.js} +22 -22
  155. package/chunks/{sdk-exporters-grpc-54L4LS5L.js → sdk-exporters-grpc-4QKV6MCX.js} +2 -2
  156. package/chunks/{sdk-exporters-http-7SYSCGEO.js → sdk-exporters-http-2VPMAPFI.js} +11 -11
  157. package/chunks/{sdk-impl-VZI6M6EH.js → sdk-impl-5W3JUCWF.js} +7 -7
  158. package/chunks/{serve-5D4S7GIA.js → serve-H3PGA26U.js} +26 -26
  159. package/chunks/{server-ILZB6TTC.js → server-SUXD2F3C.js} +619 -199
  160. package/chunks/{session-SXCZITZ4.js → session-MTFVUWWM.js} +64 -61
  161. package/chunks/{settings-4RQB3OVF.js → settings-GUJ3TN2J.js} +25 -25
  162. package/chunks/{shell-FCTR3OI2.js → shell-C2UP5FF2.js} +20 -20
  163. package/chunks/{skill-IAKHPD5H.js → skill-4XCNK55E.js} +14 -14
  164. package/chunks/{skill-settings-SOR23NOP.js → skill-settings-Y2BU27XM.js} +25 -25
  165. package/chunks/{spawnChannel-I6VAWYQJ.js → spawnChannel-UUUUK734.js} +23 -21
  166. package/chunks/{standalone-update-5NN3MTYH.js → standalone-update-MJ722XZ4.js} +22 -22
  167. package/chunks/{startInteractiveUI-OYGL3NZJ.js → startInteractiveUI-TCPIPNGN.js} +2440 -2950
  168. package/chunks/task-create-URFZ5EUX.js +2 -2
  169. package/chunks/{team-create-J4JP6AXN.js → team-create-WZWH2NJI.js} +25 -25
  170. package/chunks/{team-plan-approval-7BEAIR2H.js → team-plan-approval-SUZQJCWJ.js} +27 -27
  171. package/chunks/{terminal-image-renderer-SGGTG5LN.js → terminal-image-renderer-BCUN3Z3W.js} +20 -20
  172. package/chunks/{theme-manager-67TSB7LH.js → theme-manager-UGMFDREN.js} +21 -21
  173. package/chunks/{tool-search-XPOFDWOX.js → tool-search-B6F3MPUZ.js} +9 -9
  174. package/chunks/{total-session-admission-SZJFAM25.js → total-session-admission-MQLBJ5WL.js} +22 -22
  175. package/chunks/{trustedFolders-44NTYYV4.js → trustedFolders-2XST7U5C.js} +21 -21
  176. package/chunks/{update-relaunch-K33Q3WEH.js → update-relaunch-OVC7YNGD.js} +5 -5
  177. package/chunks/{updateCheck-VBRNPLS4.js → updateCheck-YAKM36WQ.js} +24 -24
  178. package/chunks/{useAutoAcceptIndicator-AUNRB5S7.js → useAutoAcceptIndicator-RF6FVX3S.js} +31 -31
  179. package/chunks/{validateNonInterActiveAuth-WTO36MTA.js → validateNonInterActiveAuth-IPPXFNQH.js} +57 -55
  180. package/chunks/{version-JZA6HYPI.js → version-4IDFEXOU.js} +1 -1
  181. package/chunks/{web-fetch-LLHPV2IR.js → web-fetch-NUOLHXPN.js} +14 -14
  182. package/chunks/{web-search-4HCHRZ3U.js → web-search-LVOOV4XZ.js} +11 -11
  183. package/chunks/{workflow-YI74QTWW.js → workflow-JSTYTG3K.js} +36 -36
  184. package/chunks/{workspace-providers-status-CI3AO2BH.js → workspace-providers-status-U4EYXA4K.js} +28 -28
  185. package/chunks/{workspace-registration-store-KPIKXDHA.js → workspace-registration-store-OG66U3CB.js} +1 -1
  186. package/chunks/{workspace-registry-XE22QDE6.js → workspace-registry-WSHWQRQQ.js} +22 -22
  187. package/chunks/{workspace-service-WI2FD72A.js → workspace-service-QZXQHX2F.js} +30 -30
  188. package/chunks/{workspace-skills-status-FFZU6FXL.js → workspace-skills-status-VRBHEX5O.js} +26 -26
  189. package/chunks/{workspace-trust-reconciler-GJLNXR2U.js → workspace-trust-reconciler-FCRIUIOF.js} +30 -30
  190. package/chunks/wrapper-46Z24CTM.js +35 -0
  191. package/chunks/{write-file-IEAC3XC3.js → write-file-PYL3JCCD.js} +20 -20
  192. package/chunks/{zoom-image-GTVVT25J.js → zoom-image-RS6MU26F.js} +5 -5
  193. package/cli.js +12 -12
  194. package/package.json +3 -3
  195. package/web-shell/assets/{arc-B13-S0Yo.js → arc-CgGUyHWd.js} +1 -1
  196. package/web-shell/assets/{architectureDiagram-3BPJPVTR-CHvWNlVW.js → architectureDiagram-3BPJPVTR-BR0Qv-1Y.js} +1 -1
  197. package/web-shell/assets/{blockDiagram-GPEHLZMM-CXebOlXF.js → blockDiagram-GPEHLZMM-DIoaceaI.js} +1 -1
  198. package/web-shell/assets/{c4Diagram-AAUBKEIU-BQpx4y3Q.js → c4Diagram-AAUBKEIU-Bc5k6BbI.js} +1 -1
  199. package/web-shell/assets/channel-D2b9IYpS.js +1 -0
  200. package/web-shell/assets/{chunk-2J33WTMH-Cak1exSv.js → chunk-2J33WTMH-DtPEz2WX.js} +1 -1
  201. package/web-shell/assets/{chunk-4BX2VUAB-BIc8BV5_.js → chunk-4BX2VUAB-Dydo6ydE.js} +1 -1
  202. package/web-shell/assets/{chunk-55IACEB6-DoeJ5BL1.js → chunk-55IACEB6-DD9_VWXm.js} +1 -1
  203. package/web-shell/assets/{chunk-727SXJPM-BDR_wYSu.js → chunk-727SXJPM-DVI2m59k.js} +1 -1
  204. package/web-shell/assets/{chunk-AQP2D5EJ-BhRRGRq1.js → chunk-AQP2D5EJ-luatmaTN.js} +1 -1
  205. package/web-shell/assets/{chunk-FMBD7UC4-BJGAwVXr.js → chunk-FMBD7UC4-Duy8NTIi.js} +1 -1
  206. package/web-shell/assets/{chunk-ND2GUHAM-vhE73bsD.js → chunk-ND2GUHAM-CrL1yhms.js} +1 -1
  207. package/web-shell/assets/{chunk-QZHKN3VN-BuTBZsdR.js → chunk-QZHKN3VN-C7BX6bu1.js} +1 -1
  208. package/web-shell/assets/classDiagram-4FO5ZUOK-DHatTCmD.js +1 -0
  209. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DHatTCmD.js +1 -0
  210. package/web-shell/assets/{cose-bilkent-S5V4N54A-CVHKipHP.js → cose-bilkent-S5V4N54A-BTzs7mIi.js} +1 -1
  211. package/web-shell/assets/{dagre-BM42HDAG-C1DPa8SV.js → dagre-BM42HDAG-3VTUmWts.js} +1 -1
  212. package/web-shell/assets/{diagram-2AECGRRQ-BYP_QxkT.js → diagram-2AECGRRQ-Ehdp75GN.js} +1 -1
  213. package/web-shell/assets/{diagram-5GNKFQAL-Cray7ruQ.js → diagram-5GNKFQAL-B3wu3teE.js} +1 -1
  214. package/web-shell/assets/{diagram-KO2AKTUF-Ds4vJANi.js → diagram-KO2AKTUF-DjgTSf2S.js} +1 -1
  215. package/web-shell/assets/{diagram-LMA3HP47-DxFrDykH.js → diagram-LMA3HP47-Br9mwjY3.js} +1 -1
  216. package/web-shell/assets/{diagram-OG6HWLK6-BdIO-pF_.js → diagram-OG6HWLK6-D4xz5M-z.js} +1 -1
  217. package/web-shell/assets/{erDiagram-TEJ5UH35-5JA8KDYV.js → erDiagram-TEJ5UH35-CXayWlG_.js} +1 -1
  218. package/web-shell/assets/{flowDiagram-I6XJVG4X-DL4drKro.js → flowDiagram-I6XJVG4X-CLonjQTi.js} +1 -1
  219. package/web-shell/assets/{ganttDiagram-6RSMTGT7-ijX2DD6_.js → ganttDiagram-6RSMTGT7-BTySFT-1.js} +1 -1
  220. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-_lPsFLFF.js → gitGraphDiagram-PVQCEYII--2WcUjOe.js} +1 -1
  221. package/web-shell/assets/{index-dHAFxPHb.css → index-CIFO52Wx.css} +1 -1
  222. package/web-shell/assets/{index-C-YoqYbs.js → index-DPJHkFOG.js} +1 -1
  223. package/web-shell/assets/index-bhq3CUUF.js +1789 -0
  224. package/web-shell/assets/{infoDiagram-5YYISTIA-COFClLab.js → infoDiagram-5YYISTIA-9vpgAf1m.js} +1 -1
  225. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Div9KOgO.js → ishikawaDiagram-YF4QCWOH-DcRpHnAW.js} +1 -1
  226. package/web-shell/assets/{journeyDiagram-JHISSGLW-VAw5u0wc.js → journeyDiagram-JHISSGLW-C2TKorRm.js} +1 -1
  227. package/web-shell/assets/{kanban-definition-UN3LZRKU-CncCn8Nl.js → kanban-definition-UN3LZRKU-DdsFwB8b.js} +1 -1
  228. package/web-shell/assets/{linear-D6ad7e_k.js → linear-7PjRvJrf.js} +1 -1
  229. package/web-shell/assets/{mermaid.core-BV1IECGb.js → mermaid.core-raDXa11C.js} +5 -5
  230. package/web-shell/assets/{mindmap-definition-RKZ34NQL-a3jeNgPr.js → mindmap-definition-RKZ34NQL-DLHc-PRN.js} +1 -1
  231. package/web-shell/assets/{pieDiagram-4H26LBE5-DsVRY5BW.js → pieDiagram-4H26LBE5-BftYpeTW.js} +1 -1
  232. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-D6zgexJK.js → quadrantDiagram-W4KKPZXB-O-6ygOYn.js} +1 -1
  233. package/web-shell/assets/{requirementDiagram-4Y6WPE33-VEpSwJjn.js → requirementDiagram-4Y6WPE33-BmZWVufJ.js} +1 -1
  234. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CYEuOFne.js → sankeyDiagram-5OEKKPKP-2x5beiWt.js} +1 -1
  235. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CCg0lI-9.js → sequenceDiagram-3UESZ5HK-BH8uKokQ.js} +1 -1
  236. package/web-shell/assets/{stateDiagram-AJRCARHV-BHXPsL0B.js → stateDiagram-AJRCARHV-Dq1MFgX_.js} +1 -1
  237. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-spuAYji6.js +1 -0
  238. package/web-shell/assets/{timeline-definition-PNZ67QCA-gqTf9a0k.js → timeline-definition-PNZ67QCA-Cl2WKbv9.js} +1 -1
  239. package/web-shell/assets/{vennDiagram-CIIHVFJN-C4DXXkBh.js → vennDiagram-CIIHVFJN-BqoRo_Q-.js} +1 -1
  240. package/web-shell/assets/{wardley-L42UT6IY-CMK46EiX.js → wardley-L42UT6IY-BTxp-Yot.js} +1 -1
  241. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DTk1Gzt9.js → wardleyDiagram-YWT4CUSO-DFXVCSH2.js} +1 -1
  242. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BcJsM1dH.js → xychartDiagram-2RQKCTM6-qQhWx0aE.js} +1 -1
  243. package/web-shell/index.html +2 -2
  244. package/web-shell/assets/channel-BB_Hm8Rf.js +0 -1
  245. package/web-shell/assets/classDiagram-4FO5ZUOK-B_hFK54Y.js +0 -1
  246. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B_hFK54Y.js +0 -1
  247. package/web-shell/assets/index-BTwNYZkp.js +0 -1785
  248. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-eTG8D0QT.js +0 -1
  249. package/chunks/{artifact-tool-M7UAJ5NT.js → artifact-tool-FRMBPDPB.js} +3 -3
  250. package/chunks/{chunk-NWNEANAT.js → chunk-44CTCCLY.js} +0 -0
  251. package/chunks/{chunk-25OFRBH2.js → chunk-5PWLQ7SK.js} +4 -4
  252. package/chunks/{chunk-KCCODSAA.js → chunk-TBVNYG5B.js} +3 -3
  253. package/chunks/{chunk-4MHDNGAV.js → chunk-ZGWY4YUB.js} +3 -3
  254. package/chunks/{ls-O4VBQRG7.js → ls-FSHISLLA.js} +3 -3
  255. package/chunks/{task-update-LCJM3EYG.js → task-update-DVV6CUGI.js} +2 -2
@@ -1,11 +1,5 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import {
4
- deriveWebSocketBase,
5
- openQwenAsrRealtimeStream,
6
- openVoiceStream,
7
- openVoiceStreamWithRetry
8
- } from "./chunk-BTYS2JAY.js";
9
3
  import {
10
4
  GENERATION_MAX_PROMPT_BYTES,
11
5
  LIVE_SESSION_SOURCE_PREFIX,
@@ -26,7 +20,14 @@ import {
26
20
  shouldSuppressRememberErrorDetails,
27
21
  workspaceMemoryFailureCode,
28
22
  workspaceMemoryFailureDiagnostics
29
- } from "./chunk-2R2HYSUQ.js";
23
+ } from "./chunk-KIFRFCCB.js";
24
+ import {
25
+ deriveWebSocketBase,
26
+ openQwenAsrRealtimeStream,
27
+ openVoiceStream,
28
+ openVoiceStreamWithRetry
29
+ } from "./chunk-3XZYK76R.js";
30
+ import "./chunk-ZBBVBZBR.js";
30
31
  import {
31
32
  SetupGithubError,
32
33
  collectSessionData,
@@ -38,15 +39,15 @@ import {
38
39
  toJson,
39
40
  toJsonl,
40
41
  toMarkdown
41
- } from "./chunk-W2ITCESM.js";
42
+ } from "./chunk-VWD7SNNN.js";
42
43
  import {
43
44
  OBSERVED_CONTACT_MAX_FRESH_WITHIN_SECONDS,
44
45
  ObservedChannelContactStore
45
46
  } from "./chunk-47FQVRCO.js";
46
- import "./chunk-HMCSRTDY.js";
47
47
  import {
48
48
  escapeAnsiCtrlCodes
49
49
  } from "./chunk-4NFY2S7N.js";
50
+ import "./chunk-U6PTKAOW.js";
50
51
  import "./chunk-2MIN6GRR.js";
51
52
  import "./chunk-QHTIBUWB.js";
52
53
  import "./chunk-3Z43GZUQ.js";
@@ -106,7 +107,7 @@ import {
106
107
  setRateLimiter,
107
108
  unsafeRevealSecret,
108
109
  validateMcpRuntimeServerName
109
- } from "./chunk-JHMFKJEP.js";
110
+ } from "./chunk-KNQZXSLW.js";
110
111
  import "./chunk-VGHZT6JR.js";
111
112
  import {
112
113
  isLoopbackBind,
@@ -114,6 +115,10 @@ import {
114
115
  parseCallerSuppliedSessionId
115
116
  } from "./chunk-TQOF5KBL.js";
116
117
  import "./chunk-HGCQ5SE7.js";
118
+ import {
119
+ evaluateDaemonWorkspaceTrust,
120
+ readDaemonTrustPolicySnapshot
121
+ } from "./chunk-6AECVSVX.js";
117
122
  import {
118
123
  EMPTY_WORKSPACE_VOICE_UPDATE_ERROR,
119
124
  MAX_WORKSPACE_SKILL_NAME_LENGTH,
@@ -127,14 +132,14 @@ import {
127
132
  validateWorkspaceSkillName,
128
133
  validateWorkspaceVoiceState,
129
134
  voiceSettingsScopeToWire
130
- } from "./chunk-7QE3QFU3.js";
135
+ } from "./chunk-EXG2R5UR.js";
131
136
  import {
132
137
  PermissionRulesValidationError,
133
138
  buildPermissionSettings,
134
139
  isPermissionRuleType,
135
140
  normalizePermissionRules,
136
141
  readPermissionRuleSet
137
- } from "./chunk-DM4C3OX5.js";
142
+ } from "./chunk-SSAOTDK7.js";
138
143
  import {
139
144
  assertVoiceBaseUrlNetworkAllowed,
140
145
  isStreamingVoiceModel,
@@ -142,12 +147,12 @@ import {
142
147
  resolveVoiceTranscriptionConfig,
143
148
  sanitizeVoiceErrorMessage,
144
149
  transcribeVoiceAudio
145
- } from "./chunk-HZV75ET2.js";
150
+ } from "./chunk-VQZXRLEX.js";
146
151
  import {
147
152
  isVoiceEnabled,
148
153
  isVoiceMode,
149
154
  readVoiceModel
150
- } from "./chunk-F4T5J34H.js";
155
+ } from "./chunk-5UPJ774B.js";
151
156
  import "./chunk-IQFYO5BF.js";
152
157
  import {
153
158
  createTotalSessionAdmissionController
@@ -165,26 +170,39 @@ import {
165
170
  } from "./chunk-4JRM2BSM.js";
166
171
  import {
167
172
  assertValidChannelSecretUpdates
168
- } from "./chunk-YVVIFFU4.js";
173
+ } from "./chunk-P64FPV3G.js";
169
174
  import {
170
175
  createDaemonStatusProvider
171
- } from "./chunk-P7KCJGBR.js";
176
+ } from "./chunk-RQVVXDHS.js";
172
177
  import "./chunk-NTTBXH7U.js";
173
- import "./chunk-AKLY5M2C.js";
178
+ import "./chunk-JEMR2FTD.js";
174
179
  import "./chunk-3SH53ANB.js";
180
+ import {
181
+ SessionArtifactAuthorizationError,
182
+ SessionArtifactValidationError,
183
+ createAcpSessionBridge,
184
+ parseSessionSource
185
+ } from "./chunk-O5G7IQGM.js";
186
+ import {
187
+ EVENT_SCHEMA_VERSION,
188
+ EventBus,
189
+ SubscriberLimitExceededError
190
+ } from "./chunk-MZSJ43WV.js";
191
+ import "./chunk-XCGIMOLN.js";
192
+ import "./chunk-OCPBI7J5.js";
175
193
  import {
176
194
  createWorkspaceProvidersStatusProvider
177
- } from "./chunk-3SOTXJNO.js";
195
+ } from "./chunk-YZJVVQD3.js";
178
196
  import {
179
197
  getAuthTypeFromEnv,
180
198
  resolveCliGenerationConfig
181
- } from "./chunk-23GFHEM3.js";
199
+ } from "./chunk-NPE3STIW.js";
182
200
  import {
183
201
  snapshotProcessEnv
184
- } from "./chunk-DEKY5Y7V.js";
202
+ } from "./chunk-5I5NMQCU.js";
185
203
  import {
186
204
  createWorkspaceSkillsStatusProvider
187
- } from "./chunk-OGQERNHD.js";
205
+ } from "./chunk-AJX4ITUG.js";
188
206
  import "./chunk-BGXZBI5B.js";
189
207
  import "./chunk-Z4X5MTRT.js";
190
208
  import {
@@ -200,42 +218,26 @@ import {
200
218
  import {
201
219
  require_express
202
220
  } from "./chunk-GDXET5XU.js";
203
- import {
204
- evaluateDaemonWorkspaceTrust,
205
- readDaemonTrustPolicySnapshot
206
- } from "./chunk-XUMBOJC2.js";
207
221
  import {
208
222
  daemonObservedContactsPath,
209
223
  loadChannelsConfig
210
- } from "./chunk-U7QUDFPD.js";
211
- import "./chunk-N3ZWGKXN.js";
224
+ } from "./chunk-TRYJ3BVE.js";
225
+ import "./chunk-LHY6HBRA.js";
212
226
  import "./chunk-57OAHC2Y.js";
213
227
  import {
214
228
  parseChannelWebhookConfigLenient
215
- } from "./chunk-VRWOMUZM.js";
229
+ } from "./chunk-YTYPRVIZ.js";
216
230
  import "./chunk-ENEEQMGM.js";
217
231
  import {
218
232
  supportedChannelCatalog
219
- } from "./chunk-JPA7IDTE.js";
233
+ } from "./chunk-DEG7R6Z6.js";
234
+ import "./chunk-V6WHFGST.js";
220
235
  import {
221
236
  LIVE_HOST_BUNDLE_ID,
222
237
  LIVE_HOST_PROTOCOL_VERSION,
223
238
  LIVE_INPUT_AUDIO_EPOCH_BYTES
224
239
  } from "./chunk-NKLP3DCK.js";
225
- import {
226
- SessionArtifactAuthorizationError,
227
- SessionArtifactValidationError,
228
- createAcpSessionBridge,
229
- parseSessionSource
230
- } from "./chunk-2AAFGCWP.js";
231
- import {
232
- EVENT_SCHEMA_VERSION,
233
- EventBus,
234
- SubscriberLimitExceededError
235
- } from "./chunk-MZSJ43WV.js";
236
- import "./chunk-XCGIMOLN.js";
237
- import "./chunk-OCPBI7J5.js";
238
- import "./chunk-TKAEODJR.js";
240
+ import "./chunk-TYGKUOEG.js";
239
241
  import {
240
242
  STATUS_SCHEMA_VERSION,
241
243
  SessionRestoreTimeoutError,
@@ -245,7 +247,6 @@ import {
245
247
  import "./chunk-K6KS3LTN.js";
246
248
  import "./chunk-FC4KQFCS.js";
247
249
  import "./chunk-T3CHYWJZ.js";
248
- import "./chunk-V6WHFGST.js";
249
250
  import {
250
251
  MAX_REGISTERED_WORKSPACES,
251
252
  WorkspaceDisplayNameValidationError,
@@ -253,7 +254,7 @@ import {
253
254
  WorkspaceRegistrationStoreLimitError,
254
255
  normalizeWorkspaceDisplayName,
255
256
  workspaceRegistrationId
256
- } from "./chunk-UEUE6LJX.js";
257
+ } from "./chunk-JL3LC3CQ.js";
257
258
  import {
258
259
  DAEMON_PROMPT_DISPLAY_TEXT_META_KEY,
259
260
  REQUESTED_SESSION_ID_META_KEY,
@@ -324,11 +325,11 @@ import {
324
325
  redactLogCredentials
325
326
  } from "./chunk-M5GB774H.js";
326
327
  import "./chunk-BKHCW2BI.js";
327
- import "./chunk-5HBA2Z7V.js";
328
328
  import {
329
329
  sanitizeLogText
330
330
  } from "./chunk-LT532KF4.js";
331
331
  import "./chunk-IW6RQPQB.js";
332
+ import "./chunk-5HBA2Z7V.js";
332
333
  import {
333
334
  getDialogSettingKeys,
334
335
  getModelProvidersOwnerScope,
@@ -338,26 +339,26 @@ import {
338
339
  getWritableScopes,
339
340
  loadSettings,
340
341
  validateSettingValue
341
- } from "./chunk-4PFKN7CQ.js";
342
- import "./chunk-T4576UW4.js";
342
+ } from "./chunk-M6SXIXBV.js";
343
343
  import "./chunk-RKUWKYED.js";
344
+ import "./chunk-L7T742G2.js";
344
345
  import "./chunk-GOXKNSDZ.js";
345
346
  import "./chunk-IDS7MSUP.js";
346
347
  import {
347
348
  detectSystemLanguage,
348
349
  resolveLanguageSetting
349
- } from "./chunk-KFCTC5IJ.js";
350
+ } from "./chunk-GYBDYWMV.js";
350
351
  import {
351
352
  SUPPORTED_LANGUAGES,
352
353
  resolveSupportedLanguage
353
354
  } from "./chunk-5EJZE3FP.js";
354
- import "./chunk-UM57UTTV.js";
355
+ import "./chunk-RRQJPCRQ.js";
355
356
  import "./chunk-MS7GNABG.js";
356
- import "./chunk-EOBM4T2Z.js";
357
+ import "./chunk-M2PY7CNK.js";
357
358
  import "./chunk-VJNBRRZG.js";
358
359
  import {
359
360
  getWorkspaceTrustStatus
360
- } from "./chunk-YIKMBYMT.js";
361
+ } from "./chunk-4ETA3KRC.js";
361
362
  import "./chunk-NPQ5ZKRP.js";
362
363
  import {
363
364
  isWithinRoot as isWithinRoot2
@@ -437,7 +438,7 @@ import {
437
438
  writeWorkspaceContextFile,
438
439
  writeWorktreeSession,
439
440
  writeWorktreeSessionMarker
440
- } from "./chunk-UIZGNLBP.js";
441
+ } from "./chunk-M6HXP2SG.js";
441
442
  import "./chunk-GOFAQQZA.js";
442
443
  import "./chunk-5M6IDOMF.js";
443
444
  import "./chunk-TWPJO254.js";
@@ -450,7 +451,7 @@ import "./chunk-KT4OWAAZ.js";
450
451
  import "./chunk-IX7CFQGA.js";
451
452
  import "./chunk-N7NBMAMW.js";
452
453
  import "./chunk-6PVPNMXU.js";
453
- import "./chunk-XT6TGJFD.js";
454
+ import "./chunk-I4XSOFH2.js";
454
455
  import {
455
456
  nextFireTime,
456
457
  parseCron
@@ -469,16 +470,16 @@ import "./chunk-O6GEWCJA.js";
469
470
  import "./chunk-T26EAKDL.js";
470
471
  import "./chunk-ZPJWUGCS.js";
471
472
  import "./chunk-CPBF7KYF.js";
473
+ import {
474
+ APPROVAL_MODES
475
+ } from "./chunk-6LYDH7VT.js";
472
476
  import "./chunk-2AZMF6G5.js";
473
477
  import "./chunk-KRXPRVGL.js";
474
478
  import "./chunk-GZGDJ4E6.js";
475
479
  import "./chunk-T6W4KACQ.js";
476
480
  import "./chunk-MWZYNOCG.js";
477
481
  import "./chunk-SAQHDAUJ.js";
478
- import {
479
- APPROVAL_MODES
480
- } from "./chunk-6LYDH7VT.js";
481
- import "./chunk-2XZWO53E.js";
482
+ import "./chunk-6XZERB6P.js";
482
483
  import {
483
484
  addDaemonRequestAttribute,
484
485
  captureDaemonTelemetryContext,
@@ -490,12 +491,29 @@ import {
490
491
  recordDaemonHttpResponse,
491
492
  runWithDaemonTelemetryContext,
492
493
  withDaemonRequestSpan
493
- } from "./chunk-BJKREW56.js";
494
+ } from "./chunk-O5AZPHYZ.js";
494
495
  import "./chunk-SAH4BD2J.js";
495
- import "./chunk-25OFRBH2.js";
496
+ import "./chunk-5PWLQ7SK.js";
496
497
  import "./chunk-EYS3GGM3.js";
497
498
  import "./chunk-S6LOFUVP.js";
498
499
  import "./chunk-2J3OJGTL.js";
500
+ import {
501
+ CursorNotAtLineBoundaryError,
502
+ LargeNonUtf8TextError,
503
+ TextScanBudgetExceededError,
504
+ decodeBufferWithEncodingInfoAsync,
505
+ getAllGeminiMdFilenames,
506
+ isUtf8CompatibleEncoding,
507
+ isWithinRoot,
508
+ parseLineTolerant,
509
+ read
510
+ } from "./chunk-HB6QW4LM.js";
511
+ import "./chunk-YRLW2MSX.js";
512
+ import "./chunk-VGC4I5JJ.js";
513
+ import "./chunk-732MOPEM.js";
514
+ import "./chunk-CTQE2NB2.js";
515
+ import "./chunk-NC4O6UE6.js";
516
+ import "./chunk-IEP44U2R.js";
499
517
  import {
500
518
  SubagentError,
501
519
  SubagentErrorCode
@@ -505,6 +523,7 @@ import {
505
523
  escapeXml
506
524
  } from "./chunk-AQ37AY7B.js";
507
525
  import "./chunk-V3LXMASR.js";
526
+ import "./chunk-XTH2OMDS.js";
508
527
  import {
509
528
  QwenOAuth2Client,
510
529
  QwenOAuthPollError,
@@ -513,46 +532,27 @@ import {
513
532
  isDeviceAuthorizationSuccess,
514
533
  isDeviceTokenPending,
515
534
  isDeviceTokenSuccess
516
- } from "./chunk-KCCODSAA.js";
535
+ } from "./chunk-TBVNYG5B.js";
517
536
  import "./chunk-NAVJD2PQ.js";
518
537
  import "./chunk-5HBFERG5.js";
519
538
  import "./chunk-EYW54TBD.js";
520
539
  import "./chunk-P3QQPMQA.js";
521
540
  import "./chunk-O4BBDP2G.js";
522
541
  import "./chunk-KPVVWKF3.js";
542
+ import "./chunk-XWUQ4IH5.js";
543
+ import "./chunk-F6WFNA7U.js";
544
+ import "./chunk-F6AOBFUN.js";
523
545
  import "./chunk-KM73TBQ4.js";
524
546
  import "./chunk-MPHPFVKK.js";
525
547
  import "./chunk-AXMWHKXA.js";
526
548
  import "./chunk-GLCZKT5V.js";
527
- import "./chunk-DJ2GSRLV.js";
528
549
  import "./chunk-GJJQV4PY.js";
529
- import "./chunk-CR3C7WXL.js";
530
- import "./chunk-XWRJCPHC.js";
531
- import {
532
- CursorNotAtLineBoundaryError,
533
- LargeNonUtf8TextError,
534
- TextScanBudgetExceededError,
535
- decodeBufferWithEncodingInfoAsync,
536
- getAllGeminiMdFilenames,
537
- isUtf8CompatibleEncoding,
538
- isWithinRoot,
539
- parseLineTolerant,
540
- read
541
- } from "./chunk-U2JLICUY.js";
542
- import "./chunk-YRLW2MSX.js";
543
- import "./chunk-VGC4I5JJ.js";
544
- import "./chunk-732MOPEM.js";
545
- import "./chunk-CTQE2NB2.js";
546
- import "./chunk-IEP44U2R.js";
547
- import "./chunk-XTH2OMDS.js";
548
- import "./chunk-MDQSCFAZ.js";
549
- import "./chunk-F6WFNA7U.js";
550
550
  import "./chunk-46UV252V.js";
551
551
  import "./chunk-FPGTNKCP.js";
552
+ import "./chunk-DJ2GSRLV.js";
552
553
  import "./chunk-EFIMD5VA.js";
553
- import "./chunk-NC4O6UE6.js";
554
- import "./chunk-F6AOBFUN.js";
555
- import "./chunk-HUE2M6VI.js";
554
+ import "./chunk-E5BWLU5J.js";
555
+ import "./chunk-CR3C7WXL.js";
556
556
  import "./chunk-HHJLM3WQ.js";
557
557
  import "./chunk-L2GTEEEU.js";
558
558
  import {
@@ -563,6 +563,7 @@ import {
563
563
  runWithoutDebugLogSession
564
564
  } from "./chunk-MPBRV3UU.js";
565
565
  import "./chunk-VOQXFAY5.js";
566
+ import "./chunk-XWRJCPHC.js";
566
567
  import {
567
568
  writeStderrLine,
568
569
  writeStderrLineSafe
@@ -570,13 +571,13 @@ import {
570
571
  import "./chunk-75DOP5OR.js";
571
572
  import "./chunk-DMTGGOSA.js";
572
573
  import "./chunk-YQ3U5MUC.js";
574
+ import "./chunk-AMDSOFFV.js";
573
575
  import {
574
576
  import_websocket,
575
577
  import_websocket_server,
576
578
  wrapper_default
577
- } from "./chunk-TYAMGABM.js";
579
+ } from "./chunk-E3GLDLYB.js";
578
580
  import "./chunk-FCMNKVXT.js";
579
- import "./chunk-AMDSOFFV.js";
580
581
  import "./chunk-QUGAUQGJ.js";
581
582
  import {
582
583
  init_esbuild_shims
@@ -588,7 +589,7 @@ import {
588
589
 
589
590
  // packages/cli/src/serve/server.ts
590
591
  init_esbuild_shims();
591
- var import_express5 = __toESM(require_express(), 1);
592
+ var import_express6 = __toESM(require_express(), 1);
592
593
 
593
594
  // packages/cli/src/serve/acp-http/index.ts
594
595
  init_esbuild_shims();
@@ -1006,6 +1007,7 @@ import * as path2 from "node:path";
1006
1007
  var MAX_READ_BYTES = 256 * 1024;
1007
1008
  var MAX_TEXT_SCAN_BYTES = 8 * 1024 * 1024;
1008
1009
  var MAX_WRITE_BYTES = 5 * 1024 * 1024;
1010
+ var MAX_UPLOAD_BYTES = 50 * 1024 * 1024;
1009
1011
  var BINARY_PROBE_BYTES = 4096;
1010
1012
  function shouldIgnore(absolute, boundWorkspace, ignore, kind = "file") {
1011
1013
  const rel = path2.relative(boundWorkspace, absolute);
@@ -1205,11 +1207,11 @@ function decodeTextCursor(cursor) {
1205
1207
  return { off, size, dev, ino };
1206
1208
  }
1207
1209
  __name(decodeTextCursor, "decodeTextCursor");
1208
- function assertCursorMatchesFile(cursor, stats, path16) {
1210
+ function assertCursorMatchesFile(cursor, stats, path17) {
1209
1211
  if (String(stats.dev) !== cursor.dev || String(stats.ino) !== cursor.ino || stats.size < cursor.size) {
1210
1212
  throw new FsError(
1211
1213
  "hash_mismatch",
1212
- `cursor no longer matches the file it was issued for: ${path16}`,
1214
+ `cursor no longer matches the file it was issued for: ${path17}`,
1213
1215
  { hint: "re-read the file from the beginning to get a fresh cursor" }
1214
1216
  );
1215
1217
  }
@@ -2093,6 +2095,41 @@ var WorkspaceFileSystemImpl = class {
2093
2095
  throw this.recordAndWrap(err, "edit", p);
2094
2096
  }
2095
2097
  }
2098
+ async writeBytesAtomic(p, data) {
2099
+ const start = performance.now();
2100
+ try {
2101
+ this.deps.generationGuard?.assertOpen();
2102
+ assertTrustedForIntent(this.deps.trusted, "write");
2103
+ enforceWriteSize(data.length, MAX_UPLOAD_BYTES);
2104
+ const out = await this.deps.pathLocks.runExclusive(
2105
+ p,
2106
+ async () => {
2107
+ await assertCreateTargetAbsent(p);
2108
+ this.deps.generationGuard?.assertOpen();
2109
+ const result = await atomicPublishResolvedFile({
2110
+ target: p,
2111
+ buf: data,
2112
+ mode: "create",
2113
+ assertGenerationOpen: /* @__PURE__ */ __name(() => this.deps.generationGuard?.assertOpen(), "assertGenerationOpen")
2114
+ });
2115
+ const verdict = this.ignoreVerdict(p, "file");
2116
+ this.deps.audit.recordAccess(this.deps.ctx, {
2117
+ intent: "write",
2118
+ absolute: p,
2119
+ durationMs: performance.now() - start,
2120
+ sizeBytes: result.sizeBytes,
2121
+ matchedIgnore: verdict.ignored ? verdict.category : void 0
2122
+ });
2123
+ return { sizeBytes: result.sizeBytes, hash: result.hash };
2124
+ }
2125
+ );
2126
+ return out;
2127
+ } catch (err) {
2128
+ throw this.recordAndWrap(err, "write", p, {
2129
+ audit: !(isFsError(err) && err.kind === "file_already_exists")
2130
+ });
2131
+ }
2132
+ }
2096
2133
  /**
2097
2134
  * Coerce an arbitrary thrown value into an `FsError`, emit the
2098
2135
  * matching `fs.denied` audit event, and return the typed error
@@ -2106,11 +2143,14 @@ var WorkspaceFileSystemImpl = class {
2106
2143
  * - routes can still rely on `instanceof FsError`
2107
2144
  * for their `sendFsError` serializer.
2108
2145
  */
2109
- recordAndWrap(err, intent, input) {
2146
+ recordAndWrap(err, intent, input, opts) {
2110
2147
  if (err instanceof Error && "code" in err && err.code === "workspace_generation_closed") {
2111
2148
  return err;
2112
2149
  }
2113
2150
  const fs8 = wrapAsFsError(err);
2151
+ if (opts?.audit === false) {
2152
+ return fs8;
2153
+ }
2114
2154
  this.deps.audit.recordDenied(this.deps.ctx, {
2115
2155
  intent,
2116
2156
  input,
@@ -2562,6 +2602,22 @@ function mergeWriteMeta(existing, opts) {
2562
2602
  }
2563
2603
  __name(mergeWriteMeta, "mergeWriteMeta");
2564
2604
  async function atomicWriteTextResolvedFile(input) {
2605
+ const buf = await encodeTextFileContentAsync(
2606
+ input.target,
2607
+ input.content,
2608
+ buildWriteMeta(input.meta)
2609
+ );
2610
+ enforceWriteSize(buf.length);
2611
+ return atomicPublishResolvedFile({
2612
+ target: input.target,
2613
+ buf,
2614
+ mode: input.mode,
2615
+ expectedHash: input.expectedHash,
2616
+ assertGenerationOpen: input.assertGenerationOpen
2617
+ });
2618
+ }
2619
+ __name(atomicWriteTextResolvedFile, "atomicWriteTextResolvedFile");
2620
+ async function atomicPublishResolvedFile(input) {
2565
2621
  const target = input.target;
2566
2622
  const parent = path4.dirname(target);
2567
2623
  const parentStat = await fsp2.lstat(parent);
@@ -2576,24 +2632,29 @@ async function atomicWriteTextResolvedFile(input) {
2576
2632
  `parent path is not a directory: ${parent}`
2577
2633
  );
2578
2634
  }
2579
- const tmpPath = path4.join(
2580
- parent,
2581
- `.${path4.basename(target)}.${process.pid}.${randomBytes(6).toString("hex")}.tmp`
2582
- );
2635
+ const tmpSuffix = `.${process.pid}.${randomBytes(6).toString("hex")}.tmp`;
2636
+ const tmpNameMaxBytes = 255;
2637
+ const tmpBaseMaxBytes = tmpNameMaxBytes - 1 - Buffer.byteLength(tmpSuffix, "utf-8");
2638
+ let tmpBase = path4.basename(target);
2639
+ if (Buffer.byteLength(tmpBase, "utf-8") > tmpBaseMaxBytes) {
2640
+ tmpBase = safeUtf8Truncate(
2641
+ Buffer.from(tmpBase, "utf-8"),
2642
+ tmpBaseMaxBytes
2643
+ ).toString("utf-8");
2644
+ }
2645
+ const tmpPath = path4.join(parent, `.${tmpBase}${tmpSuffix}`);
2583
2646
  let tempLive = false;
2584
2647
  let tempHandle;
2585
2648
  let tempStat;
2586
2649
  try {
2587
2650
  tempHandle = await reserveTempFile(tmpPath);
2588
2651
  tempLive = true;
2589
- const encoded = await writeEncodedTextTemp({
2590
- targetPath: target,
2652
+ const written = await writeBufferToTemp({
2591
2653
  tmpPath,
2592
- content: input.content,
2593
- meta: input.meta,
2654
+ buf: input.buf,
2594
2655
  handle: tempHandle
2595
2656
  });
2596
- tempStat = encoded.stat;
2657
+ tempStat = written.stat;
2597
2658
  const targetState = await assertAtomicTargetPrecondition({
2598
2659
  target,
2599
2660
  mode: input.mode,
@@ -2612,7 +2673,7 @@ async function atomicWriteTextResolvedFile(input) {
2612
2673
  }
2613
2674
  tempLive = false;
2614
2675
  await fsyncParentDirBestEffort(parent);
2615
- return encoded;
2676
+ return written;
2616
2677
  } catch (err) {
2617
2678
  await tempHandle?.close().catch(() => void 0);
2618
2679
  if (tempLive) {
@@ -2624,19 +2685,13 @@ async function atomicWriteTextResolvedFile(input) {
2624
2685
  throw err;
2625
2686
  }
2626
2687
  }
2627
- __name(atomicWriteTextResolvedFile, "atomicWriteTextResolvedFile");
2688
+ __name(atomicPublishResolvedFile, "atomicPublishResolvedFile");
2628
2689
  async function reserveTempFile(tmpPath) {
2629
2690
  return fsp2.open(tmpPath, "wx", 384);
2630
2691
  }
2631
2692
  __name(reserveTempFile, "reserveTempFile");
2632
- async function writeEncodedTextTemp(input) {
2633
- const buf = await encodeTextFileContentAsync(
2634
- input.targetPath,
2635
- input.content,
2636
- buildWriteMeta(input.meta)
2637
- );
2638
- enforceWriteSize(buf.length);
2639
- await input.handle.writeFile(buf);
2693
+ async function writeBufferToTemp(input) {
2694
+ await input.handle.writeFile(input.buf);
2640
2695
  await syncHandleBestEffort(input.handle);
2641
2696
  const st = await fsp2.lstat(input.tmpPath);
2642
2697
  const opened = await input.handle.stat();
@@ -2654,9 +2709,9 @@ async function writeEncodedTextTemp(input) {
2654
2709
  `temporary path is not a regular file: ${input.tmpPath}`
2655
2710
  );
2656
2711
  }
2657
- return { sizeBytes: buf.length, hash: hashBuffer(buf), stat: st };
2712
+ return { sizeBytes: input.buf.length, hash: hashBuffer(input.buf), stat: st };
2658
2713
  }
2659
- __name(writeEncodedTextTemp, "writeEncodedTextTemp");
2714
+ __name(writeBufferToTemp, "writeBufferToTemp");
2660
2715
  async function assertCreateTargetAbsent(target) {
2661
2716
  try {
2662
2717
  const st = await fsp2.lstat(target);
@@ -14586,7 +14641,7 @@ function mountAcpHttp(app, bridge, opts) {
14586
14641
  const archiveCoordinator = opts.archiveCoordinator ?? new SessionArchiveCoordinator();
14587
14642
  const requestedSessionIdAdmission = opts.requestedSessionIdAdmission;
14588
14643
  const getPrimaryEnv = /* @__PURE__ */ __name(() => opts.workspaceRegistry ? runtimeEffectiveEnv(opts.workspaceRegistry.primary, daemonEnv) : daemonEnv, "getPrimaryEnv");
14589
- const path16 = opts.path ?? "/acp";
14644
+ const path17 = opts.path ?? "/acp";
14590
14645
  const dispatcherRef = {};
14591
14646
  let disposed = false;
14592
14647
  const rejectIfDisposed = /* @__PURE__ */ __name((res) => {
@@ -14770,7 +14825,7 @@ function mountAcpHttp(app, bridge, opts) {
14770
14825
  const primaryMount = {
14771
14826
  primary: true,
14772
14827
  workspaceCwd: opts.boundWorkspace,
14773
- routeLabel: logSafe(path16),
14828
+ routeLabel: logSafe(path17),
14774
14829
  rateLimitScope: opts.workspaceRegistry?.primary.workspaceId ?? "primary",
14775
14830
  registry,
14776
14831
  dispatcher,
@@ -14924,7 +14979,7 @@ function mountAcpHttp(app, bridge, opts) {
14924
14979
  });
14925
14980
  }, "handleAcpPost");
14926
14981
  app.post(
14927
- path16,
14982
+ path17,
14928
14983
  (req, res) => handleAcpPost(primaryMount, req, res)
14929
14984
  );
14930
14985
  const handleAcpGet = /* @__PURE__ */ __name((mount, req, res) => {
@@ -15023,10 +15078,10 @@ function mountAcpHttp(app, bridge, opts) {
15023
15078
  onPumpSettled();
15024
15079
  });
15025
15080
  }, "handleAcpGet");
15026
- app.get(path16, (req, res) => {
15081
+ app.get(path17, (req, res) => {
15027
15082
  handleAcpGet(primaryMount, req, res);
15028
15083
  });
15029
- app.delete(path16, (req, res) => {
15084
+ app.delete(path17, (req, res) => {
15030
15085
  handleAcpDelete(primaryMount, req, res);
15031
15086
  });
15032
15087
  const createSecondaryAcpMount = /* @__PURE__ */ __name((rt) => {
@@ -15235,7 +15290,7 @@ function mountAcpHttp(app, bridge, opts) {
15235
15290
  const isPluralAcpShape = pluralRawSelector !== null;
15236
15291
  const pluralVoiceRawSelector = opts.workspaceVoiceConnection ? pluralWorkspaceRawSelector(rawPath, PLURAL_VOICE_WS_SUFFIX) : null;
15237
15292
  const isPluralVoiceShape = pluralVoiceRawSelector !== null;
15238
- if (rawPath !== path16 && !isCdpPath && !extraRoute && !isPluralAcpShape && !isPluralVoiceShape) {
15293
+ if (rawPath !== path17 && !isCdpPath && !extraRoute && !isPluralAcpShape && !isPluralVoiceShape) {
15239
15294
  logReject(`unknown-path ${logSafe(rawPath)}`);
15240
15295
  socket.destroy();
15241
15296
  return;
@@ -15773,7 +15828,7 @@ function mountAcpHttp(app, bridge, opts) {
15773
15828
  });
15774
15829
  }, "upgradeListener");
15775
15830
  httpServer.on("upgrade", upgradeListener);
15776
- writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${path16}`);
15831
+ writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${path17}`);
15777
15832
  }
15778
15833
  __name(setupWebSocket, "setupWebSocket");
15779
15834
  return {
@@ -19673,6 +19728,8 @@ __name(registerWorkspaceExtensionRoutes, "registerWorkspaceExtensionRoutes");
19673
19728
 
19674
19729
  // packages/cli/src/serve/routes/workspace-file-write.ts
19675
19730
  init_esbuild_shims();
19731
+ var import_express3 = __toESM(require_express(), 1);
19732
+ import * as path10 from "node:path";
19676
19733
  function getFsFactory3(req, res) {
19677
19734
  const context = getWorkspaceRouteContext(req);
19678
19735
  if (context) return context.runtime.routeFileSystemFactory;
@@ -19950,6 +20007,351 @@ function registerWorkspaceQualifiedFileWriteRoutes(app, deps) {
19950
20007
  );
19951
20008
  }
19952
20009
  __name(registerWorkspaceQualifiedFileWriteRoutes, "registerWorkspaceQualifiedFileWriteRoutes");
20010
+ var MAX_CONCURRENT_UPLOADS = 4;
20011
+ var MAX_UPLOAD_FILENAME_BYTES = 255;
20012
+ var NUMBERED_CANDIDATE_CAP = 1e3;
20013
+ var uploadGateLeases = /* @__PURE__ */ new WeakMap();
20014
+ function createUploadConcurrencyGate(max = MAX_CONCURRENT_UPLOADS) {
20015
+ let active = 0;
20016
+ return {
20017
+ tryAcquire() {
20018
+ if (active >= max) return false;
20019
+ active += 1;
20020
+ return true;
20021
+ },
20022
+ release() {
20023
+ if (active > 0) active -= 1;
20024
+ }
20025
+ };
20026
+ }
20027
+ __name(createUploadConcurrencyGate, "createUploadConcurrencyGate");
20028
+ var uploadAdmissions = /* @__PURE__ */ new WeakMap();
20029
+ function splitStemExtension(basename7) {
20030
+ const lastDot = basename7.lastIndexOf(".");
20031
+ if (lastDot <= 0) return { stem: basename7, ext: "" };
20032
+ return { stem: basename7.slice(0, lastDot), ext: basename7.slice(lastDot) };
20033
+ }
20034
+ __name(splitStemExtension, "splitStemExtension");
20035
+ function fitFilenameToByteCap(stem, suffix, ext, capBytes) {
20036
+ if (Buffer.byteLength(suffix + ext, "utf-8") > capBytes) return null;
20037
+ let chars = Array.from(stem);
20038
+ while (Buffer.byteLength(chars.join("") + suffix + ext, "utf-8") > capBytes) {
20039
+ if (chars.length === 0) return null;
20040
+ chars = chars.slice(0, -1);
20041
+ }
20042
+ return chars.join("") + suffix + ext;
20043
+ }
20044
+ __name(fitFilenameToByteCap, "fitFilenameToByteCap");
20045
+ function sendUploadTooLarge(res) {
20046
+ applyReadHeaders(res);
20047
+ res.status(413).json({
20048
+ errorKind: "file_too_large",
20049
+ error: `Request body too large (max ${MAX_UPLOAD_BYTES / (1024 * 1024)} MiB)`,
20050
+ status: 413,
20051
+ maxBytes: MAX_UPLOAD_BYTES
20052
+ });
20053
+ }
20054
+ __name(sendUploadTooLarge, "sendUploadTooLarge");
20055
+ function fileUploadConcurrencyGate(gate) {
20056
+ return (req, res, next) => {
20057
+ if (!gate.tryAcquire()) {
20058
+ applyReadHeaders(res);
20059
+ res.status(429).set("Retry-After", "1").json({
20060
+ errorKind: "upload_busy",
20061
+ error: "Too many uploads in progress",
20062
+ status: 429,
20063
+ retryAfterSeconds: 1
20064
+ });
20065
+ return;
20066
+ }
20067
+ let released = false;
20068
+ const release = /* @__PURE__ */ __name(() => {
20069
+ if (released) return;
20070
+ released = true;
20071
+ gate.release();
20072
+ res.off("finish", releaseBeforeHandler);
20073
+ res.off("close", releaseBeforeHandler);
20074
+ uploadGateLeases.delete(req);
20075
+ }, "release");
20076
+ const releaseBeforeHandler = /* @__PURE__ */ __name(() => {
20077
+ if (!lease.handlerStarted) release();
20078
+ }, "releaseBeforeHandler");
20079
+ const lease = { handlerStarted: false, release };
20080
+ uploadGateLeases.set(req, lease);
20081
+ res.once("finish", releaseBeforeHandler);
20082
+ res.once("close", releaseBeforeHandler);
20083
+ next();
20084
+ };
20085
+ }
20086
+ __name(fileUploadConcurrencyGate, "fileUploadConcurrencyGate");
20087
+ function fileUploadBodyParser() {
20088
+ const raw = import_express3.default.raw({
20089
+ type: "application/octet-stream",
20090
+ limit: MAX_UPLOAD_BYTES,
20091
+ // The endpoint contract is raw octets: decoding a Content-Encoding would
20092
+ // publish bytes the client never sent (and hash/size of the decoded form).
20093
+ inflate: false
20094
+ });
20095
+ return (req, res, next) => {
20096
+ raw(req, res, (err) => {
20097
+ if (err) {
20098
+ const status = err.status;
20099
+ if (status === 413) {
20100
+ sendUploadTooLarge(res);
20101
+ return;
20102
+ }
20103
+ if (status === 415) {
20104
+ applyReadHeaders(res);
20105
+ res.status(415).json({
20106
+ errorKind: "unsupported_media_type",
20107
+ error: "File uploads do not support encoded request bodies",
20108
+ status: 415
20109
+ });
20110
+ return;
20111
+ }
20112
+ if (err.code === "ECONNABORTED" || req.aborted) {
20113
+ return;
20114
+ }
20115
+ next(err);
20116
+ return;
20117
+ }
20118
+ next();
20119
+ });
20120
+ };
20121
+ }
20122
+ __name(fileUploadBodyParser, "fileUploadBodyParser");
20123
+ function fileUploadAdmission(deps, opts) {
20124
+ return (req, res, next) => {
20125
+ void (async () => {
20126
+ const ROUTE2 = opts.qualified ? "POST /workspaces/:workspace/file/upload" : "POST /file/upload";
20127
+ try {
20128
+ if (opts.qualified) {
20129
+ const registry = deps.workspaceRegistry;
20130
+ if (!registry) {
20131
+ throw new Error("workspace registry is not configured");
20132
+ }
20133
+ const runtime = resolveWorkspaceRuntimeFromParam(registry, req, res);
20134
+ if (!runtime) return;
20135
+ if (!requireTrustedWorkspaceRuntime(runtime, res)) return;
20136
+ setWorkspaceRouteContext(req, {
20137
+ runtime,
20138
+ routePrefix: "POST /workspaces/:workspace"
20139
+ });
20140
+ } else if (opts.isWorkspaceTrusted?.() === false) {
20141
+ applyReadHeaders(res);
20142
+ res.status(403).json({
20143
+ errorKind: "untrusted_workspace",
20144
+ error: "workspace is not trusted; write operations are forbidden",
20145
+ status: 403
20146
+ });
20147
+ return;
20148
+ }
20149
+ const contentType = (req.headers["content-type"] ?? "").split(";")[0].trim().toLowerCase();
20150
+ if (contentType !== "application/octet-stream") {
20151
+ applyReadHeaders(res);
20152
+ res.status(415).json({
20153
+ errorKind: "unsupported_media_type",
20154
+ error: "File uploads require application/octet-stream",
20155
+ status: 415
20156
+ });
20157
+ return;
20158
+ }
20159
+ const queryPath = req.query["path"];
20160
+ if (typeof queryPath !== "string" || queryPath.length === 0) {
20161
+ sendParseError(res, ROUTE2, "`path` query parameter is required");
20162
+ return;
20163
+ }
20164
+ const dir = path10.dirname(queryPath);
20165
+ const basename7 = path10.basename(queryPath);
20166
+ if (queryPath.endsWith("/") || basename7.length === 0 || basename7 === "." || basename7 === "..") {
20167
+ sendParseError(res, ROUTE2, "`path` must name a file");
20168
+ return;
20169
+ }
20170
+ if (queryPath.includes("\0")) {
20171
+ sendParseError(res, ROUTE2, "path must not contain null bytes");
20172
+ return;
20173
+ }
20174
+ if (hasSuspiciousPathPattern(basename7)) {
20175
+ sendParseError(res, ROUTE2, "filename contains a suspicious pattern");
20176
+ return;
20177
+ }
20178
+ if (Buffer.byteLength(basename7, "utf-8") > MAX_UPLOAD_FILENAME_BYTES) {
20179
+ sendParseError(
20180
+ res,
20181
+ ROUTE2,
20182
+ `filename exceeds ${MAX_UPLOAD_FILENAME_BYTES} bytes`
20183
+ );
20184
+ return;
20185
+ }
20186
+ const contentLength = req.headers["content-length"];
20187
+ if (contentLength !== void 0) {
20188
+ const declared = Number(contentLength);
20189
+ if (Number.isFinite(declared) && declared > MAX_UPLOAD_BYTES) {
20190
+ sendUploadTooLarge(res);
20191
+ return;
20192
+ }
20193
+ }
20194
+ const clientId = deps.parseClientId(req, res);
20195
+ if (clientId === null) return;
20196
+ const originatorClientId = resolveOriginatorClientId2(
20197
+ clientId,
20198
+ deps,
20199
+ res,
20200
+ req
20201
+ );
20202
+ if (originatorClientId === null) return;
20203
+ const factory = getFsFactory3(req, res);
20204
+ if (!factory) return;
20205
+ const fs8 = factory.forRequest({
20206
+ originatorClientId,
20207
+ route: ROUTE2
20208
+ });
20209
+ const resolvedDir = await fs8.resolve(dir, "write");
20210
+ let dirStat;
20211
+ try {
20212
+ dirStat = await fs8.stat(resolvedDir);
20213
+ } catch (err) {
20214
+ if (isFsError(err) && err.kind === "path_not_found") {
20215
+ sendParseError(res, ROUTE2, "parent directory does not exist");
20216
+ return;
20217
+ }
20218
+ throw err;
20219
+ }
20220
+ if (dirStat.kind !== "directory") {
20221
+ sendParseError(res, ROUTE2, "parent path is not a directory");
20222
+ return;
20223
+ }
20224
+ uploadAdmissions.set(req, {
20225
+ route: ROUTE2,
20226
+ fs: fs8,
20227
+ basename: basename7,
20228
+ resolvedDir,
20229
+ queryDir: dir
20230
+ });
20231
+ next();
20232
+ } catch (err) {
20233
+ sendFsError(
20234
+ res,
20235
+ err,
20236
+ opts.qualified ? "POST /workspaces/:workspace/file/upload" : "POST /file/upload"
20237
+ );
20238
+ }
20239
+ })();
20240
+ };
20241
+ }
20242
+ __name(fileUploadAdmission, "fileUploadAdmission");
20243
+ async function handlePostFileUpload(req, res) {
20244
+ const admission = uploadAdmissions.get(req);
20245
+ if (!admission) {
20246
+ applyReadHeaders(res);
20247
+ res.status(500).json({
20248
+ errorKind: "internal_error",
20249
+ error: "upload admission context is missing",
20250
+ status: 500
20251
+ });
20252
+ return;
20253
+ }
20254
+ const { route, fs: fs8, basename: basename7, resolvedDir, queryDir } = admission;
20255
+ const { stem, ext } = splitStemExtension(basename7);
20256
+ const lease = uploadGateLeases.get(req);
20257
+ if (lease) lease.handlerStarted = true;
20258
+ try {
20259
+ if (req.aborted || res.closed) return;
20260
+ const body = req.body;
20261
+ const data = body === void 0 || body === null ? Buffer.alloc(0) : body;
20262
+ for (let n = 0; n < NUMBERED_CANDIDATE_CAP; n++) {
20263
+ const candidateBasename = n === 0 ? basename7 : fitFilenameToByteCap(
20264
+ stem,
20265
+ ` (${n})`,
20266
+ ext,
20267
+ MAX_UPLOAD_FILENAME_BYTES
20268
+ );
20269
+ if (candidateBasename === null) {
20270
+ sendParseError(
20271
+ res,
20272
+ route,
20273
+ `filename cannot fit within ${MAX_UPLOAD_FILENAME_BYTES} bytes`
20274
+ );
20275
+ return;
20276
+ }
20277
+ const candidateAbs = path10.join(resolvedDir, candidateBasename);
20278
+ let resolved;
20279
+ try {
20280
+ resolved = await fs8.resolve(
20281
+ path10.join(queryDir, candidateBasename),
20282
+ "write"
20283
+ );
20284
+ } catch (err) {
20285
+ if (isFsError(err) && err.kind === "symlink_escape" && err.cause?.code === "ELOOP") {
20286
+ continue;
20287
+ }
20288
+ sendFsError(res, err, route);
20289
+ return;
20290
+ }
20291
+ if (resolved !== candidateAbs) {
20292
+ continue;
20293
+ }
20294
+ try {
20295
+ const out = await fs8.writeBytesAtomic(resolved, data);
20296
+ applyReadHeaders(res);
20297
+ res.status(201).json({
20298
+ kind: "file_upload",
20299
+ path: workspaceRelative(req, resolved),
20300
+ sizeBytes: out.sizeBytes,
20301
+ hash: out.hash
20302
+ });
20303
+ return;
20304
+ } catch (err) {
20305
+ if (isFsError(err) && err.kind === "file_already_exists") {
20306
+ continue;
20307
+ }
20308
+ sendFsError(res, err, route);
20309
+ return;
20310
+ }
20311
+ }
20312
+ applyReadHeaders(res);
20313
+ res.status(409).json({
20314
+ errorKind: "file_already_exists",
20315
+ error: `could not allocate a free filename for "${basename7}"`,
20316
+ status: 409
20317
+ });
20318
+ } catch (err) {
20319
+ sendFsError(res, err, route);
20320
+ } finally {
20321
+ uploadAdmissions.delete(req);
20322
+ lease?.release();
20323
+ }
20324
+ }
20325
+ __name(handlePostFileUpload, "handlePostFileUpload");
20326
+ function registerWorkspaceFileUploadRoutes(app, deps) {
20327
+ app.post(
20328
+ "/file/upload",
20329
+ deps.mutate({ strict: true }),
20330
+ fileUploadAdmission(deps, {
20331
+ qualified: false,
20332
+ isWorkspaceTrusted: deps.isWorkspaceTrusted
20333
+ }),
20334
+ fileUploadConcurrencyGate(deps.uploadGate),
20335
+ fileUploadBodyParser(),
20336
+ (req, res) => {
20337
+ void handlePostFileUpload(req, res);
20338
+ }
20339
+ );
20340
+ }
20341
+ __name(registerWorkspaceFileUploadRoutes, "registerWorkspaceFileUploadRoutes");
20342
+ function registerWorkspaceQualifiedFileUploadRoutes(app, deps) {
20343
+ app.post(
20344
+ "/workspaces/:workspace/file/upload",
20345
+ deps.mutate({ strict: true }),
20346
+ fileUploadAdmission(deps, { qualified: true }),
20347
+ fileUploadConcurrencyGate(deps.uploadGate),
20348
+ fileUploadBodyParser(),
20349
+ (req, res) => {
20350
+ void handlePostFileUpload(req, res);
20351
+ }
20352
+ );
20353
+ }
20354
+ __name(registerWorkspaceQualifiedFileUploadRoutes, "registerWorkspaceQualifiedFileUploadRoutes");
19953
20355
 
19954
20356
  // packages/cli/src/serve/routes/workspace-trust.ts
19955
20357
  init_esbuild_shims();
@@ -20547,8 +20949,8 @@ function decodePathSegment(value) {
20547
20949
  }
20548
20950
  __name(decodePathSegment, "decodePathSegment");
20549
20951
  function matchLegacySessionTelemetryRoute(method, requestPath) {
20550
- const path16 = requestPath.length > 1 && requestPath.endsWith("/") ? requestPath.slice(0, -1) : requestPath;
20551
- const requestSegments = path16.split("/").slice(1);
20952
+ const path17 = requestPath.length > 1 && requestPath.endsWith("/") ? requestPath.slice(0, -1) : requestPath;
20953
+ const requestSegments = path17.split("/").slice(1);
20552
20954
  const prefix = requestSegments[0]?.toLowerCase();
20553
20955
  if (prefix !== "session" && prefix !== "sessions" && prefix !== "permission") {
20554
20956
  return void 0;
@@ -20600,23 +21002,23 @@ __name(setDaemonTelemetryWorkspace, "setDaemonTelemetryWorkspace");
20600
21002
  function resolveDaemonTelemetryRoute(req) {
20601
21003
  const legacyRoute = matchLegacySessionTelemetryRoute(req.method, req.path);
20602
21004
  if (legacyRoute) return legacyRoute;
20603
- const path16 = req.path.replace(/\/$/, "") || "/";
20604
- if (req.method === "GET" && path16 === "/daemon/status") {
21005
+ const path17 = req.path.replace(/\/$/, "") || "/";
21006
+ if (req.method === "GET" && path17 === "/daemon/status") {
20605
21007
  return { route: "GET /daemon/status" };
20606
21008
  }
20607
- if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(path16)) {
21009
+ if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(path17)) {
20608
21010
  return { route: "GET /workspace/:id/sessions" };
20609
21011
  }
20610
- if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(path16)) {
21012
+ if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(path17)) {
20611
21013
  return { route: "GET /workspace/:id/sessions" };
20612
21014
  }
20613
- if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(path16)) {
21015
+ if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(path17)) {
20614
21016
  return { route: "GET /workspace/:id/session-info" };
20615
21017
  }
20616
- if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(path16)) {
21018
+ if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(path17)) {
20617
21019
  return { route: "GET /workspace/:id/session-info" };
20618
21020
  }
20619
- const workspaceTranscript = path16.match(
21021
+ const workspaceTranscript = path17.match(
20620
21022
  /^\/workspaces\/[^/]+\/session\/([^/]+)\/transcript$/
20621
21023
  );
20622
21024
  if (workspaceTranscript?.[1] && req.method === "GET") {
@@ -20625,7 +21027,7 @@ function resolveDaemonTelemetryRoute(req) {
20625
21027
  sessionId: decodePathSegment(workspaceTranscript[1])
20626
21028
  };
20627
21029
  }
20628
- const workspaceExport = path16.match(
21030
+ const workspaceExport = path17.match(
20629
21031
  /^\/workspaces\/[^/]+\/session\/([^/]+)\/export$/
20630
21032
  );
20631
21033
  if (workspaceExport?.[1] && req.method === "GET") {
@@ -20634,7 +21036,7 @@ function resolveDaemonTelemetryRoute(req) {
20634
21036
  sessionId: decodePathSegment(workspaceExport[1])
20635
21037
  };
20636
21038
  }
20637
- const workspaceArchivedExport = path16.match(
21039
+ const workspaceArchivedExport = path17.match(
20638
21040
  /^\/workspaces\/[^/]+\/session\/([^/]+)\/archive\/export$/
20639
21041
  );
20640
21042
  if (workspaceArchivedExport?.[1] && req.method === "GET") {
@@ -20644,8 +21046,8 @@ function resolveDaemonTelemetryRoute(req) {
20644
21046
  };
20645
21047
  }
20646
21048
  const pluralWorkspacePrefix = /^\/workspaces\/[^/]+/;
20647
- if (pluralWorkspacePrefix.test(path16)) {
20648
- const suffix = path16.replace(pluralWorkspacePrefix, "/workspace");
21049
+ if (pluralWorkspacePrefix.test(path17)) {
21050
+ const suffix = path17.replace(pluralWorkspacePrefix, "/workspace");
20649
21051
  if (req.method === "GET") {
20650
21052
  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") {
20651
21053
  return { route: `GET ${suffix}` };
@@ -20668,7 +21070,7 @@ function resolveDaemonTelemetryRoute(req) {
20668
21070
  }
20669
21071
  }
20670
21072
  if (req.method === "POST") {
20671
- if (suffix === "/workspace/settings" || suffix === "/workspace/voice" || suffix === "/workspace/voice/transcribe" || suffix === "/workspace/permissions" || suffix === "/workspace/trust/request" || suffix === "/workspace/init" || suffix === "/workspace/reload" || suffix === "/workspace/file/write" || suffix === "/workspace/file/edit" || suffix === "/workspace/mcp/servers" || suffix === "/workspace/memory" || suffix === "/workspace/agents" || suffix === "/workspace/sessions/delete" || suffix === "/workspace/sessions/archive" || suffix === "/workspace/sessions/unarchive" || suffix === "/workspace/session-groups") {
21073
+ if (suffix === "/workspace/settings" || suffix === "/workspace/voice" || suffix === "/workspace/voice/transcribe" || suffix === "/workspace/permissions" || suffix === "/workspace/trust/request" || suffix === "/workspace/init" || suffix === "/workspace/reload" || suffix === "/workspace/file/write" || suffix === "/workspace/file/edit" || suffix === "/workspace/file/upload" || suffix === "/workspace/mcp/servers" || suffix === "/workspace/memory" || suffix === "/workspace/agents" || suffix === "/workspace/sessions/delete" || suffix === "/workspace/sessions/archive" || suffix === "/workspace/sessions/unarchive" || suffix === "/workspace/session-groups") {
20672
21074
  return { route: `POST ${suffix}` };
20673
21075
  }
20674
21076
  if (/^\/workspace\/tools\/[^/]+\/enable$/.test(suffix)) {
@@ -20704,58 +21106,58 @@ function resolveDaemonTelemetryRoute(req) {
20704
21106
  return { route: "DELETE /workspace/session-groups/:groupId" };
20705
21107
  }
20706
21108
  }
20707
- if (req.method === "POST" && path16 === "/workspace/init") {
21109
+ if (req.method === "POST" && path17 === "/workspace/init") {
20708
21110
  return { route: "POST /workspace/init" };
20709
21111
  }
20710
- if (req.method === "POST" && path16 === "/workspace/setup-github") {
21112
+ if (req.method === "POST" && path17 === "/workspace/setup-github") {
20711
21113
  return { route: "POST /workspace/setup-github" };
20712
21114
  }
20713
- if (req.method === "POST" && path16 === "/workspace/reload") {
21115
+ if (req.method === "POST" && path17 === "/workspace/reload") {
20714
21116
  return { route: "POST /workspace/reload" };
20715
21117
  }
20716
- const mcpRestart = path16.match(/^\/workspace\/mcp\/([^/]+)\/restart$/);
21118
+ const mcpRestart = path17.match(/^\/workspace\/mcp\/([^/]+)\/restart$/);
20717
21119
  if (mcpRestart?.[1] && req.method === "POST") {
20718
21120
  return { route: "POST /workspace/mcp/:server/restart" };
20719
21121
  }
20720
- if (req.method === "POST" && path16 === "/workspace/mcp/servers") {
21122
+ if (req.method === "POST" && path17 === "/workspace/mcp/servers") {
20721
21123
  return { route: "POST /workspace/mcp/servers" };
20722
21124
  }
20723
- const mcpDelete = path16.match(/^\/workspace\/mcp\/servers\/([^/]+)$/);
21125
+ const mcpDelete = path17.match(/^\/workspace\/mcp\/servers\/([^/]+)$/);
20724
21126
  if (mcpDelete?.[1] && req.method === "DELETE") {
20725
21127
  return { route: "DELETE /workspace/mcp/servers/:name" };
20726
21128
  }
20727
- if (req.method === "POST" && path16 === "/workspace/auth/device-flow") {
21129
+ if (req.method === "POST" && path17 === "/workspace/auth/device-flow") {
20728
21130
  return { route: "POST /workspace/auth/device-flow" };
20729
21131
  }
20730
- const deviceFlowDelete = path16.match(
21132
+ const deviceFlowDelete = path17.match(
20731
21133
  /^\/workspace\/auth\/device-flow\/([^/]+)$/
20732
21134
  );
20733
21135
  if (deviceFlowDelete?.[1] && req.method === "DELETE") {
20734
21136
  return { route: "DELETE /workspace/auth/device-flow/:id" };
20735
21137
  }
20736
- const toolEnable = path16.match(/^\/workspace\/tools\/([^/]+)\/enable$/);
21138
+ const toolEnable = path17.match(/^\/workspace\/tools\/([^/]+)\/enable$/);
20737
21139
  if (toolEnable?.[1] && req.method === "POST") {
20738
21140
  return { route: "POST /workspace/tools/:name/enable" };
20739
21141
  }
20740
- if (path16 === "/workspace/settings") {
21142
+ if (path17 === "/workspace/settings") {
20741
21143
  if (req.method === "GET") return { route: "GET /workspace/settings" };
20742
21144
  if (req.method === "POST") return { route: "POST /workspace/settings" };
20743
21145
  }
20744
- if (path16 === "/workspace/permissions") {
21146
+ if (path17 === "/workspace/permissions") {
20745
21147
  if (req.method === "GET") return { route: "GET /workspace/permissions" };
20746
21148
  if (req.method === "POST") return { route: "POST /workspace/permissions" };
20747
21149
  }
20748
- if (path16 === "/workspace/trust") {
21150
+ if (path17 === "/workspace/trust") {
20749
21151
  if (req.method === "GET") return { route: "GET /workspace/trust" };
20750
21152
  }
20751
- if (req.method === "POST" && path16 === "/workspace/trust/request") {
21153
+ if (req.method === "POST" && path17 === "/workspace/trust/request") {
20752
21154
  return { route: "POST /workspace/trust/request" };
20753
21155
  }
20754
- if (path16 === "/workspace/voice") {
21156
+ if (path17 === "/workspace/voice") {
20755
21157
  if (req.method === "GET") return { route: "GET /workspace/voice" };
20756
21158
  if (req.method === "POST") return { route: "POST /workspace/voice" };
20757
21159
  }
20758
- if (req.method === "POST" && path16 === "/workspace/voice/transcribe") {
21160
+ if (req.method === "POST" && path17 === "/workspace/voice/transcribe") {
20759
21161
  return { route: "POST /workspace/voice/transcribe" };
20760
21162
  }
20761
21163
  return void 0;
@@ -21024,7 +21426,7 @@ __name(registerPermissionRoutes, "registerPermissionRoutes");
21024
21426
  init_esbuild_shims();
21025
21427
  import * as crypto3 from "node:crypto";
21026
21428
  import * as fs6 from "node:fs";
21027
- import * as path11 from "node:path";
21429
+ import * as path12 from "node:path";
21028
21430
 
21029
21431
  // packages/cli/src/serve/server/prompt-deadline.ts
21030
21432
  init_esbuild_shims();
@@ -21044,7 +21446,7 @@ init_esbuild_shims();
21044
21446
 
21045
21447
  // packages/cli/src/serve/server/persisted-session-list-cache.ts
21046
21448
  init_esbuild_shims();
21047
- import path10 from "node:path";
21449
+ import path11 from "node:path";
21048
21450
  var PersistedSessionListCache = class {
21049
21451
  constructor(ttlMs, maxRetainedSummaries) {
21050
21452
  this.ttlMs = ttlMs;
@@ -21215,7 +21617,7 @@ var PersistedSessionListCache = class {
21215
21617
  }
21216
21618
  key(scope) {
21217
21619
  return JSON.stringify([
21218
- path10.resolve(scope.runtimeBaseDir),
21620
+ path11.resolve(scope.runtimeBaseDir),
21219
21621
  scope.workspaceCwd,
21220
21622
  scope.archiveState
21221
21623
  ]);
@@ -23174,7 +23576,7 @@ function registerSessionRoutes(app, deps) {
23174
23576
  const workspaceParam = req.params[paramName] ?? "";
23175
23577
  const byId = workspaceRegistry.getByWorkspaceId(workspaceParam);
23176
23578
  if (byId) return byId;
23177
- if (!path11.isAbsolute(workspaceParam)) {
23579
+ if (!path12.isAbsolute(workspaceParam)) {
23178
23580
  res.status(400).json({
23179
23581
  error: `\`:${paramName}\` must decode to a workspace id or absolute path`
23180
23582
  });
@@ -24034,7 +24436,7 @@ function registerSessionRoutes(app, deps) {
24034
24436
  if (worktreeMeta) {
24035
24437
  try {
24036
24438
  const createAllowedRoots = [
24037
- path11.join(workspaceCwd, ".qwen", "worktrees")
24439
+ path12.join(workspaceCwd, ".qwen", "worktrees")
24038
24440
  ];
24039
24441
  let createRepoTop = null;
24040
24442
  try {
@@ -24045,7 +24447,7 @@ function registerSessionRoutes(app, deps) {
24045
24447
  }
24046
24448
  if (createRepoTop && createRepoTop !== workspaceCwd) {
24047
24449
  createAllowedRoots.push(
24048
- path11.join(createRepoTop, ".qwen", "worktrees")
24450
+ path12.join(createRepoTop, ".qwen", "worktrees")
24049
24451
  );
24050
24452
  }
24051
24453
  await runtime.bridge.changeSessionCwd(session.sessionId, {
@@ -24344,7 +24746,7 @@ function registerSessionRoutes(app, deps) {
24344
24746
  if (sidecar) {
24345
24747
  let realTarget;
24346
24748
  const candidateRoots = [
24347
- path11.join(workspaceCwd, ".qwen", "worktrees")
24749
+ path12.join(workspaceCwd, ".qwen", "worktrees")
24348
24750
  ];
24349
24751
  try {
24350
24752
  realTarget = fs6.realpathSync(sidecar.worktreePath);
@@ -24356,13 +24758,13 @@ function registerSessionRoutes(app, deps) {
24356
24758
  } catch {
24357
24759
  }
24358
24760
  if (repoTop && repoTop !== workspaceCwd) {
24359
- candidateRoots.push(path11.join(repoTop, ".qwen", "worktrees"));
24761
+ candidateRoots.push(path12.join(repoTop, ".qwen", "worktrees"));
24360
24762
  }
24361
24763
  const contained = candidateRoots.some((root) => {
24362
24764
  try {
24363
24765
  const realRoot = fs6.realpathSync(root);
24364
- const rel = path11.relative(realRoot, realTarget);
24365
- return !rel.startsWith("..") && !path11.isAbsolute(rel);
24766
+ const rel = path12.relative(realRoot, realTarget);
24767
+ return !rel.startsWith("..") && !path12.isAbsolute(rel);
24366
24768
  } catch {
24367
24769
  return false;
24368
24770
  }
@@ -24678,7 +25080,7 @@ function registerSessionRoutes(app, deps) {
24678
25080
  async (req, res, sessionId, runtime) => {
24679
25081
  const body = safeBody(req);
24680
25082
  const targetPath = body["path"];
24681
- if (typeof targetPath !== "string" || targetPath.length === 0 || !path11.isAbsolute(targetPath)) {
25083
+ if (typeof targetPath !== "string" || targetPath.length === 0 || !path12.isAbsolute(targetPath)) {
24682
25084
  res.status(400).json({
24683
25085
  error: "`path` is required and must be an absolute path",
24684
25086
  code: "invalid_path"
@@ -27853,7 +28255,7 @@ __name(registerUsageStatsRoutes, "registerUsageStatsRoutes");
27853
28255
  // packages/cli/src/serve/scheduled-task-keepalive.ts
27854
28256
  init_esbuild_shims();
27855
28257
  import * as fsSync from "node:fs";
27856
- import * as path12 from "node:path";
28258
+ import * as path13 from "node:path";
27857
28259
  var log = createDebugLogger("SCHED_KEEPALIVE");
27858
28260
  function collectBoundSessionIds(tasks) {
27859
28261
  const seen = /* @__PURE__ */ new Set();
@@ -28079,8 +28481,8 @@ function startScheduledTaskKeepalive(opts) {
28079
28481
  opts.runtimeBaseDir,
28080
28482
  () => getCronFilePath(boundWorkspace)
28081
28483
  );
28082
- const cronDir = path12.dirname(cronFilePath);
28083
- const cronFileName = path12.basename(cronFilePath);
28484
+ const cronDir = path13.dirname(cronFilePath);
28485
+ const cronFileName = path13.basename(cronFilePath);
28084
28486
  let fileWatcher;
28085
28487
  try {
28086
28488
  fsSync.mkdirSync(cronDir, { recursive: true });
@@ -28744,6 +29146,7 @@ function registerCapabilitiesRoutes(app, deps) {
28744
29146
  deps.maxPendingPromptsPerSession
28745
29147
  ),
28746
29148
  sessionRestoreTimeoutMs: deps.sessionRestoreTimeoutMs,
29149
+ ...features.includes("workspace_file_upload") ? { maxWorkspaceFileUploadBytes: MAX_UPLOAD_BYTES } : {},
28747
29150
  ...multiWorkspace ? {
28748
29151
  maxSessionsPerWorkspace: advertisedMaxSessions(
28749
29152
  deps.maxSessionsPerWorkspace
@@ -31062,7 +31465,7 @@ __name(registerWorkspaceModelsRoutes, "registerWorkspaceModelsRoutes");
31062
31465
  // packages/cli/src/serve/routes/a2ui-action.ts
31063
31466
  init_esbuild_shims();
31064
31467
  import * as fsp4 from "node:fs/promises";
31065
- import * as path13 from "node:path";
31468
+ import * as path14 from "node:path";
31066
31469
  var A2UI_MIME = "application/a2ui+json";
31067
31470
  var ACTION_TOOL = "action";
31068
31471
  var CALL_TIMEOUT_MS = 15e3;
@@ -31085,7 +31488,7 @@ __name(usableServerConfig, "usableServerConfig");
31085
31488
  async function findFromSettingsFile(workspaceCwd) {
31086
31489
  try {
31087
31490
  const raw = await fsp4.readFile(
31088
- path13.join(workspaceCwd, ".qwen", "settings.json"),
31491
+ path14.join(workspaceCwd, ".qwen", "settings.json"),
31089
31492
  "utf8"
31090
31493
  );
31091
31494
  const settings = JSON.parse(raw);
@@ -31246,7 +31649,7 @@ __name(registerA2uiActionRoutes, "registerA2uiActionRoutes");
31246
31649
 
31247
31650
  // packages/cli/src/serve/server/fs-factory.ts
31248
31651
  init_esbuild_shims();
31249
- import * as path14 from "node:path";
31652
+ import * as path15 from "node:path";
31250
31653
  var IDE_WORKSPACE_PATH_ENV_VAR = "QWEN_CODE_IDE_WORKSPACE_PATH";
31251
31654
  function createDefaultFsAuditEmit() {
31252
31655
  const WARN_EVERY = 100;
@@ -31321,14 +31724,14 @@ function parseIdeWorkspacePathEnv(value) {
31321
31724
  const parsed = JSON.parse(value);
31322
31725
  if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
31323
31726
  return parsed.filter(
31324
- (workspace) => workspace.length > 0 && path14.isAbsolute(workspace)
31727
+ (workspace) => workspace.length > 0 && path15.isAbsolute(workspace)
31325
31728
  );
31326
31729
  }
31327
31730
  throw new Error("IDE workspace path JSON must be a string array");
31328
31731
  } catch {
31329
31732
  }
31330
31733
  }
31331
- return value.split(path14.delimiter).filter((workspace) => workspace.length > 0 && path14.isAbsolute(workspace));
31734
+ return value.split(path15.delimiter).filter((workspace) => workspace.length > 0 && path15.isAbsolute(workspace));
31332
31735
  }
31333
31736
  __name(parseIdeWorkspacePathEnv, "parseIdeWorkspacePathEnv");
31334
31737
  function dropNestedWorkspacesPreservingPrimary(workspaces) {
@@ -31597,9 +32000,9 @@ __name(setupDeviceFlowRegistry, "setupDeviceFlowRegistry");
31597
32000
 
31598
32001
  // packages/cli/src/serve/server/error-handlers.ts
31599
32002
  init_esbuild_shims();
31600
- var import_express3 = __toESM(require_express(), 1);
32003
+ var import_express4 = __toESM(require_express(), 1);
31601
32004
  function installJsonBodyParser(app) {
31602
- app.use(import_express3.default.json({ limit: "10mb" }));
32005
+ app.use(import_express4.default.json({ limit: "10mb" }));
31603
32006
  app.use((err, _req, res, next) => {
31604
32007
  if (sendJsonBodyParserError(res, err)) return;
31605
32008
  next(err);
@@ -31653,10 +32056,10 @@ function installRateLimiter(app, opts, daemonLog, options = {}) {
31653
32056
  { tier, key: key.slice(0, 64) }
31654
32057
  );
31655
32058
  } : void 0,
31656
- onError: daemonLog ? (err, path16) => {
32059
+ onError: daemonLog ? (err, path17) => {
31657
32060
  daemonLog.warn(
31658
32061
  `rate limiter error (fail-open): ${err instanceof Error ? err.message : String(err)}`,
31659
- { path: path16 }
32062
+ { path: path17 }
31660
32063
  );
31661
32064
  } : void 0
31662
32065
  });
@@ -31852,7 +32255,7 @@ __name(registerWorkspaceQualifiedLifecycleRoutes, "registerWorkspaceQualifiedLif
31852
32255
  init_esbuild_shims();
31853
32256
  import { readdir as readdir2, stat as stat2 } from "node:fs/promises";
31854
32257
  import { realpathSync as realpathSync3 } from "node:fs";
31855
- import { basename as basename4, dirname as dirname4, isAbsolute as isAbsolute7, join as join8, resolve as resolve4, sep as sep3 } from "node:path";
32258
+ import { basename as basename5, dirname as dirname5, isAbsolute as isAbsolute7, join as join9, resolve as resolve4, sep as sep3 } from "node:path";
31856
32259
 
31857
32260
  // packages/cli/src/serve/native-directory-picker.ts
31858
32261
  init_esbuild_shims();
@@ -32238,8 +32641,8 @@ function registerWorkspaceManagementRoutes(app, deps) {
32238
32641
  return;
32239
32642
  }
32240
32643
  const endsWithSep = prefix.endsWith("/") || process.platform === "win32" && prefix.endsWith("\\");
32241
- const dir = endsWithSep ? join8(prefix, ".") : dirname4(prefix);
32242
- const filter = endsWithSep ? "" : basename4(prefix);
32644
+ const dir = endsWithSep ? join9(prefix, ".") : dirname5(prefix);
32645
+ const filter = endsWithSep ? "" : basename5(prefix);
32243
32646
  const filterLower = filter.toLowerCase();
32244
32647
  const suggestions = [];
32245
32648
  let truncated = false;
@@ -32254,7 +32657,7 @@ function registerWorkspaceManagementRoutes(app, deps) {
32254
32657
  let isDir = entry.isDirectory();
32255
32658
  if (!isDir && entry.isSymbolicLink()) {
32256
32659
  try {
32257
- isDir = (await stat2(join8(dir, entry.name))).isDirectory();
32660
+ isDir = (await stat2(join9(dir, entry.name))).isDirectory();
32258
32661
  } catch {
32259
32662
  continue;
32260
32663
  }
@@ -32264,7 +32667,7 @@ function registerWorkspaceManagementRoutes(app, deps) {
32264
32667
  truncated = true;
32265
32668
  break;
32266
32669
  }
32267
- suggestions.push({ name: entry.name, path: join8(dir, entry.name) });
32670
+ suggestions.push({ name: entry.name, path: join9(dir, entry.name) });
32268
32671
  }
32269
32672
  } catch {
32270
32673
  }
@@ -32284,11 +32687,11 @@ function registerWorkspaceManagementRoutes(app, deps) {
32284
32687
  const controller = new AbortController();
32285
32688
  res.on("close", () => controller.abort());
32286
32689
  try {
32287
- const path16 = await pickWorkspaceDirectory(controller.signal);
32690
+ const path17 = await pickWorkspaceDirectory(controller.signal);
32288
32691
  res.status(200).json({
32289
32692
  kind: "workspace-directory-picker",
32290
- selected: path16 !== void 0,
32291
- ...path16 === void 0 ? {} : { path: path16 }
32693
+ selected: path17 !== void 0,
32694
+ ...path17 === void 0 ? {} : { path: path17 }
32292
32695
  });
32293
32696
  } catch (error2) {
32294
32697
  const detail = error2 instanceof Error ? error2.message : String(error2);
@@ -33345,8 +33748,8 @@ function buildDiffList(workspaceCwd, result) {
33345
33748
  hiddenCount: 0
33346
33749
  };
33347
33750
  }
33348
- const files = [...result.perFileStats.entries()].map(([path16, s]) => ({
33349
- path: path16,
33751
+ const files = [...result.perFileStats.entries()].map(([path17, s]) => ({
33752
+ path: path17,
33350
33753
  oldPath: s.oldPath,
33351
33754
  added: s.added,
33352
33755
  removed: s.removed,
@@ -36338,7 +36741,7 @@ __name(registerWorkspaceQualifiedSkillsRoutes, "registerWorkspaceQualifiedSkills
36338
36741
 
36339
36742
  // packages/cli/src/serve/routes/channel-webhooks.ts
36340
36743
  init_esbuild_shims();
36341
- var import_express4 = __toESM(require_express(), 1);
36744
+ var import_express5 = __toESM(require_express(), 1);
36342
36745
  import { createHash as createHash4, timingSafeEqual as timingSafeEqual2 } from "node:crypto";
36343
36746
  var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set([
36344
36747
  "__proto__",
@@ -36387,7 +36790,7 @@ function registerChannelWebhookRoutes(app, deps) {
36387
36790
  locals.channelWebhook = { channelName, source, sourceConfig };
36388
36791
  next();
36389
36792
  },
36390
- import_express4.default.json({ limit: "1mb" }),
36793
+ import_express5.default.json({ limit: "1mb" }),
36391
36794
  async (req, res) => {
36392
36795
  const locals = res.locals;
36393
36796
  const webhook = locals.channelWebhook;
@@ -39889,7 +40292,7 @@ import { createHash as createHash5, randomUUID as randomUUID11 } from "node:cryp
39889
40292
  import * as fs7 from "node:fs";
39890
40293
  import * as fsp5 from "node:fs/promises";
39891
40294
  import * as os2 from "node:os";
39892
- import * as path15 from "node:path";
40295
+ import * as path16 from "node:path";
39893
40296
  import { Readable, Transform } from "node:stream";
39894
40297
  import { pipeline } from "node:stream/promises";
39895
40298
  import { promisify as promisify3 } from "node:util";
@@ -39969,7 +40372,7 @@ async function readBundleValue(appPath, key) {
39969
40372
  "raw",
39970
40373
  "-o",
39971
40374
  "-",
39972
- path15.join(appPath, "Contents", "Info.plist")
40375
+ path16.join(appPath, "Contents", "Info.plist")
39973
40376
  ]);
39974
40377
  }
39975
40378
  __name(readBundleValue, "readBundleValue");
@@ -40111,11 +40514,11 @@ async function downloadLiveHostRelease(currentArchitecture, destination, onProgr
40111
40514
  __name(downloadLiveHostRelease, "downloadLiveHostRelease");
40112
40515
  async function installLatestHost(currentArchitecture, onStatus) {
40113
40516
  const temporaryDirectory = await fsp5.mkdtemp(
40114
- path15.join(os2.tmpdir(), "qwen-live-host-")
40517
+ path16.join(os2.tmpdir(), "qwen-live-host-")
40115
40518
  );
40116
- const archivePath = path15.join(temporaryDirectory, "Qwen-Live-Host.zip");
40117
- const extractedPath = path15.join(temporaryDirectory, "extracted");
40118
- const candidatePath = path15.join(extractedPath, LIVE_HOST_APP_NAME);
40519
+ const archivePath = path16.join(temporaryDirectory, "Qwen-Live-Host.zip");
40520
+ const extractedPath = path16.join(temporaryDirectory, "extracted");
40521
+ const candidatePath = path16.join(extractedPath, LIVE_HOST_APP_NAME);
40119
40522
  const stagingPath = `/Applications/.Qwen Live Host.install-${randomUUID11()}.app`;
40120
40523
  const backupPath = `/Applications/.Qwen Live Host.backup-${randomUUID11()}.app`;
40121
40524
  let movedExisting = false;
@@ -40267,13 +40670,13 @@ var LiveHostInstaller = class {
40267
40670
  init_esbuild_shims();
40268
40671
  import { createHash as createHash6, randomUUID as randomUUID12 } from "node:crypto";
40269
40672
  import { createWriteStream as createWriteStream2, mkdirSync as mkdirSync2 } from "node:fs";
40270
- import { join as join11 } from "node:path";
40673
+ import { join as join12 } from "node:path";
40271
40674
 
40272
40675
  // packages/cli/src/serve/live/realtime-startup-context.ts
40273
40676
  init_esbuild_shims();
40274
40677
  import { readdirSync } from "node:fs";
40275
40678
  import { homedir } from "node:os";
40276
- import { basename as basename5, join as join10 } from "node:path";
40679
+ import { basename as basename6, join as join11 } from "node:path";
40277
40680
  var STARTUP_CONTEXT_HEADER = "Startup context from Qwen Code.\nThis is background context about recent work and machine/workspace layout. It may be incomplete or stale. Use it to inform responses, and do not repeat it back unless relevant.";
40278
40681
  var CURRENT_THREAD_SECTION_TOKEN_BUDGET = 1200;
40279
40682
  var RECENT_WORK_SECTION_TOKEN_BUDGET = 2200;
@@ -40515,7 +40918,7 @@ function collectTreeLines(directory, depth, lines) {
40515
40918
  const indent = " ".repeat(depth);
40516
40919
  lines.push(`${indent}- ${entry.name}${entry.isDirectory() ? "/" : ""}`);
40517
40920
  if (entry.isDirectory()) {
40518
- collectTreeLines(join10(directory, entry.name), depth + 1, lines);
40921
+ collectTreeLines(join11(directory, entry.name), depth + 1, lines);
40519
40922
  }
40520
40923
  }
40521
40924
  if (entries.length > DIR_ENTRY_LIMIT) {
@@ -40539,11 +40942,11 @@ function buildWorkspaceSection(currentCwd, userRoot) {
40539
40942
  if (!cwdTree && !gitRoot && !userRootTree) return void 0;
40540
40943
  const lines = [
40541
40944
  `Current working directory: ${currentCwd}`,
40542
- `Working directory name: ${basename5(currentCwd) || currentCwd}`
40945
+ `Working directory name: ${basename6(currentCwd) || currentCwd}`
40543
40946
  ];
40544
40947
  if (gitRoot) {
40545
40948
  lines.push(`Git root: ${gitRoot}`);
40546
- lines.push(`Git project: ${basename5(gitRoot) || gitRoot}`);
40949
+ lines.push(`Git project: ${basename6(gitRoot) || gitRoot}`);
40547
40950
  }
40548
40951
  if (userRoot) lines.push(`User root: ${userRoot}`);
40549
40952
  if (cwdTree) lines.push("", "Working directory tree:", ...cwdTree);
@@ -40634,13 +41037,13 @@ function openLiveAudioCapture(source, identifier) {
40634
41037
  try {
40635
41038
  mkdirSync2(directory, { recursive: true, mode: 448 });
40636
41039
  const safeIdentifier = identifier.replace(/[^A-Za-z0-9_-]/g, "_");
40637
- const path16 = join11(
41040
+ const path17 = join12(
40638
41041
  directory,
40639
41042
  `${source}-${Date.now()}-${safeIdentifier}.pcm`
40640
41043
  );
40641
- const stream = createWriteStream2(path16, { flags: "wx", mode: 384 });
41044
+ const stream = createWriteStream2(path17, { flags: "wx", mode: 384 });
40642
41045
  stream.on("error", () => void 0);
40643
- return { source, path: path16, stream, hash: createHash6("sha256"), bytes: 0 };
41046
+ return { source, path: path17, stream, hash: createHash6("sha256"), bytes: 0 };
40644
41047
  } catch {
40645
41048
  return void 0;
40646
41049
  }
@@ -43036,7 +43439,7 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
43036
43439
  "createServeApp: runtime replacement/removal requires deps.getSessionBridges so session-id admission can inspect draining generations."
43037
43440
  );
43038
43441
  }
43039
- const app = (0, import_express5.default)();
43442
+ const app = (0, import_express6.default)();
43040
43443
  const injectedWorkspaceRegistry = deps.workspaceRegistry;
43041
43444
  const boundWorkspace = injectedWorkspaceRegistry?.primary.workspaceCwd ?? deps.boundWorkspace ?? canonicalizeWorkspace(opts.workspace ?? process.cwd());
43042
43445
  if (injectedWorkspaceRegistry) {
@@ -44035,6 +44438,23 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
44035
44438
  safeBody,
44036
44439
  workspaceRegistry
44037
44440
  });
44441
+ const uploadGate = createUploadConcurrencyGate();
44442
+ registerWorkspaceFileUploadRoutes(app, {
44443
+ bridge: primaryBridge,
44444
+ mutate,
44445
+ parseClientId: parseClientIdHeader,
44446
+ safeBody,
44447
+ uploadGate,
44448
+ ...primaryRuntimeTrustAuthoritative ? { isWorkspaceTrusted: isPrimaryWorkspaceTrusted } : {}
44449
+ });
44450
+ registerWorkspaceQualifiedFileUploadRoutes(app, {
44451
+ bridge: primaryBridge,
44452
+ mutate,
44453
+ parseClientId: parseClientIdHeader,
44454
+ safeBody,
44455
+ uploadGate,
44456
+ workspaceRegistry
44457
+ });
44038
44458
  registerWorkspaceSetupGithubRoutes(app, {
44039
44459
  boundWorkspace: primaryBoundWorkspace,
44040
44460
  bridge: primaryBridge,