@qwen-code/qwen-code 0.22.3-nightly.20260831.3a0c4c6108 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/README.md +30 -0
  2. package/bundled/computer-use/SKILL.md +116 -180
  3. package/bundled/goal-draft/SKILL.md +5 -1
  4. package/bundled/qc-helper/docs/configuration/model-providers.md +4 -0
  5. package/bundled/qc-helper/docs/configuration/settings.md +53 -50
  6. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  7. package/bundled/qc-helper/docs/features/channels/dingtalk.md +4 -2
  8. package/bundled/qc-helper/docs/features/channels/dws.md +6 -2
  9. package/bundled/qc-helper/docs/features/channels/overview.md +1 -0
  10. package/bundled/qc-helper/docs/features/commands.md +38 -1
  11. package/bundled/qc-helper/docs/features/computer-use.md +2 -2
  12. package/bundled/qc-helper/docs/features/goals.md +9 -3
  13. package/bundled/qc-helper/docs/features/headless.md +16 -1
  14. package/bundled/qc-helper/docs/features/hooks.md +2 -1
  15. package/bundled/qc-helper/docs/features/output-styles.md +38 -0
  16. package/bundled/qc-helper/docs/qwen-serve.md +15 -0
  17. package/bundled/review/SKILL.md +5 -5
  18. package/bundled/review/references/posting.md +2 -2
  19. package/chunks/{MaxSizedBox-IHRTWGSY.js → MaxSizedBox-B3D7545A.js} +41 -45
  20. package/chunks/{StandaloneSessionPicker-TLVWVTJ7.js → StandaloneSessionPicker-QUMO4LLQ.js} +64 -67
  21. package/chunks/{acpAgent-7I5LLPP3.js → acpAgent-2GTFCIEP.js} +771 -248
  22. package/chunks/{agent-4Z4NTJXD.js → agent-XKF5SZWU.js} +26 -30
  23. package/chunks/{agent-headless-TVUJXQWU.js → agent-headless-OC2IB55D.js} +26 -30
  24. package/chunks/{anthropicContentGenerator-VSSPG7XV.js → anthropicContentGenerator-L76MR5OR.js} +14 -14
  25. package/chunks/{artifact-tool-TEYW6I4A.js → artifact-tool-MYCL2QCS.js} +2 -3
  26. package/chunks/{askUserQuestion-PYNBWV63.js → askUserQuestion-THQZMG44.js} +2 -2
  27. package/chunks/{bridge-EVURP4NO.js → bridge-IHSBI2YJ.js} +42 -46
  28. package/chunks/{build-INBK7IXX.js → build-63BIOYWK.js} +1 -1
  29. package/chunks/{channel-management-service-IDBNYSFW.js → channel-management-service-4MTCEGJB.js} +4 -4
  30. package/chunks/{channel-settings-store-MZNXRKVI.js → channel-settings-store-BVKWAI2T.js} +50 -54
  31. package/chunks/{channel-worker-group-ZLP5SJHT.js → channel-worker-group-47F4ISUZ.js} +6 -6
  32. package/chunks/{channel-worker-manager-FG5377T2.js → channel-worker-manager-I5Y44GYR.js} +50 -9
  33. package/chunks/{channel-worker-supervisor-HDVE4ADS.js → channel-worker-supervisor-6VCLUXFE.js} +4 -4
  34. package/chunks/{chunk-3452WXOK.js → chunk-2M3EWQNG.js} +17 -0
  35. package/chunks/{chunk-HDMKCJHI.js → chunk-32LU3APX.js} +1 -1
  36. package/chunks/{chunk-BSJOBW4U.js → chunk-37JFWFCD.js} +1 -1
  37. package/chunks/{chunk-AN3KFCNH.js → chunk-3JQZVCBI.js} +2 -2
  38. package/chunks/{chunk-RGEV5AUD.js → chunk-3L724BJ5.js} +11 -8
  39. package/chunks/{chunk-GCUR24KK.js → chunk-47RYEQW5.js} +2 -2
  40. package/chunks/{chunk-CM4F4JBB.js → chunk-4BGDFKQE.js} +5 -5
  41. package/chunks/{chunk-ZBDYI7VM.js → chunk-4F7GQGXB.js} +10961 -4033
  42. package/chunks/{chunk-JMRE4WJQ.js → chunk-4HVH57J3.js} +81 -17
  43. package/chunks/{chunk-26SIKQIC.js → chunk-4LIFGNI4.js} +1 -1
  44. package/chunks/{chunk-U5RTYI7D.js → chunk-4M24B5J5.js} +13 -13
  45. package/chunks/{chunk-7XICSE62.js → chunk-4PSDSCW3.js} +3 -3
  46. package/chunks/{chunk-AYYKUUKP.js → chunk-4UANMABT.js} +73 -19
  47. package/chunks/{chunk-GS7XT345.js → chunk-54C6PIGT.js} +3 -3
  48. package/chunks/{chunk-UKB2TZAO.js → chunk-5EIOJGCR.js} +4 -4
  49. package/chunks/{chunk-64REQJJ2.js → chunk-5H5S4UY5.js} +3 -3
  50. package/chunks/chunk-5IENVM7Z.js +35 -0
  51. package/chunks/{chunk-JOWQD4LO.js → chunk-5Q5RC2WE.js} +1 -1
  52. package/chunks/{chunk-3NQCZMUB.js → chunk-5RTTI4GE.js} +73 -73
  53. package/chunks/{chunk-J4Y3QJHF.js → chunk-64QH2UC6.js} +11 -1
  54. package/chunks/{chunk-I75VKFCJ.js → chunk-65HWLGA7.js} +1 -1
  55. package/chunks/{chunk-W7KWB6AH.js → chunk-6A2D4QSO.js} +8 -5
  56. package/chunks/{chunk-OTTNXUT5.js → chunk-7IKXTGZT.js} +1 -1
  57. package/chunks/{chunk-LYSZVCCD.js → chunk-7JMGTOH7.js} +427 -129
  58. package/chunks/{chunk-YOFULAHO.js → chunk-7RB56BRJ.js} +3 -3
  59. package/chunks/{chunk-6VHIWUJP.js → chunk-ADYN7P2Y.js} +2 -2
  60. package/chunks/{chunk-7DDTI7Q3.js → chunk-AHYTURFB.js} +1 -1
  61. package/chunks/{chunk-TNMOFNT4.js → chunk-ALUYNJPM.js} +1395 -2079
  62. package/chunks/{chunk-H2A2GJGL.js → chunk-AZJLY2XZ.js} +5 -5
  63. package/chunks/{chunk-BE5FGT5Z.js → chunk-BA4WJC4L.js} +1 -1
  64. package/chunks/{chunk-H5GPPDGY.js → chunk-BFY33IB4.js} +16 -8
  65. package/chunks/{chunk-RY7DL5IF.js → chunk-BJXCYUGM.js} +1 -1
  66. package/chunks/{chunk-ND7TQQPE.js → chunk-C2VWOXHS.js} +6 -6
  67. package/chunks/{chunk-T4RMUTTT.js → chunk-C4TIXFDZ.js} +2 -2
  68. package/chunks/{chunk-B2RIIK3K.js → chunk-CVX63TFJ.js} +3 -1
  69. package/chunks/{chunk-SMJYTKTB.js → chunk-DQCKVAF5.js} +1 -1
  70. package/chunks/{chunk-RLSPPTWH.js → chunk-DSX7KQPM.js} +438 -181
  71. package/chunks/{chunk-PNIGAVY6.js → chunk-DTVQSSNM.js} +2 -2
  72. package/chunks/{chunk-67AY5D3M.js → chunk-DYTW3QVG.js} +23 -8
  73. package/chunks/{chunk-3CZGSTZX.js → chunk-EBDGRBZX.js} +22 -14
  74. package/chunks/{chunk-DJBQCO2E.js → chunk-EFTPIZIC.js} +412 -3
  75. package/chunks/{chunk-QE7DTCLX.js → chunk-EIY7SUPZ.js} +1 -1
  76. package/chunks/{chunk-6OO7QEWV.js → chunk-EVFDRBUM.js} +97 -77
  77. package/chunks/{chunk-QTMPM6RC.js → chunk-EWRW2WQC.js} +3 -3
  78. package/chunks/{chunk-IIFL7QDN.js → chunk-F33GFWPR.js} +34 -11
  79. package/chunks/{chunk-YPISTYEI.js → chunk-F47DITLZ.js} +11 -1
  80. package/chunks/{chunk-OE5AQVNB.js → chunk-F7NF2IOE.js} +6 -6
  81. package/chunks/{chunk-RT4QNQ5P.js → chunk-FD5SJOWT.js} +8 -5
  82. package/chunks/{chunk-ACZ4YRYK.js → chunk-FRICLXCZ.js} +3 -3
  83. package/chunks/{chunk-IBMUI5EV.js → chunk-FUO5V5KI.js} +11 -4
  84. package/chunks/{chunk-T3TL6S3B.js → chunk-G5PBOQWI.js} +8 -5
  85. package/chunks/{chunk-D7D3HSYQ.js → chunk-G7HBEEX7.js} +12 -7
  86. package/chunks/{chunk-FXUSWLBF.js → chunk-GH2S4GD5.js} +133 -8
  87. package/chunks/{chunk-XPDKSOVW.js → chunk-GXUTFQXK.js} +42 -44
  88. package/chunks/{chunk-OSTQZIOY.js → chunk-H43PSPYS.js} +2 -2
  89. package/chunks/{chunk-UVYKCRJZ.js → chunk-HJBHMANB.js} +11 -13
  90. package/chunks/{chunk-WLEYH7CD.js → chunk-HRPFBHW7.js} +4 -0
  91. package/chunks/{chunk-DBTMP3P4.js → chunk-I2TMJPCV.js} +1 -1
  92. package/chunks/{chunk-EU2B4P3D.js → chunk-I4NRYS6A.js} +4 -4
  93. package/chunks/{chunk-JPKTAQS3.js → chunk-I5N4EAS6.js} +1 -1
  94. package/chunks/{chunk-W4BDHLRT.js → chunk-IG4W5SJR.js} +2 -2
  95. package/chunks/{chunk-BXNKREX7.js → chunk-IPATA3T2.js} +2 -2
  96. package/chunks/{chunk-NKLP3DCK.js → chunk-IQAFKVXS.js} +1 -1
  97. package/chunks/{chunk-AYHQZBJ4.js → chunk-IRKQ4YYX.js} +3 -3
  98. package/chunks/{chunk-J3NNHTV6.js → chunk-J5TTWBZK.js} +6 -0
  99. package/chunks/{chunk-AVNATYLY.js → chunk-JJKNYRFY.js} +1 -1
  100. package/chunks/{chunk-ERHAMGAA.js → chunk-JR42V4UY.js} +1 -1
  101. package/chunks/{chunk-NT7LXVV5.js → chunk-JUARRUMA.js} +362 -1084
  102. package/chunks/{chunk-OKMDOATP.js → chunk-KEVYJSI4.js} +11 -11
  103. package/chunks/{chunk-AF3QB6OL.js → chunk-KGV55H53.js} +1 -1
  104. package/chunks/{chunk-SDCHI64N.js → chunk-KM3XVTMO.js} +10 -4
  105. package/chunks/{chunk-ERRJA23L.js → chunk-KMU3ZHH4.js} +1 -1
  106. package/chunks/chunk-KOGW3YWJ.js +2054 -0
  107. package/chunks/{chunk-6NWPR2EB.js → chunk-L26ONV2Y.js} +5 -5
  108. package/chunks/chunk-L34XSHIZ.js +28 -0
  109. package/chunks/{chunk-UXEW7TQS.js → chunk-LB3WQQJK.js} +1 -1
  110. package/chunks/{chunk-YNG7XAJU.js → chunk-LEPCWS5A.js} +1 -1
  111. package/chunks/{chunk-XLENZQXH.js → chunk-LHBNR6EU.js} +2 -2
  112. package/chunks/{chunk-AKNQMSL2.js → chunk-LOBDDFYK.js} +4 -28
  113. package/chunks/{chunk-L6CUJZDG.js → chunk-LU77UT4D.js} +2 -2
  114. package/chunks/{chunk-3EGEBDTW.js → chunk-M4KFODIP.js} +1 -1
  115. package/chunks/{chunk-JLSZT354.js → chunk-M4LBBSVP.js} +2 -0
  116. package/chunks/{chunk-YOMKOM7E.js → chunk-MP6YZ4RK.js} +6580 -5992
  117. package/chunks/chunk-N2TNM3QB.js +9 -0
  118. package/chunks/{chunk-GDXSXL3H.js → chunk-NFIDVZND.js} +1 -1
  119. package/chunks/{chunk-NT5XIL5H.js → chunk-NQ4L2CMD.js} +51 -6
  120. package/chunks/{chunk-OQYXJK2V.js → chunk-NRL5CUZT.js} +1 -1
  121. package/chunks/{chunk-FIWZOMBF.js → chunk-NSUKQ4DN.js} +6 -0
  122. package/chunks/chunk-NUHOLAQ6.js +59 -0
  123. package/chunks/{chunk-BBYTY46C.js → chunk-NVVJTUSL.js} +266 -105
  124. package/chunks/{chunk-CAZADEU7.js → chunk-NXKOVOM5.js} +9 -9
  125. package/chunks/{chunk-5Q372OFJ.js → chunk-O4KNCAX4.js} +57 -10
  126. package/chunks/{chunk-GOXKNSDZ.js → chunk-O5CD7T4T.js} +40 -9
  127. package/chunks/{chunk-XIQ5HQ2F.js → chunk-OBTWL6ZW.js} +1 -1
  128. package/chunks/{chunk-5MK45KZ3.js → chunk-OHOO527W.js} +1 -1
  129. package/chunks/{chunk-CETB5XY4.js → chunk-ORFIYTI2.js} +1 -1
  130. package/chunks/{chunk-7E7UCJHS.js → chunk-OSHQMOBS.js} +18 -17
  131. package/chunks/{chunk-YDQ4OCDK.js → chunk-OSSTATJF.js} +89 -1
  132. package/chunks/chunk-P6UIF2OW.js +400 -0
  133. package/chunks/{chunk-V4HN35IF.js → chunk-PCRBLMIN.js} +16 -2
  134. package/chunks/{chunk-L2OKAIUK.js → chunk-QI27MKNQ.js} +23 -15
  135. package/chunks/{chunk-FHPYRXRH.js → chunk-QJGYU5PG.js} +1 -1
  136. package/chunks/{chunk-IVUWTA2D.js → chunk-QJVZLILI.js} +1 -1
  137. package/chunks/{chunk-TBJ3SNS3.js → chunk-QKDNS6FU.js} +1 -1
  138. package/chunks/{chunk-YKADANK6.js → chunk-QQD2GART.js} +10 -3
  139. package/chunks/{chunk-ED7DD7MV.js → chunk-RAFQIHN2.js} +1 -1
  140. package/chunks/{chunk-TV7BJ7TX.js → chunk-RJUVTJEZ.js} +1 -1
  141. package/chunks/{chunk-RVCGAHC7.js → chunk-RM4WT2XB.js} +4 -4
  142. package/chunks/{chunk-6YXNJXQW.js → chunk-RN3YGDCA.js} +3 -3
  143. package/chunks/{chunk-SMRDCANI.js → chunk-S6H3ELPG.js} +1 -1
  144. package/chunks/{chunk-MBZ5ORJB.js → chunk-SI7WDR3U.js} +281 -2
  145. package/chunks/{chunk-5FGWVPCM.js → chunk-SRF4KTAG.js} +4 -4
  146. package/chunks/{chunk-LFAR7CPW.js → chunk-STCVJXQB.js} +23 -23
  147. package/chunks/{chunk-JDIO45X7.js → chunk-SULZPKTA.js} +1 -1
  148. package/chunks/{chunk-KUDI54QQ.js → chunk-SX2QIMJV.js} +5 -5
  149. package/chunks/{chunk-VYSZUQGU.js → chunk-TJYRTS4S.js} +2 -2
  150. package/chunks/{chunk-JOTYTYYW.js → chunk-TMKTOTMQ.js} +3 -3
  151. package/chunks/{chunk-FPMQT2YY.js → chunk-TQHPVKO6.js} +4 -4
  152. package/chunks/{chunk-GN422P4J.js → chunk-TSZSGQ3N.js} +1 -1
  153. package/chunks/{chunk-IXEZHTDR.js → chunk-U4DJ5XB3.js} +292 -38
  154. package/chunks/{chunk-MZ5A5PQW.js → chunk-UAKRDON5.js} +4 -4
  155. package/chunks/{chunk-NGKLMNWN.js → chunk-UM2FFKXN.js} +2 -2
  156. package/chunks/{chunk-5ICKESC3.js → chunk-UPFRILIL.js} +2 -2
  157. package/chunks/{chunk-RAEEQEC5.js → chunk-UUASLXHW.js} +54 -5
  158. package/chunks/chunk-V5U2NZNJ.js +29 -0
  159. package/chunks/{chunk-P5Y23G2L.js → chunk-V7RNNPGC.js} +1 -18
  160. package/chunks/{chunk-ZYPJ7HVZ.js → chunk-VBWD6C27.js} +1 -1
  161. package/chunks/{chunk-MJBHSZEJ.js → chunk-VNAYZAFX.js} +3 -3
  162. package/chunks/chunk-VPSIC437.js +780 -0
  163. package/chunks/{chunk-AAX236AR.js → chunk-VWTSRH6C.js} +52 -11
  164. package/chunks/{chunk-PDXYZBBQ.js → chunk-VYIUNFEA.js} +2 -2
  165. package/chunks/{chunk-BY24DZ4J.js → chunk-WP4AX3XD.js} +5 -7
  166. package/chunks/{chunk-X7C7KFWA.js → chunk-XLXAZLDR.js} +1 -1
  167. package/chunks/{chunk-ZQ3FKEWA.js → chunk-YPWZTR7F.js} +3 -3
  168. package/chunks/{chunk-IXHV5MIC.js → chunk-ZDFQGHZH.js} +1 -1
  169. package/chunks/chunk-ZJ2LM2SI.js +198 -0
  170. package/chunks/{chunk-PWR2NQBS.js → chunk-ZKFTS3OV.js} +3 -3
  171. package/chunks/{chunk-HMJ2P3SV.js → chunk-ZL4HFSL6.js} +91 -29
  172. package/chunks/{chunk-ID33ZRWH.js → chunk-ZTPGUFQV.js} +28 -6
  173. package/chunks/chunk-bdqvmfwv-ZTSOWAFE.js +17446 -0
  174. package/chunks/{config-utils-NNUPVGEC.js → config-utils-LVSYDLHZ.js} +42 -46
  175. package/chunks/{contextCommand-S3TPCDM5.js → contextCommand-TZD7UAJK.js} +40 -44
  176. package/chunks/{core-runtime-NASPCSQX.js → core-runtime-B4UKKIAQ.js} +42 -46
  177. package/chunks/{create-sub-session-36TNCHCP.js → create-sub-session-LUPWEUHR.js} +2 -2
  178. package/chunks/{create-sub-session-DS4BJLYZ.js → create-sub-session-NJ24B4US.js} +41 -44
  179. package/chunks/{cron-create-QXHTYUTO.js → cron-create-CRSPET3H.js} +1 -1
  180. package/chunks/{cron-delete-WV2BM42M.js → cron-delete-DB77SZTU.js} +1 -1
  181. package/chunks/{cron-list-7KVNBLZ7.js → cron-list-U2JNYWV6.js} +1 -1
  182. package/chunks/{daemon-UCVUHPJD.js → daemon-RKDGBFLK.js} +385 -19
  183. package/chunks/{daemon-git-worktree-guard-ATXVQPS3.js → daemon-git-worktree-guard-O2HPOBAB.js} +40 -44
  184. package/chunks/{daemon-status-provider-UI3GBTMO.js → daemon-status-provider-GRRVCJFW.js} +47 -51
  185. package/chunks/{daemon-trust-policy-SUCBJ2CA.js → daemon-trust-policy-YJL442BK.js} +46 -50
  186. package/chunks/{daemon-trust-policy-monitor-3LM5RQNS.js → daemon-trust-policy-monitor-JL7F4Y4Q.js} +46 -50
  187. package/chunks/{deferred-core-runtime-SCOJLVYG.js → deferred-core-runtime-S32AYVZI.js} +39 -43
  188. package/chunks/{devtools-JCG4K2NZ.js → devtools-VDRJYPZF.js} +1 -1
  189. package/chunks/{discovery-X2NV535U.js → discovery-TUM3ZQ6U.js} +2 -2
  190. package/chunks/{display-image-Z4VBQDEJ.js → display-image-73C7XNRK.js} +3 -3
  191. package/chunks/{dist-7WDZYMWV.js → dist-62OZ7QXB.js} +2 -2
  192. package/chunks/{dist-FLJLHASF.js → dist-EDHQIBYD.js} +7 -7
  193. package/chunks/{dist-S3BKCTWF.js → dist-GT64AAUR.js} +1 -1
  194. package/chunks/{dist-GPSRNVVP.js → dist-JVXT4VUJ.js} +2 -2
  195. package/chunks/{dist-LY66XNUL.js → dist-L6URO6CK.js} +3 -3
  196. package/chunks/{dist-5423MG3D.js → dist-LXFYIJNG.js} +734 -128
  197. package/chunks/{dist-SDKHGH5O.js → dist-PDGNRVPY.js} +4 -4
  198. package/chunks/{dist-WAUO5OMN.js → dist-QAF5DO3Y.js} +363 -73
  199. package/chunks/{dist-WIVVPE7M.js → dist-ZCJLKQSP.js} +1 -1
  200. package/chunks/{earlyInputCapture-INWJ2STR.js → earlyInputCapture-BBPCIVZG.js} +38 -42
  201. package/chunks/{edit-B7ZRRGAE.js → edit-SUGXY63Y.js} +26 -30
  202. package/chunks/{en-E4AYTX6H.js → en-2RATMNX7.js} +2 -0
  203. package/chunks/{enter-worktree-SPZHEETQ.js → enter-worktree-B6USKSIK.js} +5 -5
  204. package/chunks/{enterPlanMode-S554IKJ2.js → enterPlanMode-MDX4RVVL.js} +26 -30
  205. package/chunks/{environment-25ADH4Y6.js → environment-VN6RXDVN.js} +41 -45
  206. package/chunks/{errors-G2I6LFTW.js → errors-UEY36PIT.js} +40 -44
  207. package/chunks/{exit-worktree-AWUXAMAM.js → exit-worktree-DLQ73SJH.js} +8 -6
  208. package/chunks/{exitPlanMode-ZFH4OYPM.js → exitPlanMode-EPHIEDAA.js} +26 -30
  209. package/chunks/{fast-path-WZHVZ2ER.js → fast-path-Y73R42LV.js} +3 -3
  210. package/chunks/{fast-path-settings-NILM6QZL.js → fast-path-settings-MFUR3IWK.js} +3 -3
  211. package/chunks/{glob-UOVDMBUP.js → glob-DMGH7EZN.js} +27 -31
  212. package/chunks/goal-tools-3RF3PXCL.js +99 -0
  213. package/chunks/{grep-LHYJ5V2N.js → grep-AJVLCVXC.js} +2 -2
  214. package/chunks/{handleAutoUpdate-4MZ45DZY.js → handleAutoUpdate-HVWQT2AU.js} +42 -46
  215. package/chunks/{i18n-KWUEI4DS.js → i18n-5OR7NTRZ.js} +39 -43
  216. package/chunks/{image-gen-YZDVO5YS.js → image-gen-VOIDOHOB.js} +1 -1
  217. package/chunks/{initializer-2NBROGMG.js → initializer-JE5RQSOE.js} +46 -50
  218. package/chunks/{installationInfo-YKUSY3ZB.js → installationInfo-KO3CCSCK.js} +38 -42
  219. package/chunks/{list-W2WV3COM.js → list-3IORSFIY.js} +49 -53
  220. package/chunks/{list-agents-PMVMHNY7.js → list-agents-SBMONIUK.js} +3 -3
  221. package/chunks/{llm-NPPHLIJI.js → llm-K26SUDVK.js} +155 -99
  222. package/chunks/{llm-content-generator-YK3WN6XW.js → llm-content-generator-TT6EAUD4.js} +5 -6
  223. package/chunks/{loadedSettingsAdapter-2P7DFWUR.js → loadedSettingsAdapter-KLLFZF3M.js} +46 -50
  224. package/chunks/{loggingContentGenerator-QYYYGU6V.js → loggingContentGenerator-EYQBA4M4.js} +43 -47
  225. package/chunks/{loop-wakeup-EBM4F5MZ.js → loop-wakeup-QA6SHCZT.js} +2 -2
  226. package/chunks/{ls-F6TRX3DD.js → ls-HEJNCEYO.js} +1 -1
  227. package/chunks/{lsp-QYTOS2FI.js → lsp-WOQKNZP6.js} +1 -1
  228. package/chunks/{managed-npm-update-UMC4NBWW.js → managed-npm-update-HIJTODQT.js} +38 -42
  229. package/chunks/{mcp-OFI6XDP2.js → mcp-A2UEHETW.js} +46 -50
  230. package/chunks/{monitor-QX3BM3JY.js → monitor-DKNZQAB2.js} +28 -32
  231. package/chunks/{node-QKLNSZMX.js → node-UETAYMMO.js} +3 -3
  232. package/chunks/{nonInteractiveCli-NVRMD5MN.js → nonInteractiveCli-YA47F2F4.js} +86 -89
  233. package/chunks/{notebook-edit-AAILDPSV.js → notebook-edit-MGHTRL2D.js} +26 -30
  234. package/chunks/{openaiContentGenerator-53PB3CMN.js → openaiContentGenerator-ZJIEQ3ZJ.js} +15 -17
  235. package/chunks/{pidfile-5ACKG2LI.js → pidfile-ETHAZNMY.js} +38 -42
  236. package/chunks/{processUtils-2BCDO3DZ.js → processUtils-UY3SAJJZ.js} +2 -2
  237. package/chunks/{prompt-terminal-ledger-3RKW73A2.js → prompt-terminal-ledger-GZ747VYE.js} +39 -43
  238. package/chunks/{qwenContentGenerator-N4LLWDPH.js → qwenContentGenerator-VI4KATRY.js} +39 -43
  239. package/chunks/{read-file-DPAKXHYE.js → read-file-P7F4P7LV.js} +6 -8
  240. package/chunks/{read-mcp-resource-R4NO75DW.js → read-mcp-resource-GLAGB6R7.js} +1 -1
  241. package/chunks/{record-artifact-2EAYLAL5.js → record-artifact-SWVR7NSU.js} +3 -3
  242. package/chunks/renderer-selection-M4UN63VJ.js +99 -0
  243. package/chunks/{report-findings-Y4MSHDS3.js → report-findings-AL5YW3KI.js} +4 -4
  244. package/chunks/{request-shutdown-DWRMGTMB.js → request-shutdown-5YK4IZ54.js} +5 -5
  245. package/chunks/{resumeHistoryUtils-3JQORXAK.js → resumeHistoryUtils-DPZKFW24.js} +44 -48
  246. package/chunks/{ripGrep-AHF5QCI7.js → ripGrep-C7LJKUPZ.js} +9 -11
  247. package/chunks/{run-qwen-serve-3LKV7KDC.js → run-qwen-serve-OGTEEUR2.js} +132 -81
  248. package/chunks/{runtime-66F4W3IA.js → runtime-LNBLEMZS.js} +51 -55
  249. package/chunks/{scheduled-tasks-2NVKS5Q2.js → scheduled-tasks-FLDYZQOF.js} +44 -48
  250. package/chunks/{scheduler-JNV7T3ZO.js → scheduler-73YXGUGW.js} +40 -44
  251. package/chunks/{sdk-exporters-grpc-G5IT4XS4.js → sdk-exporters-grpc-MXTVSE3C.js} +2 -2
  252. package/chunks/{sdk-exporters-http-MFIWD23D.js → sdk-exporters-http-3JO5TJNU.js} +3 -3
  253. package/chunks/{sdk-impl-2RXJ4Q6X.js → sdk-impl-HZAUUTHJ.js} +5 -5
  254. package/chunks/{send-message-WPZRCJOB.js → send-message-JC7NJTY6.js} +7 -7
  255. package/chunks/{serve-GP2UNRP7.js → serve-3UR2H4CV.js} +46 -50
  256. package/chunks/{server-7W6C3SOW.js → server-AOYZVVOM.js} +1736 -502
  257. package/chunks/{session-PZLBAQGG.js → session-UAWFNFGI.js} +90 -93
  258. package/chunks/session-attachments-root-ZCGXQQTR.js +104 -0
  259. package/chunks/{session-pr-refresh-OIVL3U3Z.js → session-pr-refresh-CT2INROL.js} +131 -65
  260. package/chunks/{settings-ZOHIQWYK.js → settings-BHRGDASJ.js} +45 -49
  261. package/chunks/{shell-FWZT6IUR.js → shell-YHOGC7TO.js} +26 -30
  262. package/chunks/{skill-RTQC2YGA.js → skill-ZGBKNCHQ.js} +71 -49
  263. package/chunks/{skill-settings-AKMIXFSJ.js → skill-settings-AKSP665O.js} +45 -49
  264. package/chunks/{spawnChannel-ZP23JL6O.js → spawnChannel-N25MBB6F.js} +40 -44
  265. package/chunks/{standalone-update-P2Q5H4ZU.js → standalone-update-XGPWJDRN.js} +40 -44
  266. package/chunks/start-opentui-ui-FZ4USOU7.js +55342 -0
  267. package/chunks/{startInteractiveUI-NSA6QPQZ.js → startInteractiveUI-E2WQJUOA.js} +2920 -4542
  268. package/chunks/{syntheticOutput-5URSQLIS.js → syntheticOutput-HJNZSEHN.js} +2 -2
  269. package/chunks/{task-create-3EXVDG3G.js → task-create-6RSD54S5.js} +7 -7
  270. package/chunks/{task-list-PIBYNSE7.js → task-list-IQSACPOM.js} +31 -7
  271. package/chunks/{task-stop-IV3BYWJC.js → task-stop-HE2LRQNW.js} +1 -1
  272. package/chunks/{task-update-H5BPDS5Y.js → task-update-XAJ2NYOA.js} +7 -7
  273. package/chunks/{team-create-53T42W37.js → team-create-SOKMYSQU.js} +28 -32
  274. package/chunks/{team-delete-X3WPELS6.js → team-delete-NGNNKGMG.js} +1 -1
  275. package/chunks/{team-plan-approval-D45ZC5OE.js → team-plan-approval-U7ZWXYAY.js} +26 -30
  276. package/chunks/{terminal-image-renderer-FCRUWT6C.js → terminal-image-renderer-KKM4OBLO.js} +40 -44
  277. package/chunks/{theme-manager-MHNPEDP7.js → theme-manager-GQHF3A7T.js} +38 -42
  278. package/chunks/{todoWrite-A5IOZZ3P.js → todoWrite-5UTVUXHA.js} +36 -6
  279. package/chunks/{tool-search-6RPBGGUX.js → tool-search-IAI2RVWT.js} +10 -12
  280. package/chunks/{total-session-admission-MGV56XDK.js → total-session-admission-G4CGCSTG.js} +43 -47
  281. package/chunks/{trustedFolders-QJYEFMTU.js → trustedFolders-D2I3FDPB.js} +39 -43
  282. package/chunks/{update-relaunch-ZDMQX63C.js → update-relaunch-5RWKZAL3.js} +5 -5
  283. package/chunks/{updateCheck-4QZWCGP6.js → updateCheck-ZXOQDFEI.js} +42 -46
  284. package/chunks/{useAutoAcceptIndicator-DLIQN256.js → useAutoAcceptIndicator-6EK4QGAH.js} +49 -53
  285. package/chunks/{validateNonInterActiveAuth-HGTG7AEK.js → validateNonInterActiveAuth-QPFEKATS.js} +82 -86
  286. package/chunks/{version-CPAZMC4B.js → version-JKNG7YDH.js} +1 -1
  287. package/chunks/{web-fetch-N4K5M3M4.js → web-fetch-X3AHIIHW.js} +8 -11
  288. package/chunks/{web-search-4VZKM5SF.js → web-search-K2FMOGS5.js} +6 -7
  289. package/chunks/{web-shell-static-PW7OEDQO.js → web-shell-static-POZHGGXE.js} +4 -4
  290. package/chunks/{workflow-2ALQKTHG.js → workflow-TOLPAK5G.js} +38 -38
  291. package/chunks/{workspace-providers-status-5JM4CB6R.js → workspace-providers-status-PCJK3RC7.js} +50 -54
  292. package/chunks/{workspace-registration-store-RNMFVCH7.js → workspace-registration-store-KQWVVW4Y.js} +1 -1
  293. package/chunks/{workspace-registry-6EULAPZC.js → workspace-registry-YNIOB6HJ.js} +43 -47
  294. package/chunks/{workspace-runtime-coordinator-IRI2DRCJ.js → workspace-runtime-coordinator-WG2RNEN7.js} +43 -47
  295. package/chunks/{workspace-service-SETHN4WE.js → workspace-service-G4ZNBOFH.js} +51 -55
  296. package/chunks/{workspace-skills-status-4D4EUEQU.js → workspace-skills-status-FMTPPMWC.js} +47 -51
  297. package/chunks/{workspace-trust-reconciler-4LR3CDL4.js → workspace-trust-reconciler-IBDFQBQS.js} +53 -57
  298. package/chunks/wrapper-JH3IFHT2.js +35 -0
  299. package/chunks/{write-file-45GWPSOI.js → write-file-YTLFY2S5.js} +28 -32
  300. package/chunks/{zh-2BQ7P6OD.js → zh-25DF7OGK.js} +2 -0
  301. package/chunks/{zh-TW-UFXRZTXX.js → zh-TW-5EDMZVGK.js} +2 -0
  302. package/chunks/{zoom-image-K6IQUKRC.js → zoom-image-IFXSN74N.js} +6 -8
  303. package/cli.js +17 -13
  304. package/locales/en.js +3 -0
  305. package/locales/zh-TW.js +3 -0
  306. package/locales/zh.js +3 -0
  307. package/package.json +3 -3
  308. package/web-shell/assets/{abnfDiagram-VCTEODGH-C80OZcPP.js → abnfDiagram-VCTEODGH-Cxf7xE_Z.js} +1 -1
  309. package/web-shell/assets/{arc-AUqStYgf.js → arc-ESi1eNkE.js} +1 -1
  310. package/web-shell/assets/{architectureDiagram-5GKGNRK7-CQYOdYla.js → architectureDiagram-5GKGNRK7-D9l7-bDo.js} +1 -1
  311. package/web-shell/assets/{blockDiagram-NRAW4CY4-lYKlFysy.js → blockDiagram-NRAW4CY4-Bc8DEasw.js} +1 -1
  312. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BoS23iIp.js → c4Diagram-UCG6FXSJ-Dimb2Hmh.js} +1 -1
  313. package/web-shell/assets/channel-B7ohGDil.js +1 -0
  314. package/web-shell/assets/{chunk-2Q5K7J3B-DLLooL1E.js → chunk-2Q5K7J3B-jVDmOpAQ.js} +1 -1
  315. package/web-shell/assets/{chunk-5VM5RSS4-kPfJxScY.js → chunk-5VM5RSS4-DbG_SwdB.js} +1 -1
  316. package/web-shell/assets/{chunk-F27PBJKO-CVGFBqkD.js → chunk-F27PBJKO-QEc4cY1v.js} +1 -1
  317. package/web-shell/assets/{chunk-G27WJ6UU-CnM_kOVV.js → chunk-G27WJ6UU-iJ36lQ3X.js} +1 -1
  318. package/web-shell/assets/{chunk-JWPE2WC7-Cj-ajOkT.js → chunk-JWPE2WC7-DuArnVtF.js} +1 -1
  319. package/web-shell/assets/{chunk-LCL6LL3I-8L5c-wFo.js → chunk-LCL6LL3I-DxOf1zwL.js} +1 -1
  320. package/web-shell/assets/{chunk-POPQ4Y6H-DsXTxpvL.js → chunk-POPQ4Y6H-lVLu9Ild.js} +1 -1
  321. package/web-shell/assets/{chunk-SVP7TREG-DU5GE1_z.js → chunk-SVP7TREG-C6XYlIer.js} +1 -1
  322. package/web-shell/assets/{chunk-XXDRQBXY-D2IIWZKt.js → chunk-XXDRQBXY-CiG2j2Ji.js} +1 -1
  323. package/web-shell/assets/classDiagram-DTDB5LWJ-DdFpqpfD.js +1 -0
  324. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DdFpqpfD.js +1 -0
  325. package/web-shell/assets/{cose-bilkent-JH36ORCC-CF_txUJr.js → cose-bilkent-JH36ORCC-DGVHMMVm.js} +1 -1
  326. package/web-shell/assets/{cynefin-OW5HDTMX-DEZ-My-Z.js → cynefin-OW5HDTMX-D6cgpCnH.js} +1 -1
  327. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BV7EKUS6.js → cynefinDiagram-5FMLGOSQ-BKv4Z-UX.js} +1 -1
  328. package/web-shell/assets/{dagre-3AP2YEHR-JGIX0G4H.js → dagre-3AP2YEHR-B4ABMIG-.js} +1 -1
  329. package/web-shell/assets/{diagram-S7CK7UJ4-DdUY7q6A.js → diagram-S7CK7UJ4-DgCkp_Lm.js} +1 -1
  330. package/web-shell/assets/{diagram-UQ7AKVKN-fhzRZ19v.js → diagram-UQ7AKVKN-FG0FNokz.js} +1 -1
  331. package/web-shell/assets/{diagram-VSXAHHWV-BOgOex6q.js → diagram-VSXAHHWV-JgkP9qg-.js} +1 -1
  332. package/web-shell/assets/{diagram-VX7I27RA-C0NknIz6.js → diagram-VX7I27RA-ADh2x83l.js} +1 -1
  333. package/web-shell/assets/{diagram-Z3DM3KII-C__3mUBX.js → diagram-Z3DM3KII-yXqoYF1J.js} +1 -1
  334. package/web-shell/assets/{ebnfDiagram-PWID7BFC-BvPhqycH.js → ebnfDiagram-PWID7BFC-Duk83Ek_.js} +1 -1
  335. package/web-shell/assets/{erDiagram-SSCWMZ5O-BqzoNoL9.js → erDiagram-SSCWMZ5O-DMdvxySG.js} +1 -1
  336. package/web-shell/assets/{flowDiagram-A5DVABFB-CJKOre47.js → flowDiagram-A5DVABFB-DHjVgSji.js} +1 -1
  337. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-C5xZjrp0.js → ganttDiagram-EL5Y4UJY-DMM9DkCE.js} +1 -1
  338. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C0EjwuPK.js → gitGraphDiagram-WWUBYQGX-t_ug9vO8.js} +1 -1
  339. package/web-shell/assets/index-BGZRqbRo.css +36 -0
  340. package/web-shell/assets/index-DRri_6_x.js +2067 -0
  341. package/web-shell/assets/{index-C5M93syE.js → index-zqvnpGHv.js} +1 -1
  342. package/web-shell/assets/{infoDiagram-RXCK75RN-BUwzsYOs.js → infoDiagram-RXCK75RN-eT1fANNm.js} +1 -1
  343. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-EDJ_DH3V.js → ishikawaDiagram-5VMMS53U-k3evzZNn.js} +1 -1
  344. package/web-shell/assets/{journeyDiagram-EYS64GPL-BnfcOsS0.js → journeyDiagram-EYS64GPL-CGim3EAi.js} +1 -1
  345. package/web-shell/assets/{kanban-definition-3QL26DDD-D_ofTVGu.js → kanban-definition-3QL26DDD-WHfJo-22.js} +1 -1
  346. package/web-shell/assets/{layout-CBuQFdfZ.js → layout-DkqIaFlJ.js} +1 -1
  347. package/web-shell/assets/{linear-DRIHtmGv.js → linear-Bdkd3mCz.js} +1 -1
  348. package/web-shell/assets/{mermaid.core-CmR5wZH6.js → mermaid.core-CGw0LkT_.js} +6 -6
  349. package/web-shell/assets/{mindmap-definition-FBJOCRG2-BV374olC.js → mindmap-definition-FBJOCRG2-C9V4rBvo.js} +1 -1
  350. package/web-shell/assets/{pegDiagram-XKGWAZYB-Bpy1SplK.js → pegDiagram-XKGWAZYB-CwoI2T5G.js} +1 -1
  351. package/web-shell/assets/{pieDiagram-E7YTZNPT-CeZx4hR2.js → pieDiagram-E7YTZNPT-DaTmBmPG.js} +1 -1
  352. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-COYKs14h.js → quadrantDiagram-AXDQQJYC-plh6MyGI.js} +1 -1
  353. package/web-shell/assets/{railroadDiagram-O6MQD6OU-5g2pOeTs.js → railroadDiagram-O6MQD6OU-D_b-S0iK.js} +1 -1
  354. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-Yn8uPGtF.js → requirementDiagram-EFPCY7ZU-zUzTN7VE.js} +1 -1
  355. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CTayAGq6.js → sankeyDiagram-P5KCCOFB-m6AhoD0l.js} +1 -1
  356. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BFWDKzUU.js → sequenceDiagram-WJ2MYXX4-Cwhzsine.js} +1 -1
  357. package/web-shell/assets/{sizeCapture-X5ZJPWSS-CtErUbj4.js → sizeCapture-X5ZJPWSS-CcZuKIae.js} +1 -1
  358. package/web-shell/assets/{stateDiagram-HBIQ2CUA-Co3HFzOd.js → stateDiagram-HBIQ2CUA-CFoiJwD_.js} +1 -1
  359. package/web-shell/assets/stateDiagram-v2-4QOOHH4V--H8HdEmk.js +1 -0
  360. package/web-shell/assets/{swimlanes-XN3QIQJK-CDZuxzOj.js → swimlanes-XN3QIQJK-CgS9hcaV.js} +1 -1
  361. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ShE9OIgf.js +8 -0
  362. package/web-shell/assets/{timeline-definition-24CTP7MA-UcNHj8At.js → timeline-definition-24CTP7MA-Dzzc05t9.js} +1 -1
  363. package/web-shell/assets/{vennDiagram-4TSXK5OY-JKR9pVFG.js → vennDiagram-4TSXK5OY-DemK0f7Y.js} +1 -1
  364. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C4SU-yIW.js → wardleyDiagram-VM6X3IG4-CquLxtMr.js} +1 -1
  365. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-D_yoWGZ4.js → xychartDiagram-S5SC5T6Z-BTBKTM5g.js} +1 -1
  366. package/web-shell/index.html +2 -2
  367. package/chunks/chunk-4P7PPAHN.js +0 -3097
  368. package/chunks/chunk-7J6OTNGO.js +0 -424
  369. package/chunks/chunk-LMMHS3RS.js +0 -135
  370. package/chunks/chunk-MZYWNU66.js +0 -149
  371. package/chunks/chunk-T4EFG2P5.js +0 -113
  372. package/chunks/chunk-XZA32HII.js +0 -19
  373. package/chunks/goal-tools-7TNK5ZHC.js +0 -411
  374. package/web-shell/assets/channel-B0ovOJeK.js +0 -1
  375. package/web-shell/assets/classDiagram-DTDB5LWJ-DMll2-6_.js +0 -1
  376. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DMll2-6_.js +0 -1
  377. package/web-shell/assets/index-B_IPzA0h.js +0 -2020
  378. package/web-shell/assets/index-D1OKGQlM.css +0 -36
  379. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C3gdRjPm.js +0 -1
  380. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-C34TGCPZ.js +0 -8
  381. /package/chunks/{chunk-FOGQO4FG.js → chunk-JA5CBKRP.js} +0 -0
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-OCPBI7J5.js";
20
20
  import {
21
21
  defaultSpawnChannelFactory
22
- } from "./chunk-JMRE4WJQ.js";
22
+ } from "./chunk-4HVH57J3.js";
23
23
  import {
24
24
  BridgeChannelClosedError,
25
25
  BridgeTimeoutError,
@@ -29,7 +29,7 @@ import {
29
29
  SessionRestoreTimeoutError,
30
30
  createIdleWorkspaceExtensionsStatus,
31
31
  createIdleWorkspaceHooksStatus
32
- } from "./chunk-J4Y3QJHF.js";
32
+ } from "./chunk-64QH2UC6.js";
33
33
  import {
34
34
  ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
35
35
  ACTIVE_WORK_CLOSE_TIMEOUT_MS,
@@ -83,6 +83,7 @@ import {
83
83
  InvalidRewindTargetError,
84
84
  InvalidSessionMetadataError,
85
85
  InvalidSessionScopeError,
86
+ McpAuthenticationInProgressError,
86
87
  PermissionForbiddenError,
87
88
  PromptDeadlineExceededError,
88
89
  PromptQueueFullError,
@@ -95,7 +96,7 @@ import {
95
96
  StandaloneSessionSpawnError,
96
97
  WorkspaceMismatchError,
97
98
  isNotCurrentlyGeneratingCancelError
98
- } from "./chunk-YPISTYEI.js";
99
+ } from "./chunk-F47DITLZ.js";
99
100
  import {
100
101
  canonicalizeWorkspace,
101
102
  translateAndCheckAbsoluteWorkspacePath
@@ -127,7 +128,7 @@ import {
127
128
  isOfficeDocumentExtension,
128
129
  isRecordableDerivedChild,
129
130
  pathHasSkippedDirectoryComponent
130
- } from "./chunk-W4BDHLRT.js";
131
+ } from "./chunk-IG4W5SJR.js";
131
132
  import {
132
133
  SESSION_PR_LIST_LIMIT,
133
134
  SESSION_PR_URL_MAX_LENGTH,
@@ -137,8 +138,9 @@ import {
137
138
  TURN_RESULT_TEXT_MAX_CHARS,
138
139
  TrustGateError,
139
140
  canonicalSessionPrUrl,
140
- normalizeTurnResultError
141
- } from "./chunk-ZBDYI7VM.js";
141
+ normalizeTurnResultError,
142
+ toSessionPrInfo
143
+ } from "./chunk-4F7GQGXB.js";
142
144
  import {
143
145
  isUnverifiableIdentityError,
144
146
  openNoFollow
@@ -155,22 +157,22 @@ import {
155
157
  metadataBudgetBytes,
156
158
  normalizeSnapshotPayload,
157
159
  stableSessionArtifactId
158
- } from "./chunk-DJBQCO2E.js";
160
+ } from "./chunk-EFTPIZIC.js";
159
161
  import {
160
162
  APPROVAL_MODES
161
163
  } from "./chunk-JX6XHPTX.js";
162
164
  import {
163
165
  DAEMON_TRACEPARENT_META_KEY,
164
166
  DAEMON_TRACESTATE_META_KEY
165
- } from "./chunk-UXEW7TQS.js";
167
+ } from "./chunk-LB3WQQJK.js";
166
168
  import {
167
169
  INVOCATION_CONTEXT_META_KEY,
168
170
  PRIVATE_ACP_CAPABILITY_ENV,
169
171
  PRIVATE_PARENT_CAPABILITY_META_KEY
170
- } from "./chunk-FXUSWLBF.js";
172
+ } from "./chunk-GH2S4GD5.js";
171
173
  import {
172
174
  getSpecificMimeType
173
- } from "./chunk-67AY5D3M.js";
175
+ } from "./chunk-DYTW3QVG.js";
174
176
  import {
175
177
  init_esbuild_shims
176
178
  } from "./chunk-5O2XNYP6.js";
@@ -1616,6 +1618,23 @@ function isTextAttachment(data, mimeType) {
1616
1618
  return Buffer.from(data.toString("utf8"), "utf8").equals(data);
1617
1619
  }
1618
1620
  __name(isTextAttachment, "isTextAttachment");
1621
+ function statSize(filePath) {
1622
+ try {
1623
+ return statSync(filePath).size;
1624
+ } catch {
1625
+ return void 0;
1626
+ }
1627
+ }
1628
+ __name(statSize, "statSize");
1629
+ function statSizeStrict(filePath) {
1630
+ try {
1631
+ return statSync(filePath).size;
1632
+ } catch (error) {
1633
+ if (error.code === "ENOENT") return void 0;
1634
+ throw error;
1635
+ }
1636
+ }
1637
+ __name(statSizeStrict, "statSizeStrict");
1619
1638
  function withAttachmentDegradationMarker(blocks) {
1620
1639
  for (let i = blocks.length - 1; i >= 0; i--) {
1621
1640
  const block = blocks[i];
@@ -1639,22 +1658,30 @@ ${SESSION_ATTACHMENT_UNAVAILABLE_TEXT}`
1639
1658
  }
1640
1659
  __name(withAttachmentDegradationMarker, "withAttachmentDegradationMarker");
1641
1660
  var SessionAttachmentStore = class {
1642
- constructor(directoryRoot, sessionId) {
1661
+ constructor(directoryRoot, sessionId, fallbackDirectoryRoot) {
1643
1662
  this.directoryRoot = directoryRoot;
1644
1663
  if (!directoryRoot || !sessionId) return;
1645
1664
  this.persistentDirectory = path.join(
1646
1665
  directoryRoot,
1647
1666
  `session-${encodeURIComponent(sessionId)}`
1648
1667
  );
1668
+ if (fallbackDirectoryRoot) {
1669
+ this.persistentFallbackDirectory = path.join(
1670
+ fallbackDirectoryRoot,
1671
+ `session-${encodeURIComponent(sessionId)}`
1672
+ );
1673
+ }
1649
1674
  }
1650
1675
  static {
1651
1676
  __name(this, "SessionAttachmentStore");
1652
1677
  }
1653
1678
  directoryPromise;
1654
1679
  persistentDirectory;
1680
+ persistentFallbackDirectory;
1655
1681
  activeDirectory;
1656
1682
  pendingItems = 0;
1657
1683
  pendingNames = /* @__PURE__ */ new Map();
1684
+ removingNames = /* @__PURE__ */ new Set();
1658
1685
  pendingDrainWaiters = [];
1659
1686
  copyDrainWaiters = [];
1660
1687
  copying = false;
@@ -1694,6 +1721,16 @@ var SessionAttachmentStore = class {
1694
1721
  if (safeAttachmentName(candidateName) !== candidateName) {
1695
1722
  throw new TypeError("Session attachment name is invalid");
1696
1723
  }
1724
+ if (this.removingNames.has(candidateName)) {
1725
+ suffix += 1;
1726
+ continue;
1727
+ }
1728
+ if (this.persistentFallbackDirectory && statSizeStrict(
1729
+ path.join(this.persistentFallbackDirectory, candidateName)
1730
+ ) !== void 0) {
1731
+ suffix += 1;
1732
+ continue;
1733
+ }
1697
1734
  if (pendingName !== candidateName) {
1698
1735
  if (pendingName) this.releasePendingName(pendingName);
1699
1736
  this.reservePendingName(candidateName);
@@ -1826,16 +1863,25 @@ var SessionAttachmentStore = class {
1826
1863
  async read(attachmentId) {
1827
1864
  const name = safeAttachmentName(attachmentId);
1828
1865
  if (!name || name !== attachmentId) return void 0;
1829
- const filePath = path.join(await this.directory(), name);
1866
+ let primary;
1867
+ try {
1868
+ primary = await this.tryRead(await this.peekDirectory(), name);
1869
+ } catch (error) {
1870
+ if (!this.persistentFallbackDirectory) throw error;
1871
+ primary = void 0;
1872
+ }
1873
+ if (primary) return primary;
1874
+ return await this.tryRead(this.persistentFallbackDirectory, name);
1875
+ }
1876
+ async tryRead(directory, name) {
1877
+ if (!directory) return void 0;
1830
1878
  try {
1831
1879
  return {
1832
- data: await fs.readFile(filePath),
1880
+ data: await fs.readFile(path.join(directory, name)),
1833
1881
  mimeType: mimeTypeForName(name)
1834
1882
  };
1835
1883
  } catch (error) {
1836
- if (error.code === "ENOENT") {
1837
- return void 0;
1838
- }
1884
+ if (error.code === "ENOENT") return void 0;
1839
1885
  throw error;
1840
1886
  }
1841
1887
  }
@@ -1865,40 +1911,54 @@ var SessionAttachmentStore = class {
1865
1911
  );
1866
1912
  }
1867
1913
  if (this.closed) throw new Error("Session attachment store is closed");
1868
- const sourceDirectory = source.persistentDirectory ?? source.activeDirectory;
1869
- if (!sourceDirectory) return;
1870
- let entries;
1871
- try {
1872
- entries = await fs.readdir(sourceDirectory, { withFileTypes: true });
1873
- } catch (error) {
1874
- if (error.code === "ENOENT") return;
1875
- throw error;
1876
- }
1914
+ const sourceDirectories = [
1915
+ source.persistentDirectory ?? source.activeDirectory,
1916
+ source.persistentFallbackDirectory
1917
+ ].filter((directory) => Boolean(directory));
1918
+ if (sourceDirectories.length === 0) return;
1877
1919
  const targetDirectory = await this.directory();
1878
- await Promise.all(
1879
- entries.filter(
1880
- (entry) => entry.isFile() && !source.pendingNames.has(entry.name)
1881
- ).map(async (entry) => {
1882
- const sourcePath = path.join(sourceDirectory, entry.name);
1883
- try {
1884
- await fs.copyFile(
1885
- sourcePath,
1886
- path.join(targetDirectory, entry.name)
1887
- );
1888
- } catch (error) {
1889
- if (error.code === "ENOENT") {
1890
- try {
1891
- await fs.stat(sourcePath);
1892
- } catch (sourceError) {
1893
- if (sourceError.code === "ENOENT") {
1894
- return;
1920
+ const copiedNames = /* @__PURE__ */ new Set();
1921
+ let sourceDirectoryRead = false;
1922
+ let sourceDirectoryError;
1923
+ for (const sourceDirectory of sourceDirectories) {
1924
+ let entries;
1925
+ try {
1926
+ entries = await fs.readdir(sourceDirectory, { withFileTypes: true });
1927
+ } catch (error) {
1928
+ if (error.code === "ENOENT") continue;
1929
+ sourceDirectoryError ??= error;
1930
+ continue;
1931
+ }
1932
+ sourceDirectoryRead = true;
1933
+ await Promise.all(
1934
+ entries.filter(
1935
+ (entry) => entry.isFile() && !source.pendingNames.has(entry.name) && !source.removingNames.has(entry.name) && !copiedNames.has(entry.name)
1936
+ ).map(async (entry) => {
1937
+ const sourcePath = path.join(sourceDirectory, entry.name);
1938
+ try {
1939
+ await fs.copyFile(
1940
+ sourcePath,
1941
+ path.join(targetDirectory, entry.name)
1942
+ );
1943
+ copiedNames.add(entry.name);
1944
+ } catch (error) {
1945
+ if (error.code === "ENOENT") {
1946
+ try {
1947
+ await fs.stat(sourcePath);
1948
+ } catch (sourceError) {
1949
+ if (sourceError.code === "ENOENT") {
1950
+ return;
1951
+ }
1895
1952
  }
1896
1953
  }
1954
+ throw error;
1897
1955
  }
1898
- throw error;
1899
- }
1900
- })
1901
- );
1956
+ })
1957
+ );
1958
+ }
1959
+ if (!sourceDirectoryRead && sourceDirectoryError !== void 0) {
1960
+ throw sourceDirectoryError;
1961
+ }
1902
1962
  } finally {
1903
1963
  source.copying = false;
1904
1964
  this.copying = false;
@@ -1908,18 +1968,40 @@ var SessionAttachmentStore = class {
1908
1968
  }
1909
1969
  async remove(attachmentId) {
1910
1970
  const name = safeAttachmentName(attachmentId);
1911
- if (!name || name !== attachmentId || this.copying || this.pendingNames.has(name)) {
1971
+ if (!name || name !== attachmentId || this.copying || this.pendingNames.has(name) || this.removingNames.has(name)) {
1912
1972
  return false;
1913
1973
  }
1914
- const directory = await this.directory();
1915
- const filePath = path.join(directory, name);
1974
+ this.removingNames.add(name);
1975
+ try {
1976
+ const primaryDirectory = await this.peekDirectory();
1977
+ const [fallbackExists, primaryExists] = await Promise.all([
1978
+ this.hasAttachment(this.persistentFallbackDirectory, name),
1979
+ this.hasAttachment(primaryDirectory, name)
1980
+ ]);
1981
+ const fallbackHit = fallbackExists && await this.tryUnlink(this.persistentFallbackDirectory, name) === true;
1982
+ const primaryHit = primaryExists && await this.tryUnlink(primaryDirectory, name) === true;
1983
+ return primaryHit || fallbackHit;
1984
+ } finally {
1985
+ this.removingNames.delete(name);
1986
+ }
1987
+ }
1988
+ async hasAttachment(directory, name) {
1989
+ if (!directory) return false;
1916
1990
  try {
1917
- await fs.unlink(filePath);
1991
+ await fs.stat(path.join(directory, name));
1918
1992
  return true;
1919
1993
  } catch (error) {
1920
- if (error.code === "ENOENT") {
1921
- return false;
1922
- }
1994
+ if (error.code === "ENOENT") return false;
1995
+ throw error;
1996
+ }
1997
+ }
1998
+ async tryUnlink(directory, name) {
1999
+ if (!directory) return void 0;
2000
+ try {
2001
+ await fs.unlink(path.join(directory, name));
2002
+ return true;
2003
+ } catch (error) {
2004
+ if (error.code === "ENOENT") return void 0;
1923
2005
  throw error;
1924
2006
  }
1925
2007
  }
@@ -1947,62 +2029,83 @@ var SessionAttachmentStore = class {
1947
2029
  this.pendingNames.clear();
1948
2030
  this.resolvePendingDrainWaiters();
1949
2031
  }
2032
+ let fallbackError;
2033
+ if (this.persistentFallbackDirectory) {
2034
+ try {
2035
+ await this.removeDirectoryDurably(
2036
+ this.persistentFallbackDirectory,
2037
+ options.assertCanCommit
2038
+ );
2039
+ } catch (error) {
2040
+ fallbackError = error;
2041
+ }
2042
+ }
1950
2043
  const directory = this.persistentDirectory ?? await this.directoryPromise?.catch(() => void 0);
1951
2044
  if (directory) {
1952
- options.assertCanCommit?.();
1953
- const parent = await openDurableAttachmentDirectoryIfPresent(
1954
- path.dirname(directory)
1955
- );
1956
- if (!parent) return;
1957
- const tombstone = path.join(
1958
- path.dirname(directory),
1959
- `.${path.basename(directory)}.deleting`
1960
- );
2045
+ await this.removeDirectoryDurably(directory, options.assertCanCommit);
2046
+ }
2047
+ if (fallbackError !== void 0) throw fallbackError;
2048
+ }
2049
+ /**
2050
+ * Delete `directory` through a fixed-name tombstone while holding an open
2051
+ * handle to its parent, re-checking the parent's identity and syncing it
2052
+ * after each mutation. The FIXED tombstone name lets a deletion interrupted
2053
+ * between the rename and the removal resume on the next call instead of
2054
+ * leaking the tombstone, and a successor directory recreated at the
2055
+ * original path after the rename is never swept up by the removal.
2056
+ */
2057
+ async removeDirectoryDurably(directory, assertCanCommit) {
2058
+ assertCanCommit?.();
2059
+ const parent = await openDurableAttachmentDirectoryIfPresent(
2060
+ path.dirname(directory)
2061
+ );
2062
+ if (!parent) return;
2063
+ const tombstone = path.join(
2064
+ path.dirname(directory),
2065
+ `.${path.basename(directory)}.deleting`
2066
+ );
2067
+ try {
2068
+ assertCanCommit?.();
2069
+ let tombstoneExists = false;
2070
+ try {
2071
+ const stats = await fs.lstat(tombstone);
2072
+ if (!stats.isDirectory() || stats.isSymbolicLink()) {
2073
+ throw new Error("Session attachment tombstone is not a directory.");
2074
+ }
2075
+ tombstoneExists = true;
2076
+ } catch (error) {
2077
+ if (error.code !== "ENOENT") throw error;
2078
+ }
2079
+ if (tombstoneExists) {
2080
+ assertCanCommit?.();
2081
+ await fs.rm(tombstone, { recursive: true, force: true });
2082
+ await syncDurableAttachmentDirectory(parent);
2083
+ return;
2084
+ }
2085
+ assertCanCommit?.();
1961
2086
  try {
1962
- options.assertCanCommit?.();
1963
- let tombstoneExists = false;
2087
+ await fs.rename(directory, tombstone);
2088
+ } catch (error) {
2089
+ if (error.code !== "ENOENT") throw error;
1964
2090
  try {
1965
2091
  const stats = await fs.lstat(tombstone);
1966
2092
  if (!stats.isDirectory() || stats.isSymbolicLink()) {
1967
2093
  throw new Error("Session attachment tombstone is not a directory.");
1968
2094
  }
1969
- tombstoneExists = true;
1970
- } catch (error) {
1971
- if (error.code !== "ENOENT") throw error;
1972
- }
1973
- if (tombstoneExists) {
1974
- options.assertCanCommit?.();
2095
+ assertCanCommit?.();
1975
2096
  await fs.rm(tombstone, { recursive: true, force: true });
1976
- await syncDurableAttachmentDirectory(parent);
1977
- return;
1978
- }
1979
- options.assertCanCommit?.();
1980
- try {
1981
- await fs.rename(directory, tombstone);
1982
- } catch (error) {
1983
- if (error.code !== "ENOENT") throw error;
1984
- try {
1985
- const stats = await fs.lstat(tombstone);
1986
- if (!stats.isDirectory() || stats.isSymbolicLink()) {
1987
- throw new Error(
1988
- "Session attachment tombstone is not a directory."
1989
- );
1990
- }
1991
- options.assertCanCommit?.();
1992
- await fs.rm(tombstone, { recursive: true, force: true });
1993
- } catch (tombstoneError) {
1994
- if (tombstoneError.code !== "ENOENT") {
1995
- throw tombstoneError;
1996
- }
2097
+ } catch (tombstoneError) {
2098
+ if (tombstoneError.code !== "ENOENT") {
2099
+ throw tombstoneError;
1997
2100
  }
1998
- await syncDurableAttachmentDirectory(parent);
1999
- return;
2000
2101
  }
2001
- await fs.rm(tombstone, { recursive: true, force: true });
2002
2102
  await syncDurableAttachmentDirectory(parent);
2003
- } finally {
2004
- await parent.handle.close().catch(() => void 0);
2103
+ return;
2005
2104
  }
2105
+ await fs.rm(tombstone, { recursive: true, force: true });
2106
+ await syncDurableAttachmentDirectory(parent);
2107
+ } finally {
2108
+ await parent.handle.close().catch(() => void 0);
2006
2109
  }
2007
2110
  }
2008
2111
  assertStored(reference) {
@@ -2011,10 +2114,9 @@ var SessionAttachmentStore = class {
2011
2114
  let size;
2012
2115
  const directory = this.persistentDirectory ?? this.activeDirectory;
2013
2116
  if (name && name === id && directory) {
2014
- try {
2015
- size = statSync(path.join(directory, name)).size;
2016
- } catch {
2017
- size = void 0;
2117
+ size = statSize(path.join(directory, name));
2118
+ if (size === void 0 && this.persistentFallbackDirectory) {
2119
+ size = statSize(path.join(this.persistentFallbackDirectory, name));
2018
2120
  }
2019
2121
  }
2020
2122
  const storedMimeType = name ? mimeTypeForName(name) : void 0;
@@ -2071,6 +2173,13 @@ var SessionAttachmentStore = class {
2071
2173
  mimeType: attachment.mimeType
2072
2174
  };
2073
2175
  }
2176
+ // The storage directory without forcing creation: reads and removes must
2177
+ // degrade to the fallback when the configured root is unavailable, not
2178
+ // fail on a forced mkdir of a degraded volume.
2179
+ async peekDirectory() {
2180
+ const established = await this.directoryPromise?.catch(() => void 0);
2181
+ return established ?? this.persistentDirectory;
2182
+ }
2074
2183
  async directory() {
2075
2184
  if (!this.directoryPromise) {
2076
2185
  const pending = this.persistentDirectory ? fs.mkdir(this.persistentDirectory, {
@@ -4058,7 +4167,9 @@ var BridgeClient = class {
4058
4167
  * `qwen/notify/session/recording-degraded`,
4059
4168
  * `qwen/notify/session/prompt-suggestion` (followup assist),
4060
4169
  * `qwen/notify/session/artifact-event` (hook artifacts),
4061
- * `qwen/notify/session/terminal-sequence`, and
4170
+ * `qwen/notify/session/terminal-sequence`,
4171
+ * `qwen/notify/session/pr-binding` (shell-detected `gh pr create`
4172
+ * bindings — catalog mark only, the child persists the sidecar), and
4062
4173
  * `_qwencode/end_turn` (background-notification and goal turns), and
4063
4174
  * `qwen/notify/session/mcp-budget-event` — each translated into a
4064
4175
  * session-scoped SSE frame. Unknown methods are dropped silently for
@@ -4236,6 +4347,28 @@ var BridgeClient = class {
4236
4347
  }
4237
4348
  return;
4238
4349
  }
4350
+ if (method === "qwen/notify/session/pr-binding") {
4351
+ const sessionId2 = params["sessionId"];
4352
+ const pr = params["pr"];
4353
+ if (params["v"] !== 1 || typeof sessionId2 !== "string" || sessionId2.length === 0 || pr === null || typeof pr !== "object" || Array.isArray(pr)) {
4354
+ return;
4355
+ }
4356
+ const record = pr;
4357
+ const number = record["number"];
4358
+ const url = record["url"];
4359
+ if (typeof number !== "number" || !Number.isInteger(number) || number <= 0 || typeof url !== "string" || url.length === 0 || url.length > SESSION_PR_URL_MAX_LENGTH || !/^https?:\/\//i.test(url) || // Mirrors the bridge's hasControlCharacter: the url lands in an
4360
+ // audit line, so control characters would forge log lines.
4361
+ Array.from(url).some((character) => {
4362
+ const code = character.charCodeAt(0);
4363
+ return code <= 31 || code === 127;
4364
+ })) {
4365
+ return;
4366
+ }
4367
+ const entry = this.resolveEntry(sessionId2);
4368
+ if (!entry || !this.ownsSession(sessionId2)) return;
4369
+ this.onSessionCatalogChanged?.();
4370
+ return;
4371
+ }
4239
4372
  if (method === "qwen/notify/session/recording-degraded") {
4240
4373
  const sessionId2 = params["sessionId"];
4241
4374
  if (params["v"] !== 1 || typeof sessionId2 !== "string" || sessionId2.length === 0 || params["reason"] !== "write_failed") {
@@ -7607,6 +7740,25 @@ function safeTransportFailureCode(error) {
7607
7740
  return typeof code === "string" && /^[a-z0-9_.-]{1,64}$/iu.test(code) ? code : void 0;
7608
7741
  }
7609
7742
  __name(safeTransportFailureCode, "safeTransportFailureCode");
7743
+ function safeTransportFailureDetail(error) {
7744
+ if (!isRecord3(error) || error["code"] !== "ndjson_queue_limit_exceeded") {
7745
+ return void 0;
7746
+ }
7747
+ const queueError = error;
7748
+ const budget = typeof queueError.budget === "string" && /^[a-z0-9_.-]{1,64}$/iu.test(queueError.budget) ? queueError.budget : "unknown";
7749
+ const numbers = [];
7750
+ for (const value of [
7751
+ queueError.requiredBytes,
7752
+ queueError.availableBytes,
7753
+ queueError.maxQueuedBytes
7754
+ ]) {
7755
+ numbers.push(
7756
+ typeof value === "number" && Number.isFinite(value) ? String(Math.max(0, Math.floor(value))) : "?"
7757
+ );
7758
+ }
7759
+ return `${budget}:required=${numbers[0]}:available=${numbers[1]}:cap=${numbers[2]}`;
7760
+ }
7761
+ __name(safeTransportFailureDetail, "safeTransportFailureDetail");
7610
7762
  function sessionSourceRequestMeta(sourceType, sourceId, daemonOwnedStandaloneCreation = false) {
7611
7763
  return sourceType ? {
7612
7764
  [SESSION_SOURCE_META_KEY]: {
@@ -9371,9 +9523,7 @@ function createAcpSessionBridge(opts) {
9371
9523
  });
9372
9524
  }
9373
9525
  __name(reapPendingEmptyChannel, "reapPendingEmptyChannel");
9374
- async function withWorkspaceControl(ci, fn, statusRead = false) {
9375
- const preservePreheat = statusRead && ci.preserveForFirstStatusRead && resolvedChannelIdleTimeoutMs() <= 0;
9376
- ci.preserveForFirstStatusRead = false;
9526
+ async function withWorkspaceControl(ci, fn) {
9377
9527
  if (liveChannelInfo() === ci) cancelIdleTimer();
9378
9528
  ci.workspaceControlInFlight++;
9379
9529
  try {
@@ -9387,7 +9537,7 @@ function createAcpSessionBridge(opts) {
9387
9537
  ci.workspaceControlInFlight - 1
9388
9538
  );
9389
9539
  await reapPendingEmptyChannel(ci);
9390
- if (!preservePreheat && !ci.isDying && liveChannelInfo() === ci && hasNoChannelWork(ci)) {
9540
+ if (!ci.isDying && liveChannelInfo() === ci && hasNoChannelWork(ci)) {
9391
9541
  await startIdleTimer(ci, "workspace control");
9392
9542
  }
9393
9543
  }
@@ -9404,7 +9554,7 @@ function createAcpSessionBridge(opts) {
9404
9554
  }
9405
9555
  __name(withEnsuredWorkspaceControl, "withEnsuredWorkspaceControl");
9406
9556
  function withWorkspaceStatusRead(ci, fn) {
9407
- return withWorkspaceControl(ci, fn, true);
9557
+ return withWorkspaceControl(ci, fn);
9408
9558
  }
9409
9559
  __name(withWorkspaceStatusRead, "withWorkspaceStatusRead");
9410
9560
  function startSessionReaper() {
@@ -9859,11 +10009,11 @@ function createAcpSessionBridge(opts) {
9859
10009
  pendingRestoreIds: /* @__PURE__ */ new Set(),
9860
10010
  sessionSpawnsInFlight: 0,
9861
10011
  workspaceControlInFlight: 0,
9862
- preserveForFirstStatusRead: false,
9863
10012
  workspaceMcpDiscoveryInFlight: false,
9864
10013
  workspaceMcpDiscoveryRequested: false,
9865
10014
  workspaceMcpAuthenticationServerNames: /* @__PURE__ */ new Set(),
9866
10015
  workspaceMcpAuthenticationTimers: /* @__PURE__ */ new Map(),
10016
+ workspaceMcpAuthenticationReleases: /* @__PURE__ */ new Map(),
9867
10017
  retireWhenSessionsDrain: false,
9868
10018
  emptyReapPending: false,
9869
10019
  unsettledAbandonedRestores: /* @__PURE__ */ new Set(),
@@ -9886,6 +10036,7 @@ function createAcpSessionBridge(opts) {
9886
10036
  }
9887
10037
  info.transportFailed = true;
9888
10038
  info.transportFailureCode = safeTransportFailureCode(error);
10039
+ info.transportFailureDetail = safeTransportFailureDetail(error);
9889
10040
  info.isDying = true;
9890
10041
  info.channelLiveness?.stop();
9891
10042
  clearInFlightExtensionRefreshes(info.connection);
@@ -9913,6 +10064,10 @@ function createAcpSessionBridge(opts) {
9913
10064
  }
9914
10065
  info.workspaceMcpAuthenticationTimers.clear();
9915
10066
  info.workspaceMcpAuthenticationServerNames.clear();
10067
+ for (const release of info.workspaceMcpAuthenticationReleases.values()) {
10068
+ release();
10069
+ }
10070
+ info.workspaceMcpAuthenticationReleases.clear();
9916
10071
  for (const timer of info.restoreSettlementTimers.values()) {
9917
10072
  clearTimeout(timer);
9918
10073
  }
@@ -9938,10 +10093,13 @@ function createAcpSessionBridge(opts) {
9938
10093
  ...info.transportFailureCode ? {
9939
10094
  "qwen-code.daemon.channel.transport_error_code": info.transportFailureCode
9940
10095
  } : {},
10096
+ ...info.transportFailureDetail ? {
10097
+ "qwen-code.daemon.channel.transport_error_detail": info.transportFailureDetail
10098
+ } : {},
9941
10099
  ...exitInfo?.signalCode ? { "qwen-code.daemon.channel.signal": exitInfo.signalCode } : {}
9942
10100
  });
9943
10101
  writeStderrLine(
9944
- `qwen serve: channel exited (code=${exitInfo?.exitCode ?? "none"}, signal=${exitInfo?.signalCode ?? "none"}, transport=${info.transportFailed ? info.transportFailureCode ?? "failed" : "ok"}, ${sessions.length} session(s) torn down)`
10102
+ `qwen serve: channel exited (code=${exitInfo?.exitCode ?? "none"}, signal=${exitInfo?.signalCode ?? "none"}, transport=${info.transportFailed ? info.transportFailureCode ?? "failed" : "ok"}${info.transportFailureDetail ? `, transport_detail=${info.transportFailureDetail}` : ""}, ${sessions.length} session(s) torn down)`
9945
10103
  );
9946
10104
  }
9947
10105
  for (const sid of sessions) {
@@ -10318,7 +10476,6 @@ function createAcpSessionBridge(opts) {
10318
10476
  if (ci.isDying) {
10319
10477
  throw new BridgeChannelClosedError("before newSession");
10320
10478
  }
10321
- ci.preserveForFirstStatusRead = false;
10322
10479
  ci.sessionSpawnsInFlight++;
10323
10480
  if (requestedSessionId !== void 0) {
10324
10481
  ci.client.markSessionRegistrationInFlight(requestedSessionId);
@@ -10525,14 +10682,17 @@ function createAcpSessionBridge(opts) {
10525
10682
  daemonOwnedStandaloneCreation
10526
10683
  );
10527
10684
  }
10685
+ let modelApplied;
10528
10686
  if (modelServiceId) {
10529
- await applyModelServiceId(
10687
+ modelApplied = await applyModelServiceId(
10530
10688
  entry,
10531
10689
  modelServiceId,
10532
10690
  initTimeoutMs,
10533
10691
  clientId
10534
- ).catch(() => {
10535
- });
10692
+ ).then(
10693
+ () => true,
10694
+ () => false
10695
+ );
10536
10696
  }
10537
10697
  if (approvalMode) {
10538
10698
  try {
@@ -10564,6 +10724,7 @@ function createAcpSessionBridge(opts) {
10564
10724
  ...entry.sourceId !== void 0 ? { sourceId: entry.sourceId } : {},
10565
10725
  ...entry.sourceType ? { sourcePersisted: sourcePersisted === true } : {},
10566
10726
  ...entry.parentSessionId ? { parentSessionPersisted: parentSessionPersisted === true } : {},
10727
+ ...modelApplied !== void 0 ? { modelApplied } : {},
10567
10728
  ...entry.worktree ? { worktree: entry.worktree } : {},
10568
10729
  ...entry.branch ? { branch: entry.branch } : {}
10569
10730
  };
@@ -10901,8 +11062,14 @@ function createAcpSessionBridge(opts) {
10901
11062
  );
10902
11063
  }, "cacheWorkspaceMcpDetails");
10903
11064
  const mergeManagedWorkspaceMcpStatus = /* @__PURE__ */ __name((serverNames, previous, current) => {
10904
- if (Array.isArray(current.servers) && previous?.discoveryState === "completed" && current.discoveryState === "not_started") {
10905
- if (current.servers.length === 0) return previous;
11065
+ if (Array.isArray(current.servers) && previous?.discoveryState === "completed" && previous.runtimeEpoch === current.runtimeEpoch && current.discoveryState === "not_started") {
11066
+ if (current.servers.length === 0) {
11067
+ return {
11068
+ ...previous,
11069
+ runtimeEpoch: current.runtimeEpoch,
11070
+ source: current.source
11071
+ };
11072
+ }
10906
11073
  const currentServers = new Map(
10907
11074
  current.servers.map((server) => [server.name, server])
10908
11075
  );
@@ -10919,6 +11086,8 @@ function createAcpSessionBridge(opts) {
10919
11086
  }
10920
11087
  return {
10921
11088
  ...previous,
11089
+ runtimeEpoch: current.runtimeEpoch,
11090
+ source: current.source,
10922
11091
  discoveryState: "completed",
10923
11092
  servers
10924
11093
  };
@@ -10929,7 +11098,10 @@ function createAcpSessionBridge(opts) {
10929
11098
  const info = liveChannelInfo();
10930
11099
  if (!info) {
10931
11100
  if (method === SERVE_STATUS_EXT_METHODS.workspaceMcp && workspaceMcpStatusCache) {
10932
- return workspaceMcpStatusCache;
11101
+ return {
11102
+ ...workspaceMcpStatusCache,
11103
+ source: "cache"
11104
+ };
10933
11105
  }
10934
11106
  return idle();
10935
11107
  }
@@ -10945,6 +11117,13 @@ function createAcpSessionBridge(opts) {
10945
11117
  initTimeoutMs,
10946
11118
  method
10947
11119
  );
11120
+ if (isRecord3(response) && (method === SERVE_STATUS_EXT_METHODS.workspaceMcp || method === SERVE_STATUS_EXT_METHODS.workspaceMcpTools || method === SERVE_STATUS_EXT_METHODS.workspaceMcpResources)) {
11121
+ response = {
11122
+ ...response,
11123
+ runtimeEpoch,
11124
+ ...method === SERVE_STATUS_EXT_METHODS.workspaceMcp ? { source: "live" } : {}
11125
+ };
11126
+ }
10948
11127
  if (method === SERVE_STATUS_EXT_METHODS.workspaceMcp) {
10949
11128
  const rawStatus = response;
10950
11129
  if (!Array.isArray(rawStatus.servers)) {
@@ -10955,7 +11134,7 @@ function createAcpSessionBridge(opts) {
10955
11134
  ...info.workspaceMcpAuthenticationServerNames,
10956
11135
  ...managedServerNames ?? []
10957
11136
  ]);
10958
- if (effectiveManagedServerNames.size > 0 || workspaceMcpStatusCache?.discoveryState === "completed" && rawStatus.discoveryState === "not_started" && rawServers.length === 0) {
11137
+ if (effectiveManagedServerNames.size > 0) {
10959
11138
  response = mergeManagedWorkspaceMcpStatus(
10960
11139
  effectiveManagedServerNames,
10961
11140
  workspaceMcpStatusCache,
@@ -10992,6 +11171,8 @@ function createAcpSessionBridge(opts) {
10992
11171
  const timer = info.workspaceMcpAuthenticationTimers.get(serverName);
10993
11172
  if (timer) clearTimeout(timer);
10994
11173
  info.workspaceMcpAuthenticationTimers.delete(serverName);
11174
+ info.workspaceMcpAuthenticationReleases.get(serverName)?.();
11175
+ info.workspaceMcpAuthenticationReleases.delete(serverName);
10995
11176
  }
10996
11177
  }
10997
11178
  workspaceMcpStatusCache = response;
@@ -11359,7 +11540,8 @@ function createAcpSessionBridge(opts) {
11359
11540
  deferredArtifactInputCount: 0,
11360
11541
  attachments: new SessionAttachmentStore(
11361
11542
  opts.sessionAttachmentsRoot,
11362
- sessionId
11543
+ sessionId,
11544
+ opts.sessionAttachmentsFallbackRoot
11363
11545
  ),
11364
11546
  recordingDegraded: false,
11365
11547
  closing: false,
@@ -12184,7 +12366,6 @@ function createAcpSessionBridge(opts) {
12184
12366
  throw new BridgeChannelClosedError(`before session/${action}`);
12185
12367
  }
12186
12368
  ci = restoreChannel;
12187
- restoreChannel.preserveForFirstStatusRead = false;
12188
12369
  restoreChannel.pendingRestoreIds.add(req.sessionId);
12189
12370
  restoreChannel.client.markRestoreInFlight(req.sessionId);
12190
12371
  const transportClosed = channelUnavailableReject(
@@ -14079,7 +14260,8 @@ function createAcpSessionBridge(opts) {
14079
14260
  if (opts.sessionAttachmentsRoot) {
14080
14261
  const branchAttachments = new SessionAttachmentStore(
14081
14262
  opts.sessionAttachmentsRoot,
14082
- result.newSessionId
14263
+ result.newSessionId,
14264
+ opts.sessionAttachmentsFallbackRoot
14083
14265
  );
14084
14266
  try {
14085
14267
  await branchAttachments.copyFrom(entry.attachments);
@@ -14463,11 +14645,17 @@ function createAcpSessionBridge(opts) {
14463
14645
  hasControlCharacter2(pr.url) || pr.state !== void 0 && pr.state !== "open" && pr.state !== "merged" && pr.state !== "closed") {
14464
14646
  throw new InvalidSessionMetadataError(
14465
14647
  "pr",
14466
- `must be an object with a positive integer \`number\` and an http(s) \`url\` of at most ${SESSION_PR_URL_MAX_LENGTH} characters, without control characters, and an optional \`state\` of \`open\`, \`merged\`, or \`closed\``
14648
+ `must be an object with a positive integer \`number\` and an http(s) \`url\` of at most ${SESSION_PR_URL_MAX_LENGTH} characters, without control characters, and an optional \`state\` that is one of \`open\`, \`merged\`, or \`closed\``
14467
14649
  );
14468
14650
  }
14469
14651
  }
14470
14652
  if (metadata.displayName !== void 0) {
14653
+ if (metadata.titleSource !== void 0 && metadata.titleSource !== "manual" && metadata.titleSource !== "auto") {
14654
+ throw new InvalidSessionMetadataError(
14655
+ "titleSource",
14656
+ "must be either `manual` or `auto`"
14657
+ );
14658
+ }
14471
14659
  if (typeof metadata.displayName !== "string" || metadata.displayName.length > MAX_DISPLAY_NAME_LENGTH) {
14472
14660
  throw new InvalidSessionMetadataError(
14473
14661
  "displayName",
@@ -14480,7 +14668,14 @@ function createAcpSessionBridge(opts) {
14480
14668
  "must not contain control characters"
14481
14669
  );
14482
14670
  }
14671
+ if (metadata.displayName.trim() === "") {
14672
+ throw new InvalidSessionMetadataError(
14673
+ "displayName",
14674
+ "must not be empty"
14675
+ );
14676
+ }
14483
14677
  const nextDisplayName = metadata.displayName || void 0;
14678
+ const titleSource = metadata.titleSource ?? "manual";
14484
14679
  if (entry.displayName !== nextDisplayName) {
14485
14680
  entry.displayName = nextDisplayName;
14486
14681
  markSessionCatalogChanged();
@@ -14491,7 +14686,7 @@ function createAcpSessionBridge(opts) {
14491
14686
  entry.connection.extMethod(SERVE_CONTROL_EXT_METHODS.sessionTitle, {
14492
14687
  sessionId,
14493
14688
  displayName: nextDisplayName,
14494
- titleSource: "manual"
14689
+ titleSource
14495
14690
  }).then((res) => {
14496
14691
  const r = res;
14497
14692
  if (r && r.persisted === false) {
@@ -14508,7 +14703,11 @@ function createAcpSessionBridge(opts) {
14508
14703
  try {
14509
14704
  entry.events.publish({
14510
14705
  type: "session_metadata_updated",
14511
- data: { sessionId, displayName: entry.displayName },
14706
+ data: {
14707
+ sessionId,
14708
+ displayName: entry.displayName,
14709
+ ...entry.displayName ? { titleSource } : {}
14710
+ },
14512
14711
  ...metadataOriginatorClientId ? { originatorClientId: metadataOriginatorClientId } : {}
14513
14712
  });
14514
14713
  } catch {
@@ -14533,7 +14732,9 @@ function createAcpSessionBridge(opts) {
14533
14732
  url: bound.url,
14534
14733
  ...bound.state ?? known?.state ? {
14535
14734
  state: bound.state ?? known?.state
14536
- } : {}
14735
+ } : {},
14736
+ // The issue snapshot is daemon-derived, never client-bound.
14737
+ ...known?.issues ? { issues: known.issues } : {}
14537
14738
  }
14538
14739
  ].slice(-SESSION_PR_LIST_LIMIT);
14539
14740
  markSessionCatalogChanged();
@@ -14564,20 +14765,33 @@ function createAcpSessionBridge(opts) {
14564
14765
  seedSessionPrs(sessionId, prs) {
14565
14766
  const entry = byId.get(sessionId);
14566
14767
  if (!entry || entry.prs && entry.prs.length > 0) return;
14567
- entry.prs = prs.map(({ number, url, state }) => ({
14568
- number,
14569
- url,
14570
- ...state ? { state } : {}
14571
- })).slice(-SESSION_PR_LIST_LIMIT);
14768
+ entry.prs = prs.map(toSessionPrInfo).slice(-SESSION_PR_LIST_LIMIT);
14572
14769
  },
14573
14770
  setSessionPrs(sessionId, prs) {
14574
14771
  const entry = byId.get(sessionId);
14575
14772
  if (!entry) return;
14576
- entry.prs = prs.map(({ number, url, state }) => ({
14577
- number,
14578
- url,
14579
- ...state ? { state } : {}
14580
- })).slice(-SESSION_PR_LIST_LIMIT);
14773
+ const next = prs.map(toSessionPrInfo).slice(-SESSION_PR_LIST_LIMIT);
14774
+ const current = entry.prs ?? [];
14775
+ const sameIssueList = /* @__PURE__ */ __name((left, right) => JSON.stringify(left ?? null) === JSON.stringify(right ?? null), "sameIssueList");
14776
+ const unchanged = current.length === next.length && current.every(
14777
+ (p, index) => p.number === next[index].number && p.url === next[index].url && p.state === next[index].state && sameIssueList(p.issues, next[index].issues)
14778
+ );
14779
+ entry.prs = next;
14780
+ if (unchanged) return;
14781
+ markSessionCatalogChanged();
14782
+ try {
14783
+ entry.events.publish({
14784
+ type: "session_metadata_updated",
14785
+ data: {
14786
+ sessionId,
14787
+ // Echo the current name: SDK folds treat an absent displayName
14788
+ // as "cleared", so a pr-only event must not blank the title.
14789
+ ...entry.displayName !== void 0 ? { displayName: entry.displayName } : {},
14790
+ prs: entry.prs
14791
+ }
14792
+ });
14793
+ } catch {
14794
+ }
14581
14795
  },
14582
14796
  async getSessionArtifacts(sessionId, context) {
14583
14797
  const entry = byId.get(sessionId);
@@ -15266,6 +15480,21 @@ function createAcpSessionBridge(opts) {
15266
15480
  refreshed: result.refreshed ?? false
15267
15481
  };
15268
15482
  },
15483
+ async setUserLanguage(params) {
15484
+ const info = liveChannelInfo();
15485
+ if (!info) throw new SessionNotFoundError("user-language");
15486
+ return await withTimeout(
15487
+ Promise.race([
15488
+ info.connection.extMethod(SERVE_CONTROL_EXT_METHODS.userLanguage, {
15489
+ language: params.language,
15490
+ syncOutputLanguage: params.syncOutputLanguage
15491
+ }),
15492
+ getChannelClosedReject(info)
15493
+ ]),
15494
+ initTimeoutMs,
15495
+ SERVE_CONTROL_EXT_METHODS.userLanguage
15496
+ );
15497
+ },
15269
15498
  async setSessionLiveConversationActive(sessionId, active) {
15270
15499
  await requestSessionStatus(
15271
15500
  sessionId,
@@ -15489,7 +15718,11 @@ function createAcpSessionBridge(opts) {
15489
15718
  return await entry.attachments.remove(attachmentId);
15490
15719
  },
15491
15720
  async deleteSessionAttachments(sessionId, options) {
15492
- const store = byId.get(sessionId)?.attachments ?? new SessionAttachmentStore(opts.sessionAttachmentsRoot, sessionId);
15721
+ const store = byId.get(sessionId)?.attachments ?? new SessionAttachmentStore(
15722
+ opts.sessionAttachmentsRoot,
15723
+ sessionId,
15724
+ opts.sessionAttachmentsFallbackRoot
15725
+ );
15493
15726
  await store.delete(options);
15494
15727
  },
15495
15728
  removePendingPrompt(sessionId, promptId, context) {
@@ -16121,51 +16354,78 @@ function createAcpSessionBridge(opts) {
16121
16354
  return rewindResult;
16122
16355
  },
16123
16356
  async manageMcpServer(serverName, action, originatorClientId) {
16124
- return await withEnsuredWorkspaceControl(async (info) => {
16125
- const timeout = action === "authenticate" ? MCP_OAUTH_TIMEOUT_MS : MCP_RESTART_TIMEOUT_MS;
16126
- const response = await Promise.race([
16127
- withTimeout(
16128
- info.connection.extMethod(
16129
- SERVE_CONTROL_EXT_METHODS.workspaceMcpManage,
16130
- { serverName, action, originatorClientId }
16131
- ),
16132
- timeout,
16133
- SERVE_CONTROL_EXT_METHODS.workspaceMcpManage
16134
- ),
16135
- getChannelClosedReject(info)
16136
- ]);
16137
- if (action === "authenticate" && response.pending) {
16138
- info.workspaceMcpAuthenticationServerNames.add(serverName);
16139
- const previousTimer = info.workspaceMcpAuthenticationTimers.get(serverName);
16140
- if (previousTimer) clearTimeout(previousTimer);
16141
- const timer = setTimeout(() => {
16142
- void expireWorkspaceMcpAuthentication(info, serverName, timer);
16143
- }, MCP_OAUTH_TIMEOUT_MS);
16144
- timer.unref();
16145
- info.workspaceMcpAuthenticationTimers.set(serverName, timer);
16146
- }
16147
- invalidateWorkspaceMcpDetailCache(serverName);
16148
- await requestWorkspaceStatus(
16149
- SERVE_STATUS_EXT_METHODS.workspaceMcp,
16150
- () => {
16151
- throw new BridgeChannelClosedError(
16152
- "workspace MCP management status refresh"
16357
+ let releaseAuthentication = action === "authenticate" ? opts.acquireMcpAuthentication?.(boundWorkspace, serverName) : void 0;
16358
+ if (action === "authenticate" && opts.acquireMcpAuthentication && !releaseAuthentication) {
16359
+ throw new McpAuthenticationInProgressError();
16360
+ }
16361
+ try {
16362
+ return await withEnsuredWorkspaceControl(async (info) => {
16363
+ if (releaseAuthentication) {
16364
+ info.workspaceMcpAuthenticationReleases.set(
16365
+ serverName,
16366
+ releaseAuthentication
16153
16367
  );
16154
- },
16155
- {},
16156
- /* @__PURE__ */ new Set([serverName])
16157
- );
16158
- broadcastWorkspaceEvent({
16159
- type: "mcp_server_changed",
16160
- data: {
16161
- serverName: response.serverName,
16162
- action: response.action,
16163
- originatorClientId
16164
- },
16165
- ...originatorClientId ? { originatorClientId } : {}
16368
+ releaseAuthentication = void 0;
16369
+ }
16370
+ const timeout = action === "authenticate" ? MCP_OAUTH_TIMEOUT_MS : MCP_RESTART_TIMEOUT_MS;
16371
+ let response;
16372
+ try {
16373
+ response = await Promise.race([
16374
+ withTimeout(
16375
+ info.connection.extMethod(
16376
+ SERVE_CONTROL_EXT_METHODS.workspaceMcpManage,
16377
+ { serverName, action, originatorClientId }
16378
+ ),
16379
+ timeout,
16380
+ SERVE_CONTROL_EXT_METHODS.workspaceMcpManage
16381
+ ),
16382
+ getChannelClosedReject(info)
16383
+ ]);
16384
+ } catch (error) {
16385
+ if (action === "authenticate" && !(error instanceof BridgeTimeoutError) && !(error instanceof BridgeChannelClosedError)) {
16386
+ info.workspaceMcpAuthenticationReleases.get(serverName)?.();
16387
+ info.workspaceMcpAuthenticationReleases.delete(serverName);
16388
+ }
16389
+ throw error;
16390
+ }
16391
+ if (action === "authenticate" && response.pending) {
16392
+ info.workspaceMcpAuthenticationServerNames.add(serverName);
16393
+ const previousTimer = info.workspaceMcpAuthenticationTimers.get(serverName);
16394
+ if (previousTimer) clearTimeout(previousTimer);
16395
+ const timer = setTimeout(() => {
16396
+ void expireWorkspaceMcpAuthentication(info, serverName, timer);
16397
+ }, MCP_OAUTH_TIMEOUT_MS);
16398
+ timer.unref();
16399
+ info.workspaceMcpAuthenticationTimers.set(serverName, timer);
16400
+ } else if (action === "authenticate") {
16401
+ info.workspaceMcpAuthenticationReleases.get(serverName)?.();
16402
+ info.workspaceMcpAuthenticationReleases.delete(serverName);
16403
+ }
16404
+ invalidateWorkspaceMcpDetailCache(serverName);
16405
+ await requestWorkspaceStatus(
16406
+ SERVE_STATUS_EXT_METHODS.workspaceMcp,
16407
+ () => {
16408
+ throw new BridgeChannelClosedError(
16409
+ "workspace MCP management status refresh"
16410
+ );
16411
+ },
16412
+ {},
16413
+ /* @__PURE__ */ new Set([serverName])
16414
+ );
16415
+ broadcastWorkspaceEvent({
16416
+ type: "mcp_server_changed",
16417
+ data: {
16418
+ serverName: response.serverName,
16419
+ action: response.action,
16420
+ originatorClientId
16421
+ },
16422
+ ...originatorClientId ? { originatorClientId } : {}
16423
+ });
16424
+ return response;
16166
16425
  });
16167
- return response;
16168
- });
16426
+ } finally {
16427
+ releaseAuthentication?.();
16428
+ }
16169
16429
  },
16170
16430
  async initializeWorkspaceMcp() {
16171
16431
  return await withEnsuredWorkspaceControl(async (info) => {
@@ -16638,15 +16898,12 @@ function createAcpSessionBridge(opts) {
16638
16898
  "channel.preheat",
16639
16899
  { "qwen-code.daemon.bridge.operation": "channel.preheat" },
16640
16900
  async () => {
16641
- const existing = liveChannelInfo();
16642
- const info = await ensureChannel();
16901
+ await ensureChannel();
16643
16902
  if (keepAliveMs !== void 0) {
16644
16903
  keepAliveUntil = Math.max(
16645
16904
  keepAliveUntil,
16646
16905
  Date.now() + keepAliveMs
16647
16906
  );
16648
- } else if (!existing && configuredChannelIdleTimeoutMs() === 0 && hasNoSessionWork(info)) {
16649
- info.preserveForFirstStatusRead = true;
16650
16907
  }
16651
16908
  }
16652
16909
  );