@qwen-code/qwen-code 0.21.12 → 0.21.13

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 (303) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +7 -5
  2. package/bundled/qc-helper/docs/features/code-review.md +13 -12
  3. package/bundled/review/SKILL.md +96 -68
  4. package/chunks/{MaxSizedBox-ZSJJ2D5S.js → MaxSizedBox-UQALOVVT.js} +41 -41
  5. package/chunks/{StandaloneSessionPicker-WHUHQXSA.js → StandaloneSessionPicker-KEGXNUG6.js} +62 -62
  6. package/chunks/{acp-startup-profiler-SVPUHLXV.js → acp-startup-profiler-NMDXYGDN.js} +2 -2
  7. package/chunks/{acpAgent-7JOAESF5.js → acpAgent-XPES32S7.js} +533 -286
  8. package/chunks/{agent-E6V3VXQR.js → agent-DPTOZFEM.js} +38 -38
  9. package/chunks/{agent-headless-OEQNFOMH.js → agent-headless-GJCQMURW.js} +38 -38
  10. package/chunks/{anthropicContentGenerator-YDT4EOKO.js → anthropicContentGenerator-G7BVXTKN.js} +6 -6
  11. package/chunks/{artifact-tool-4GCQQDZI.js → artifact-tool-GEXTOPVO.js} +2 -2
  12. package/chunks/{askUserQuestion-HZJJLR3Z.js → askUserQuestion-B33XRSB7.js} +2 -2
  13. package/chunks/{bridge-NPBV53UA.js → bridge-YNQBAA4Z.js} +42 -42
  14. package/chunks/{channel-management-service-OADNGQM3.js → channel-management-service-GWY2GAIC.js} +1 -1
  15. package/chunks/{channel-settings-store-4ODLJ4X2.js → channel-settings-store-WNWYFHG7.js} +45 -45
  16. package/chunks/{channel-worker-group-IHBIHQ45.js → channel-worker-group-7LXCMZ77.js} +4 -4
  17. package/chunks/{channel-worker-manager-GEHYJ5AE.js → channel-worker-manager-RYEME4ZZ.js} +4 -4
  18. package/chunks/{channel-worker-supervisor-ZJIIWM4I.js → channel-worker-supervisor-OEVWBHGT.js} +2 -2
  19. package/chunks/{chunk-5RUCD4ED.js → chunk-25EYDK42.js} +3 -3
  20. package/chunks/{chunk-2ZWH53I4.js → chunk-2B2BF7P7.js} +3 -3
  21. package/chunks/{chunk-OYWVIXHT.js → chunk-2M55OBEB.js} +1 -1
  22. package/chunks/{chunk-GZDWTBT3.js → chunk-3EZLLVDF.js} +2 -2
  23. package/chunks/{chunk-V6OBVAST.js → chunk-3U3VAL47.js} +1 -1
  24. package/chunks/{chunk-KWX56CHZ.js → chunk-4PKCUT7F.js} +7 -7
  25. package/chunks/{chunk-EBPLKY6U.js → chunk-4S5337WV.js} +1229 -522
  26. package/chunks/{chunk-QLTATTPS.js → chunk-5CVO7YES.js} +1 -1
  27. package/chunks/{chunk-I7BT2MME.js → chunk-5EYKMUUY.js} +1 -1
  28. package/chunks/{chunk-YIGGWOJE.js → chunk-6HY6IF3Z.js} +1 -1
  29. package/chunks/{chunk-LCX5B364.js → chunk-6ORZ2EDC.js} +3 -3
  30. package/chunks/{chunk-OWGRUU7F.js → chunk-6QFDQMQX.js} +1 -1
  31. package/chunks/{chunk-5AFGJNY6.js → chunk-6YKYPVDV.js} +4 -4
  32. package/chunks/{chunk-X5SLJOMF.js → chunk-76J3IJ3M.js} +4 -4
  33. package/chunks/{chunk-YX2RDGAL.js → chunk-7UXUJ5T3.js} +1 -1
  34. package/chunks/{chunk-3GDBZJD6.js → chunk-A267JX7H.js} +6 -6
  35. package/chunks/{chunk-DD6O3ZRD.js → chunk-A4MFR4C5.js} +1 -1
  36. package/chunks/{chunk-LUISTZXI.js → chunk-AA2BEKV3.js} +2 -2
  37. package/chunks/{chunk-4XA4QIUA.js → chunk-AFSG32D5.js} +1 -1
  38. package/chunks/{chunk-B4VN3VDH.js → chunk-AS5IN4GK.js} +5 -5
  39. package/chunks/{chunk-MELQSJOU.js → chunk-AW4TRXOC.js} +1 -1
  40. package/chunks/{chunk-EJOGLSNJ.js → chunk-AXN7UPYQ.js} +1 -1
  41. package/chunks/{chunk-CGM3E75C.js → chunk-BHILXOC3.js} +2 -2
  42. package/chunks/{chunk-7KJPO7YH.js → chunk-BKPPWD33.js} +2 -2
  43. package/chunks/{chunk-HOSVOUDK.js → chunk-BUQDLC2G.js} +3 -0
  44. package/chunks/{chunk-2IVYL3IF.js → chunk-BVJS5BSP.js} +1 -1
  45. package/chunks/{chunk-TMFWI4RC.js → chunk-BZ263IKX.js} +1 -1
  46. package/chunks/{chunk-G6MUFRNI.js → chunk-CHHABXPE.js} +1 -1
  47. package/chunks/{chunk-YILJKX2T.js → chunk-CKSJECTU.js} +4 -4
  48. package/chunks/{chunk-4AOVQPJU.js → chunk-CPHEPGAO.js} +1 -1
  49. package/chunks/{chunk-OWXFBIB6.js → chunk-CU6GJD55.js} +1 -1
  50. package/chunks/{chunk-FMIH5KMQ.js → chunk-CZBYX5MY.js} +1 -1
  51. package/chunks/{chunk-S6TCTH4Z.js → chunk-DGK6P3BQ.js} +12 -12
  52. package/chunks/{chunk-QPBFRWCP.js → chunk-DGZEMW5R.js} +3 -3
  53. package/chunks/{chunk-NW2GIPG3.js → chunk-DXIBNLBZ.js} +2 -2
  54. package/chunks/{chunk-FA5K6YI2.js → chunk-E23IPNGS.js} +25 -2
  55. package/chunks/{chunk-ULNWG62W.js → chunk-E3DYKPYZ.js} +3 -3
  56. package/chunks/{chunk-N4SVADAV.js → chunk-EL5SXY3T.js} +4 -3
  57. package/chunks/{chunk-YCHNAKC5.js → chunk-EZ5RP345.js} +11 -11
  58. package/chunks/{chunk-D7QGE3RT.js → chunk-FAAUPSY2.js} +1 -1
  59. package/chunks/{chunk-YBHUXEC6.js → chunk-FDGGZIYW.js} +1 -1
  60. package/chunks/{chunk-CIDQISGM.js → chunk-GGDBMYGZ.js} +5 -5
  61. package/chunks/{chunk-DG4IQ6JG.js → chunk-GMIEIY3Y.js} +3 -3
  62. package/chunks/{chunk-ZQUY3ZJU.js → chunk-GO7STP6N.js} +4 -4
  63. package/chunks/{chunk-3AEKDXKT.js → chunk-H4A72DE5.js} +1 -1
  64. package/chunks/{chunk-IRSLAS4M.js → chunk-HUTNYWBG.js} +2 -2
  65. package/chunks/{chunk-ZBB5EZZV.js → chunk-IA2K2HJE.js} +2 -2
  66. package/chunks/{chunk-IX4PWUDU.js → chunk-IGGGG5CX.js} +4329 -1586
  67. package/chunks/{chunk-ZMY2P4L3.js → chunk-IWPYVAO2.js} +4 -4
  68. package/chunks/{chunk-WCEI6J56.js → chunk-JNDY2MDR.js} +2 -2
  69. package/chunks/{chunk-3LDGOQXZ.js → chunk-JOOFMXGF.js} +6 -6
  70. package/chunks/{chunk-RDVNSJQU.js → chunk-JUEPY766.js} +3 -3
  71. package/chunks/{chunk-QBJYSIQ4.js → chunk-K3LPAED5.js} +53 -12
  72. package/chunks/{chunk-FRHQQC2Z.js → chunk-KBXKR5R2.js} +1 -1
  73. package/chunks/{chunk-PTSEETCO.js → chunk-KD5BOPLP.js} +12 -12
  74. package/chunks/{chunk-CPFFU46D.js → chunk-KV27IEHM.js} +1 -1
  75. package/chunks/{chunk-6P5EXEBL.js → chunk-LJQAUZMR.js} +207 -146
  76. package/chunks/{chunk-56HVDG3M.js → chunk-M732YJPW.js} +6 -6
  77. package/chunks/{chunk-LSRI3ND3.js → chunk-MA2HEDVP.js} +1 -1
  78. package/chunks/{chunk-XH3KAV2G.js → chunk-MC4TLKEI.js} +2 -2
  79. package/chunks/{chunk-YBVVOSOH.js → chunk-MIPFDQAF.js} +1 -1
  80. package/chunks/{chunk-47BGDLJG.js → chunk-MLPXSYXR.js} +31 -18
  81. package/chunks/{chunk-KRXPRVGL.js → chunk-MLXTMF7H.js} +0 -1
  82. package/chunks/{chunk-CQ6IPDQW.js → chunk-MRMJCLIY.js} +3 -3
  83. package/chunks/{chunk-62X3CM7Q.js → chunk-N5YPT6PH.js} +4 -4
  84. package/chunks/{chunk-OPVF453Q.js → chunk-NEFOOD54.js} +3 -3
  85. package/chunks/{chunk-DAV4QFD5.js → chunk-NHDR76JX.js} +44 -3
  86. package/chunks/{chunk-36XKGB7E.js → chunk-NM5V5OVW.js} +3 -3
  87. package/chunks/{chunk-QSD4UH74.js → chunk-NNHNLJ2X.js} +42 -42
  88. package/chunks/chunk-NYWWQ437.js +24 -0
  89. package/chunks/{chunk-MDNUCDKZ.js → chunk-O4D7SPJN.js} +2 -2
  90. package/chunks/{chunk-HG3UBTJ4.js → chunk-O565M6A4.js} +411 -10
  91. package/chunks/{chunk-BSR5AXZR.js → chunk-OD2WU5QY.js} +1 -1
  92. package/chunks/{chunk-DPTMKFIH.js → chunk-OMLJNPBE.js} +42 -12
  93. package/chunks/{chunk-Q4ZPYNIZ.js → chunk-OOQUVWIG.js} +4 -4
  94. package/chunks/{chunk-D2RNVVH6.js → chunk-OVZPVYZB.js} +2 -2
  95. package/chunks/{chunk-3GM5DLBI.js → chunk-OXCMMLED.js} +3 -3
  96. package/chunks/{chunk-BSSLSQEW.js → chunk-OY5RNSV4.js} +3 -3
  97. package/chunks/{chunk-PZW46OTB.js → chunk-P7MPQI75.js} +2 -2
  98. package/chunks/{chunk-6JEIRPLN.js → chunk-PP4FUZNV.js} +2 -2
  99. package/chunks/{chunk-DFVXU5YM.js → chunk-PQ36L4F5.js} +1 -1
  100. package/chunks/{chunk-VPV7WBVT.js → chunk-PT4I7NBA.js} +1 -1
  101. package/chunks/{chunk-VLHR7F4E.js → chunk-QF2NHSPB.js} +28 -28
  102. package/chunks/{chunk-NLFLYSS4.js → chunk-QFJ5JHQR.js} +1 -1
  103. package/chunks/{chunk-VIFA5VJD.js → chunk-QIH2HAEN.js} +1 -1
  104. package/chunks/{chunk-HTYND72J.js → chunk-QNQAPSN2.js} +1 -1
  105. package/chunks/{chunk-TDESMS7M.js → chunk-QRCNA3SR.js} +4 -4
  106. package/chunks/{chunk-IH4Z54RJ.js → chunk-QV5YN5YD.js} +5 -5
  107. package/chunks/{chunk-WI6GIM2M.js → chunk-RIAABG2K.js} +2 -2
  108. package/chunks/{chunk-UI5UGEF4.js → chunk-RLKC46YT.js} +16 -10
  109. package/chunks/{chunk-KEC5FHLM.js → chunk-ROIYNTHJ.js} +3 -3
  110. package/chunks/{chunk-4KM2SYK5.js → chunk-RVOJ2FBP.js} +8 -8
  111. package/chunks/{chunk-63FNZTWG.js → chunk-RWDNJBWN.js} +2 -2
  112. package/chunks/{chunk-FQDCO3CJ.js → chunk-S5DWMTHO.js} +5 -0
  113. package/chunks/{chunk-TTRH3RTQ.js → chunk-SG7ZP5PG.js} +4 -4
  114. package/chunks/{chunk-TXP5NGG3.js → chunk-SXCOEJO4.js} +1 -1
  115. package/chunks/{chunk-K34GJQOZ.js → chunk-TIGA2IVL.js} +3 -3
  116. package/chunks/chunk-TS6625XH.js +488 -0
  117. package/chunks/{chunk-WM3LUQLO.js → chunk-TUGSVUJB.js} +6 -6
  118. package/chunks/{chunk-XAFIL4BD.js → chunk-U3VNBPUO.js} +5 -5
  119. package/chunks/{chunk-WDVDVWJ3.js → chunk-UKMR3CKV.js} +6 -6
  120. package/chunks/{chunk-DEDESZDL.js → chunk-UPDOZBWO.js} +1 -1
  121. package/chunks/{chunk-MUNA4QDC.js → chunk-UZPM4XHR.js} +4 -4
  122. package/chunks/{chunk-6SPD4Z7F.js → chunk-V26NVGAU.js} +1 -1
  123. package/chunks/{chunk-XDRXOSAD.js → chunk-V57QC6WW.js} +2 -2
  124. package/chunks/{chunk-NX4A23LY.js → chunk-WFSTRPRO.js} +3 -3
  125. package/chunks/{chunk-H7TMVHKE.js → chunk-WGHHA7ZH.js} +1 -1
  126. package/chunks/{chunk-JRIVMPD2.js → chunk-WSH6GRKG.js} +4 -4
  127. package/chunks/{chunk-OR64CU46.js → chunk-X26JYGTD.js} +1 -1
  128. package/chunks/{chunk-RQJA2YYO.js → chunk-XHRY7BXD.js} +4 -4
  129. package/chunks/{chunk-MAKIANMX.js → chunk-XIT3GURH.js} +3 -3
  130. package/chunks/{chunk-KLOMACIR.js → chunk-XLLKYULU.js} +2 -2
  131. package/chunks/{chunk-PVXEJB66.js → chunk-XUJNK7Y6.js} +1 -1
  132. package/chunks/{chunk-AKBFSOC5.js → chunk-Y3YCSWG5.js} +2 -2
  133. package/chunks/{chunk-6ZKSO6K7.js → chunk-YEYY7TEP.js} +7 -7
  134. package/chunks/{chunk-TB4YFWXG.js → chunk-YZHRN3CF.js} +2 -2
  135. package/chunks/{chunk-TQDFSQQF.js → chunk-YZOSNW4R.js} +1 -1
  136. package/chunks/{chunk-GXTMEATA.js → chunk-ZYBBISBY.js} +7 -7
  137. package/chunks/{chunk-ROIJYS5K.js → chunk-ZYYTZUI2.js} +3 -3
  138. package/chunks/{chunk-CZ4OWGQQ.js → chunk-ZZO74WKW.js} +43 -5
  139. package/chunks/{computer-use-F4URV4TU.js → computer-use-77C5FHMW.js} +38 -38
  140. package/chunks/{config-utils-Z3OW3IQG.js → config-utils-IVHRSXWI.js} +2 -2
  141. package/chunks/{contextCommand-IGSS2U5J.js → contextCommand-PJ77GBWL.js} +40 -40
  142. package/chunks/{core-runtime-H5CZDN3A.js → core-runtime-7VMIKUTG.js} +38 -38
  143. package/chunks/{create-sub-session-PA7MFTHK.js → create-sub-session-2L5MQRN4.js} +38 -38
  144. package/chunks/{create-sub-session-XT6DLYOE.js → create-sub-session-KRQULJE6.js} +2 -2
  145. package/chunks/{cron-create-2JZ2TWTF.js → cron-create-H7UEPDSN.js} +4 -4
  146. package/chunks/{cron-delete-CTPD2P26.js → cron-delete-6SZK7YFM.js} +4 -4
  147. package/chunks/{cron-list-V44KHAF6.js → cron-list-H25JIHEZ.js} +4 -4
  148. package/chunks/{daemon-GED37WOX.js → daemon-2KTG7ZBN.js} +80 -8
  149. package/chunks/{daemon-git-worktree-guard-LZDCNJGV.js → daemon-git-worktree-guard-DXYIMWFT.js} +38 -38
  150. package/chunks/{daemon-status-provider-QYM57Z44.js → daemon-status-provider-ZDOYJCU6.js} +46 -46
  151. package/chunks/{daemon-trust-policy-TSRVEYZR.js → daemon-trust-policy-E67OYUK2.js} +44 -44
  152. package/chunks/{daemon-trust-policy-monitor-2K2YETMT.js → daemon-trust-policy-monitor-RYYGCQ3J.js} +44 -44
  153. package/chunks/{deferred-core-runtime-FKJ3OYE7.js → deferred-core-runtime-3SGXFXEQ.js} +38 -38
  154. package/chunks/discovery-ORA5J7YP.js +27 -0
  155. package/chunks/{display-image-M2ELAVN4.js → display-image-ON3EYFRD.js} +4 -4
  156. package/chunks/{earlyInputCapture-WJBSJQUF.js → earlyInputCapture-KJMLFVQV.js} +39 -39
  157. package/chunks/{edit-X73LA4YO.js → edit-I4LQFAEC.js} +38 -38
  158. package/chunks/{enter-worktree-CLRQTIVN.js → enter-worktree-YNPOJSRH.js} +38 -38
  159. package/chunks/{enterPlanMode-6BDYUQ5T.js → enterPlanMode-XCPK62ER.js} +38 -38
  160. package/chunks/{environment-WOAJXJDJ.js → environment-S7CTIHMX.js} +40 -40
  161. package/chunks/{errors-7OY5MXYY.js → errors-7HB2AIDS.js} +40 -40
  162. package/chunks/{exit-worktree-TFFJXCRT.js → exit-worktree-AIIY7SR6.js} +38 -38
  163. package/chunks/{exitPlanMode-WDURQMIU.js → exitPlanMode-R4JY7V2O.js} +38 -38
  164. package/chunks/{fast-path-QQLGC37M.js → fast-path-NDJV3ZFJ.js} +2 -2
  165. package/chunks/{gemini-VHE62IJL.js → gemini-RSUFP5OE.js} +86 -86
  166. package/chunks/{geminiContentGenerator-VSHIEGAQ.js → geminiContentGenerator-SQ5XBPZ7.js} +6 -6
  167. package/chunks/{glob-VMEEDDLO.js → glob-J4RUJAHX.js} +38 -38
  168. package/chunks/{goal-tools-M4UDAZXP.js → goal-tools-VHTNVOKK.js} +56 -12
  169. package/chunks/{grep-F4UAR7KX.js → grep-VJWPLFOT.js} +38 -38
  170. package/chunks/{handleAutoUpdate-GN7Z6QAC.js → handleAutoUpdate-POCX2MNB.js} +42 -42
  171. package/chunks/{i18n-ETW24DHW.js → i18n-RM5YOICI.js} +39 -39
  172. package/chunks/{image-gen-YPK2AZT4.js → image-gen-EXECB5XM.js} +10 -10
  173. package/chunks/{initializer-UA6KQ7MS.js → initializer-Z2AFGBNR.js} +45 -45
  174. package/chunks/{installationInfo-P7OTIR4P.js → installationInfo-4I5FXNMH.js} +39 -39
  175. package/chunks/{keychain-token-storage-NKKCUHI2.js → keychain-token-storage-3XFJ5ZB2.js} +2 -2
  176. package/chunks/{list-GRAMIQOT.js → list-ZMBFIGZA.js} +47 -47
  177. package/chunks/{list-agents-O6WSY4CT.js → list-agents-OSVDFI6S.js} +2 -2
  178. package/chunks/{loadedSettingsAdapter-5O2TDS3I.js → loadedSettingsAdapter-T6TV4YJ7.js} +44 -44
  179. package/chunks/{loggingContentGenerator-J2J2AANS.js → loggingContentGenerator-WF4ZOJEZ.js} +63 -39
  180. package/chunks/{loop-wakeup-GVQRMUKS.js → loop-wakeup-WQS6JYAG.js} +5 -5
  181. package/chunks/{ls-6W2D7TKU.js → ls-D3HUFHDP.js} +4 -4
  182. package/chunks/{lsp-NJ4KFBI2.js → lsp-3QDDJTCS.js} +2 -2
  183. package/chunks/{managed-npm-update-WMV5ITKU.js → managed-npm-update-E7IW6N7V.js} +39 -39
  184. package/chunks/{mcp-XLP33CAI.js → mcp-6UNYX4HG.js} +44 -44
  185. package/chunks/{monitor-2MM23VDV.js → monitor-EE2UYMGE.js} +38 -38
  186. package/chunks/{nonInteractiveCli-KTA5K6FS.js → nonInteractiveCli-WAY237O4.js} +79 -79
  187. package/chunks/{notebook-edit-QD4TRKLY.js → notebook-edit-NTDY4QDU.js} +38 -38
  188. package/chunks/{openaiContentGenerator-KLHSPVN2.js → openaiContentGenerator-YNFVJMRJ.js} +23 -23
  189. package/chunks/{pidfile-RQGZBNXT.js → pidfile-4XSFLYBZ.js} +39 -39
  190. package/chunks/{processUtils-HZZDA2VV.js → processUtils-WDA2MJFD.js} +2 -2
  191. package/chunks/proper-lockfile-3LHWIM44.js +8 -0
  192. package/chunks/{qwenContentGenerator-T75M2Z3B.js → qwenContentGenerator-434M7QKY.js} +43 -43
  193. package/chunks/{qwenOAuth2-5QZU444W.js → qwenOAuth2-GMYZOO6A.js} +9 -9
  194. package/chunks/{read-file-LOVUSBJC.js → read-file-TAFBKMNI.js} +11 -11
  195. package/chunks/{read-mcp-resource-GWCP23WG.js → read-mcp-resource-XD54ZQMC.js} +2 -2
  196. package/chunks/{record-artifact-IYQDEYMV.js → record-artifact-SEYFJEJF.js} +3 -3
  197. package/chunks/{resumeHistoryUtils-LVKSSQII.js → resumeHistoryUtils-EVG3WYK2.js} +45 -45
  198. package/chunks/{ripGrep-ZJSHKB6H.js → ripGrep-WOEK2PXS.js} +38 -38
  199. package/chunks/{run-qwen-serve-GZW7B4WK.js → run-qwen-serve-3QSGRXAN.js} +411 -209
  200. package/chunks/{runtime-MYRXEO2E.js → runtime-5MLLZ7DC.js} +47 -47
  201. package/chunks/{scheduler-DPTPI6FW.js → scheduler-RPBJ63CH.js} +40 -40
  202. package/chunks/{sdk-exporters-http-NHBYB5FZ.js → sdk-exporters-http-XUVP63H6.js} +2 -2
  203. package/chunks/{sdk-impl-SK4P5WON.js → sdk-impl-YXUEN2Z2.js} +2 -2
  204. package/chunks/{send-message-O7FO63UK.js → send-message-VZENRWRH.js} +6 -6
  205. package/chunks/{serve-XCG4XCDA.js → serve-HS3XLPXU.js} +44 -44
  206. package/chunks/{server-AWQHKXLG.js → server-TC4A7AAZ.js} +3833 -1618
  207. package/chunks/{session-P5FKNCNR.js → session-UBOFXVMN.js} +80 -80
  208. package/chunks/{settings-CSYVIP2R.js → settings-D5644OM5.js} +43 -43
  209. package/chunks/{shell-EGTSUO2P.js → shell-3PZULQQV.js} +38 -38
  210. package/chunks/{skill-IFUD72GF.js → skill-PEVVXQ3L.js} +16 -16
  211. package/chunks/{skill-settings-YOE7LBHE.js → skill-settings-J65JKKES.js} +43 -43
  212. package/chunks/{spawnChannel-PQSZIOLY.js → spawnChannel-IYGXRHSQ.js} +40 -40
  213. package/chunks/{standalone-update-RB2EGUSF.js → standalone-update-IFM53PE7.js} +40 -40
  214. package/chunks/{startInteractiveUI-KMYUJ2MU.js → startInteractiveUI-3AVH7L6H.js} +417 -168
  215. package/chunks/{syntheticOutput-DVHJMUGV.js → syntheticOutput-7GWFIDXT.js} +3 -3
  216. package/chunks/{task-create-4NC7PDI4.js → task-create-FCBDX7UH.js} +11 -11
  217. package/chunks/{task-list-LBSRMOC7.js → task-list-YIYIUFUA.js} +6 -6
  218. package/chunks/{task-stop-YFNATTIM.js → task-stop-X37KYTKB.js} +2 -2
  219. package/chunks/{task-update-BPLM52GD.js → task-update-MYPFVOVM.js} +11 -11
  220. package/chunks/{team-create-B6A6MJBT.js → team-create-ZAIA7KAV.js} +38 -38
  221. package/chunks/{team-delete-MKYMYBFM.js → team-delete-6UMU4XLS.js} +6 -6
  222. package/chunks/{team-plan-approval-5WO3CXXU.js → team-plan-approval-UNIUS7OD.js} +38 -38
  223. package/chunks/{terminal-image-renderer-BTRE2GEU.js → terminal-image-renderer-G343P2RV.js} +40 -40
  224. package/chunks/{theme-manager-XL2N5SBY.js → theme-manager-Z3RIT7DB.js} +39 -39
  225. package/chunks/{todoWrite-K5K7NRE5.js → todoWrite-U2R4NVF4.js} +4 -4
  226. package/chunks/{tool-search-QNBLXUGR.js → tool-search-5R2OE4C7.js} +15 -15
  227. package/chunks/{total-session-admission-N4E5SFBO.js → total-session-admission-4KBHMQQ2.js} +42 -42
  228. package/chunks/{trustedFolders-MQS46LIU.js → trustedFolders-LK6T4XC7.js} +39 -39
  229. package/chunks/{update-relaunch-536KRL33.js → update-relaunch-UBKROIC6.js} +5 -5
  230. package/chunks/{updateCheck-QJI2SYWF.js → updateCheck-W4Y2GFSD.js} +42 -42
  231. package/chunks/{useAutoAcceptIndicator-7QASHD46.js → useAutoAcceptIndicator-C7BEICBF.js} +47 -47
  232. package/chunks/{validateNonInterActiveAuth-ZNRGWBLV.js → validateNonInterActiveAuth-LTEI2TB6.js} +76 -76
  233. package/chunks/{version-DBEQAFRW.js → version-G5A5DGVS.js} +1 -1
  234. package/chunks/{web-fetch-MBIVXKPE.js → web-fetch-RTEQTR5Z.js} +15 -15
  235. package/chunks/{web-search-4LBIN6VF.js → web-search-5OXHEZPV.js} +9 -9
  236. package/chunks/{workflow-LNMA55HY.js → workflow-ISQJHPG2.js} +39 -39
  237. package/chunks/{workspace-providers-status-PDDMI6ST.js → workspace-providers-status-2ZPZPUPZ.js} +47 -47
  238. package/chunks/{workspace-registration-store-BGRKKIYR.js → workspace-registration-store-CYNY6IP6.js} +2 -2
  239. package/chunks/{workspace-registry-L4NCJ34K.js → workspace-registry-34GTUUHB.js} +44 -43
  240. package/chunks/{workspace-service-LOXYKYTR.js → workspace-service-XCDQLE2Y.js} +50 -50
  241. package/chunks/{workspace-skills-status-IJ5FOQI6.js → workspace-skills-status-RS4O7AIJ.js} +45 -45
  242. package/chunks/{workspace-trust-reconciler-H36TCR2S.js → workspace-trust-reconciler-AYGXC7A3.js} +53 -52
  243. package/chunks/{write-file-JJAY7JSP.js → write-file-EWXKVVXF.js} +38 -38
  244. package/chunks/{zoom-image-4MVVVM7E.js → zoom-image-4BFYJ3HG.js} +11 -11
  245. package/cli.js +13 -13
  246. package/package.json +3 -3
  247. package/web-shell/assets/{arc-B-89zHN4.js → arc-CgOpDKvm.js} +1 -1
  248. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BkcOncHk.js → architectureDiagram-3BPJPVTR-0Ag_m34F.js} +1 -1
  249. package/web-shell/assets/{blockDiagram-GPEHLZMM-DQ4yboaF.js → blockDiagram-GPEHLZMM-IwTwFau0.js} +1 -1
  250. package/web-shell/assets/{c4Diagram-AAUBKEIU-C_8ZjPDI.js → c4Diagram-AAUBKEIU-DLa5GUv8.js} +1 -1
  251. package/web-shell/assets/channel-BrGVBa2L.js +1 -0
  252. package/web-shell/assets/{chunk-2J33WTMH-naKVe1Bm.js → chunk-2J33WTMH-DcYP-WFG.js} +1 -1
  253. package/web-shell/assets/{chunk-4BX2VUAB-DdoViKT2.js → chunk-4BX2VUAB-C8MVPMiQ.js} +1 -1
  254. package/web-shell/assets/{chunk-55IACEB6-DUDQZEwU.js → chunk-55IACEB6-BUi4Yfv3.js} +1 -1
  255. package/web-shell/assets/{chunk-727SXJPM-BqpDTR5s.js → chunk-727SXJPM-Cy3Su2YY.js} +1 -1
  256. package/web-shell/assets/{chunk-AQP2D5EJ-CdmEknkT.js → chunk-AQP2D5EJ-Dp8Teqv6.js} +1 -1
  257. package/web-shell/assets/{chunk-FMBD7UC4-CH7fFTLB.js → chunk-FMBD7UC4-BDTDM-4j.js} +1 -1
  258. package/web-shell/assets/{chunk-ND2GUHAM-ObgSuFKF.js → chunk-ND2GUHAM-7HfDt0r2.js} +1 -1
  259. package/web-shell/assets/{chunk-QZHKN3VN-D9fKdv_s.js → chunk-QZHKN3VN-BIBU0uCF.js} +1 -1
  260. package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +1 -0
  261. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +1 -0
  262. package/web-shell/assets/{cose-bilkent-S5V4N54A-CvzATMx9.js → cose-bilkent-S5V4N54A-DRLdcg9p.js} +1 -1
  263. package/web-shell/assets/{dagre-BM42HDAG-M_xU21QW.js → dagre-BM42HDAG-DCCgDwqW.js} +1 -1
  264. package/web-shell/assets/{diagram-2AECGRRQ-CNrl9sW1.js → diagram-2AECGRRQ-CsBTBmk3.js} +1 -1
  265. package/web-shell/assets/{diagram-5GNKFQAL-CUweVT6T.js → diagram-5GNKFQAL-C9qjH8Lt.js} +1 -1
  266. package/web-shell/assets/{diagram-KO2AKTUF-D3n6Lxjo.js → diagram-KO2AKTUF-Brjs_lj2.js} +1 -1
  267. package/web-shell/assets/{diagram-LMA3HP47-0SeFPK4t.js → diagram-LMA3HP47-DtiWCl_F.js} +1 -1
  268. package/web-shell/assets/{diagram-OG6HWLK6-DAgyEwge.js → diagram-OG6HWLK6-DmfKLkBT.js} +1 -1
  269. package/web-shell/assets/{erDiagram-TEJ5UH35-CzxBBDIK.js → erDiagram-TEJ5UH35-Bve_4deH.js} +1 -1
  270. package/web-shell/assets/{flowDiagram-I6XJVG4X-B0uj0jyo.js → flowDiagram-I6XJVG4X-C2_kXCcV.js} +1 -1
  271. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DFzcj5km.js → ganttDiagram-6RSMTGT7-BSBIjiTF.js} +1 -1
  272. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DylJ_Fc9.js → gitGraphDiagram-PVQCEYII-CyebwI55.js} +1 -1
  273. package/web-shell/assets/index-CIDsgxTe.js +1792 -0
  274. package/web-shell/assets/{index-BIGQygTL.css → index-DiQnWi_E.css} +1 -1
  275. package/web-shell/assets/{index-BKSAnXU9.js → index-d0yfnV1M.js} +1 -1
  276. package/web-shell/assets/{infoDiagram-5YYISTIA-BYMcJVMI.js → infoDiagram-5YYISTIA-CSDGnWxU.js} +1 -1
  277. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-t1quI1S3.js → ishikawaDiagram-YF4QCWOH-BK4jU13p.js} +1 -1
  278. package/web-shell/assets/{journeyDiagram-JHISSGLW-YM_QVUJm.js → journeyDiagram-JHISSGLW-D_W6j-oF.js} +1 -1
  279. package/web-shell/assets/{kanban-definition-UN3LZRKU-jw8OddK1.js → kanban-definition-UN3LZRKU-C7xf-SdC.js} +1 -1
  280. package/web-shell/assets/{linear-Dlr3RVuP.js → linear-DQmzxpxd.js} +1 -1
  281. package/web-shell/assets/{mermaid.core-CqGKzNzd.js → mermaid.core-9P7AGOLG.js} +5 -5
  282. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BqureoOS.js → mindmap-definition-RKZ34NQL-DgcgMyPk.js} +1 -1
  283. package/web-shell/assets/{pieDiagram-4H26LBE5-Da20HkK1.js → pieDiagram-4H26LBE5-3wWGb9eG.js} +1 -1
  284. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BsNlMvJy.js → quadrantDiagram-W4KKPZXB-BeCXnQw9.js} +1 -1
  285. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DzVCQCse.js → requirementDiagram-4Y6WPE33-Bi1UOHDz.js} +1 -1
  286. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BMo16voT.js → sankeyDiagram-5OEKKPKP-lrLUjjbb.js} +1 -1
  287. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Bgi-pdHk.js → sequenceDiagram-3UESZ5HK-BFuqKz6Q.js} +1 -1
  288. package/web-shell/assets/{stateDiagram-AJRCARHV-xaPQXwGk.js → stateDiagram-AJRCARHV-8DemQLhu.js} +1 -1
  289. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +1 -0
  290. package/web-shell/assets/{timeline-definition-PNZ67QCA-C_9RuvKG.js → timeline-definition-PNZ67QCA-uzEuVQXg.js} +1 -1
  291. package/web-shell/assets/{vennDiagram-CIIHVFJN-Bgu6vdla.js → vennDiagram-CIIHVFJN-BQTeZ_-o.js} +1 -1
  292. package/web-shell/assets/{wardley-L42UT6IY-CFTZ8IrX.js → wardley-L42UT6IY-B6yM5Im7.js} +1 -1
  293. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BASW9Vmt.js → wardleyDiagram-YWT4CUSO-ChM8bmgn.js} +1 -1
  294. package/web-shell/assets/{xychartDiagram-2RQKCTM6--Nh-CD3F.js → xychartDiagram-2RQKCTM6-oNG6HyB1.js} +1 -1
  295. package/web-shell/index.html +2 -2
  296. package/chunks/discovery-XLHITE74.js +0 -220
  297. package/web-shell/assets/channel-Du2WFns8.js +0 -1
  298. package/web-shell/assets/classDiagram-4FO5ZUOK-Zw0HafH6.js +0 -1
  299. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Zw0HafH6.js +0 -1
  300. package/web-shell/assets/index-J7OMTqAN.js +0 -1789
  301. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-D5RqimXD.js +0 -1
  302. package/chunks/{chunk-SYHXR6WM.js → chunk-4W5U2TUT.js} +3 -3
  303. /package/chunks/{chunk-OK47XBYH.js → chunk-A4QRWUDE.js} +0 -0
@@ -0,0 +1,488 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ LIVE_HOST_PROTOCOL_VERSION
5
+ } from "./chunk-NKLP3DCK.js";
6
+ import {
7
+ init_esbuild_shims
8
+ } from "./chunk-5O2XNYP6.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-J2S4EL5Y.js";
12
+
13
+ // packages/cli/src/serve/live/discovery.ts
14
+ init_esbuild_shims();
15
+ import { randomUUID } from "node:crypto";
16
+ import { constants as fsConstants } from "node:fs";
17
+ import * as fs from "node:fs/promises";
18
+ import { isIP } from "node:net";
19
+ import { homedir } from "node:os";
20
+ import * as path from "node:path";
21
+ var LIVE_DISCOVERY_RELATIVE_PATH = path.join("live", "daemon.json");
22
+ var MAX_DISCOVERY_BYTES = 16 * 1024;
23
+ var NONCE_PATTERN = /^[A-Za-z0-9_-]{16,256}$/;
24
+ var DEFAULT_HANDOFF_GRACE_MS = 1e3;
25
+ var LOCK_OPTIONS = {
26
+ realpath: false,
27
+ stale: 1e4,
28
+ update: 2e3,
29
+ retries: {
30
+ retries: 120,
31
+ minTimeout: 10,
32
+ maxTimeout: 100,
33
+ factor: 1.2,
34
+ randomize: true
35
+ }
36
+ };
37
+ var LiveDiscoveryOwnerActiveError = class extends Error {
38
+ constructor(ownerPid) {
39
+ super(`Live discovery is owned by active daemon pid ${ownerPid}.`);
40
+ this.ownerPid = ownerPid;
41
+ this.name = "LiveDiscoveryOwnerActiveError";
42
+ }
43
+ static {
44
+ __name(this, "LiveDiscoveryOwnerActiveError");
45
+ }
46
+ };
47
+ var LiveDiscoveryStateError = class extends Error {
48
+ static {
49
+ __name(this, "LiveDiscoveryStateError");
50
+ }
51
+ constructor(cause) {
52
+ super("Existing Live discovery record is invalid.", { cause });
53
+ this.name = "LiveDiscoveryStateError";
54
+ }
55
+ };
56
+ var LiveDiscoveryPublicationError = class extends Error {
57
+ static {
58
+ __name(this, "LiveDiscoveryPublicationError");
59
+ }
60
+ published = true;
61
+ constructor(cause) {
62
+ super("Live discovery publication completed with cleanup errors.", {
63
+ cause
64
+ });
65
+ this.name = "LiveDiscoveryPublicationError";
66
+ }
67
+ };
68
+ function getStableLiveDiscoveryBaseDir(homeDirectory = homedir()) {
69
+ return path.join(homeDirectory, ".qwen");
70
+ }
71
+ __name(getStableLiveDiscoveryBaseDir, "getStableLiveDiscoveryBaseDir");
72
+ function getLiveDiscoveryPath(runtimeBaseDir) {
73
+ return path.join(runtimeBaseDir, LIVE_DISCOVERY_RELATIVE_PATH);
74
+ }
75
+ __name(getLiveDiscoveryPath, "getLiveDiscoveryPath");
76
+ function assertSafeRecord(record) {
77
+ if (typeof record.url !== "string" || typeof record.instanceNonce !== "string" || record.token !== void 0 && typeof record.token !== "string") {
78
+ throw new Error("Live discovery record is invalid.");
79
+ }
80
+ let url;
81
+ try {
82
+ url = new URL(record.url);
83
+ } catch {
84
+ throw new Error("Live discovery URL is invalid.");
85
+ }
86
+ const hostname = url.hostname.replace(/^\[|\]$/g, "").toLowerCase();
87
+ const loopback = hostname === "localhost" || hostname === "::1" || isIP(hostname) === 4 && hostname.startsWith("127.");
88
+ if (url.protocol !== "http:" && url.protocol !== "https:" || !loopback || url.username.length > 0 || url.password.length > 0) {
89
+ throw new Error("Live discovery URL must be a loopback HTTP URL.");
90
+ }
91
+ if (!Number.isSafeInteger(record.protocolVersion) || record.protocolVersion <= 0 || !Number.isSafeInteger(record.pid) || record.pid <= 0 || !NONCE_PATTERN.test(record.instanceNonce) || record.token !== void 0 && (record.token.length === 0 || record.token.length > 4096)) {
92
+ throw new Error("Live discovery record is invalid.");
93
+ }
94
+ }
95
+ __name(assertSafeRecord, "assertSafeRecord");
96
+ function assertRecord(record) {
97
+ assertSafeRecord(record);
98
+ if (record.protocolVersion !== LIVE_HOST_PROTOCOL_VERSION) {
99
+ throw new Error("Live discovery record is invalid.");
100
+ }
101
+ }
102
+ __name(assertRecord, "assertRecord");
103
+ function processIsAlive(pid) {
104
+ try {
105
+ process.kill(pid, 0);
106
+ return true;
107
+ } catch (error) {
108
+ return error.code !== "ESRCH";
109
+ }
110
+ }
111
+ __name(processIsAlive, "processIsAlive");
112
+ function delay(milliseconds) {
113
+ return new Promise((resolve) => {
114
+ setTimeout(resolve, milliseconds);
115
+ });
116
+ }
117
+ __name(delay, "delay");
118
+ async function readExistingRecord(filePath) {
119
+ let stat;
120
+ try {
121
+ stat = await fs.lstat(filePath);
122
+ } catch (error) {
123
+ if (error.code === "ENOENT") return void 0;
124
+ throw error;
125
+ }
126
+ if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink !== 1 || process.platform !== "win32" && ((stat.mode & 511) !== 384 || typeof process.getuid === "function" && stat.uid !== process.getuid()) || stat.size <= 0 || stat.size > MAX_DISCOVERY_BYTES) {
127
+ throw new LiveDiscoveryStateError();
128
+ }
129
+ let handle;
130
+ try {
131
+ handle = await fs.open(
132
+ filePath,
133
+ process.platform === "win32" ? fsConstants.O_RDONLY : fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW
134
+ );
135
+ } catch {
136
+ throw new LiveDiscoveryStateError();
137
+ }
138
+ try {
139
+ const handleStat = await handle.stat();
140
+ if (!handleStat.isFile() || handleStat.nlink !== 1 || handleStat.dev !== stat.dev || handleStat.ino !== stat.ino || handleStat.size !== stat.size || process.platform !== "win32" && ((handleStat.mode & 511) !== 384 || typeof process.getuid === "function" && handleStat.uid !== process.getuid())) {
141
+ throw new LiveDiscoveryStateError();
142
+ }
143
+ let parsed;
144
+ try {
145
+ parsed = JSON.parse(await handle.readFile("utf8"));
146
+ } catch {
147
+ throw new LiveDiscoveryStateError();
148
+ }
149
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
150
+ throw new LiveDiscoveryStateError();
151
+ }
152
+ const record = parsed;
153
+ try {
154
+ assertSafeRecord(record);
155
+ } catch {
156
+ throw new LiveDiscoveryStateError();
157
+ }
158
+ return record;
159
+ } finally {
160
+ await handle.close();
161
+ }
162
+ }
163
+ __name(readExistingRecord, "readExistingRecord");
164
+ async function inspectDirectory(directory, requirePrivateMode = true) {
165
+ const stat = await fs.lstat(directory);
166
+ if (!stat.isDirectory() || stat.isSymbolicLink() || process.platform !== "win32" && (requirePrivateMode && (stat.mode & 511) !== 448 || typeof process.getuid === "function" && stat.uid !== process.getuid())) {
167
+ throw new LiveDiscoveryStateError();
168
+ }
169
+ return { directory, dev: stat.dev, ino: stat.ino };
170
+ }
171
+ __name(inspectDirectory, "inspectDirectory");
172
+ async function assertDirectoryIdentity(expected, requirePrivateMode = true) {
173
+ const current = await inspectDirectory(
174
+ expected.directory,
175
+ requirePrivateMode
176
+ );
177
+ if (current.dev !== expected.dev || current.ino !== expected.ino) {
178
+ throw new LiveDiscoveryStateError();
179
+ }
180
+ }
181
+ __name(assertDirectoryIdentity, "assertDirectoryIdentity");
182
+ async function ensureDirectory(directory, requirePrivateMode) {
183
+ try {
184
+ return await inspectDirectory(directory, requirePrivateMode);
185
+ } catch (error) {
186
+ try {
187
+ await fs.lstat(directory);
188
+ throw error;
189
+ } catch (statError) {
190
+ if (statError.code !== "ENOENT") throw error;
191
+ }
192
+ }
193
+ const parent = path.dirname(directory);
194
+ if (parent === directory) throw new LiveDiscoveryStateError();
195
+ const parentIdentity = await ensureDirectory(parent, false);
196
+ await assertDirectoryIdentity(parentIdentity, false);
197
+ let created = false;
198
+ try {
199
+ await fs.mkdir(directory, { mode: 448 });
200
+ created = true;
201
+ } catch (error) {
202
+ if (error.code !== "EEXIST") throw error;
203
+ }
204
+ if (created && process.platform !== "win32") {
205
+ await fs.chmod(directory, 448);
206
+ }
207
+ await assertDirectoryIdentity(parentIdentity, false);
208
+ return inspectDirectory(directory, requirePrivateMode);
209
+ }
210
+ __name(ensureDirectory, "ensureDirectory");
211
+ async function assertLockShapeIfPresent(lockPath) {
212
+ let stat;
213
+ try {
214
+ stat = await fs.lstat(lockPath);
215
+ } catch (error) {
216
+ if (error.code === "ENOENT") return;
217
+ throw error;
218
+ }
219
+ if (!stat.isDirectory() || stat.isSymbolicLink() || process.platform !== "win32" && typeof process.getuid === "function" && stat.uid !== process.getuid()) {
220
+ throw new LiveDiscoveryStateError();
221
+ }
222
+ }
223
+ __name(assertLockShapeIfPresent, "assertLockShapeIfPresent");
224
+ async function prepareDirectory(runtimeBaseDir, create = true) {
225
+ const directory = path.dirname(getLiveDiscoveryPath(runtimeBaseDir));
226
+ let runtimeBaseIdentity;
227
+ try {
228
+ runtimeBaseIdentity = await inspectDirectory(runtimeBaseDir, false);
229
+ } catch (error) {
230
+ try {
231
+ await fs.lstat(runtimeBaseDir);
232
+ throw error;
233
+ } catch (statError) {
234
+ if (statError.code !== "ENOENT") throw error;
235
+ }
236
+ if (!create) return void 0;
237
+ runtimeBaseIdentity = await ensureDirectory(runtimeBaseDir, false);
238
+ }
239
+ let created = false;
240
+ try {
241
+ const identity = await inspectDirectory(directory);
242
+ await assertDirectoryIdentity(runtimeBaseIdentity, false);
243
+ return identity;
244
+ } catch (error) {
245
+ try {
246
+ await fs.lstat(directory);
247
+ throw error;
248
+ } catch (statError) {
249
+ if (statError.code !== "ENOENT") throw error;
250
+ }
251
+ }
252
+ if (!create) return void 0;
253
+ await assertDirectoryIdentity(runtimeBaseIdentity, false);
254
+ try {
255
+ await fs.mkdir(directory, { mode: 448 });
256
+ created = true;
257
+ } catch (error) {
258
+ if (error.code !== "EEXIST") throw error;
259
+ }
260
+ if (created && process.platform !== "win32") {
261
+ await fs.chmod(directory, 448);
262
+ }
263
+ await assertDirectoryIdentity(runtimeBaseIdentity, false);
264
+ return inspectDirectory(directory);
265
+ }
266
+ __name(prepareDirectory, "prepareDirectory");
267
+ async function lockDirectory(target) {
268
+ const lockPath = path.join(target.directory, ".daemon.lock");
269
+ await assertLockShapeIfPresent(lockPath);
270
+ const lockfile = (await import("./proper-lockfile-3LHWIM44.js")).default;
271
+ let compromised = false;
272
+ const release = await lockfile.lock(target.directory, {
273
+ ...LOCK_OPTIONS,
274
+ lockfilePath: lockPath,
275
+ onCompromised: /* @__PURE__ */ __name(() => {
276
+ compromised = true;
277
+ }, "onCompromised")
278
+ });
279
+ try {
280
+ await assertLockShapeIfPresent(lockPath);
281
+ } catch (error) {
282
+ let releaseError;
283
+ await release().catch((candidate) => {
284
+ releaseError = candidate;
285
+ });
286
+ throw new LiveDiscoveryStateError(
287
+ releaseError ? new AggregateError(
288
+ [error, releaseError],
289
+ "Live discovery lock validation cleanup failed."
290
+ ) : error
291
+ );
292
+ }
293
+ return {
294
+ release,
295
+ assertHealthy: /* @__PURE__ */ __name(() => {
296
+ if (compromised) throw new LiveDiscoveryStateError();
297
+ }, "assertHealthy")
298
+ };
299
+ }
300
+ __name(lockDirectory, "lockDirectory");
301
+ async function syncDirectory(directory) {
302
+ if (process.platform === "win32") return;
303
+ const handle = await fs.open(directory, "r");
304
+ try {
305
+ await handle.sync();
306
+ } finally {
307
+ await handle.close();
308
+ }
309
+ }
310
+ __name(syncDirectory, "syncDirectory");
311
+ async function handoffLiveDiscoveryOwner(runtimeBaseDir, owner, commitOwner, options = {}) {
312
+ const target = await prepareDirectory(runtimeBaseDir, false);
313
+ if (!target) {
314
+ await commitOwner();
315
+ return { reclaimed: false };
316
+ }
317
+ const lock = await lockDirectory(target);
318
+ let result;
319
+ let operationError;
320
+ try {
321
+ lock.assertHealthy();
322
+ await assertDirectoryIdentity(target);
323
+ const filePath = getLiveDiscoveryPath(runtimeBaseDir);
324
+ const current = await readExistingRecord(filePath);
325
+ if (current && (current.pid !== owner.pid || current.instanceNonce !== owner.instanceNonce)) {
326
+ if (current.pid === owner.pid || (options.isProcessAlive ?? processIsAlive)(current.pid)) {
327
+ throw new LiveDiscoveryOwnerActiveError(current.pid);
328
+ }
329
+ await commitOwner();
330
+ lock.assertHealthy();
331
+ await assertDirectoryIdentity(target);
332
+ const confirmed = await readExistingRecord(filePath);
333
+ if (!confirmed || confirmed.pid !== current.pid || confirmed.instanceNonce !== current.instanceNonce) {
334
+ throw new LiveDiscoveryStateError();
335
+ }
336
+ lock.assertHealthy();
337
+ await assertDirectoryIdentity(target);
338
+ await fs.unlink(filePath);
339
+ await syncDirectory(target.directory);
340
+ lock.assertHealthy();
341
+ result = { reclaimed: true };
342
+ } else {
343
+ await commitOwner();
344
+ lock.assertHealthy();
345
+ result = { reclaimed: false };
346
+ }
347
+ } catch (error) {
348
+ operationError = error;
349
+ }
350
+ let releaseError;
351
+ await lock.release().catch((error) => {
352
+ releaseError = error;
353
+ });
354
+ if (releaseError) {
355
+ throw new LiveDiscoveryStateError(
356
+ operationError ? new AggregateError(
357
+ [operationError, releaseError],
358
+ "Live discovery handoff cleanup failed."
359
+ ) : releaseError
360
+ );
361
+ }
362
+ if (operationError) throw operationError;
363
+ if (result?.reclaimed && options.waitForHandoffGrace !== false) {
364
+ await (options.wait ?? delay)(
365
+ options.handoffGraceMs ?? DEFAULT_HANDOFF_GRACE_MS
366
+ );
367
+ }
368
+ return result;
369
+ }
370
+ __name(handoffLiveDiscoveryOwner, "handoffLiveDiscoveryOwner");
371
+ async function writeLiveDiscoveryFile(runtimeBaseDir, record, options = {}) {
372
+ assertRecord(record);
373
+ const target = await prepareDirectory(runtimeBaseDir);
374
+ if (!target) throw new LiveDiscoveryStateError();
375
+ const { directory } = target;
376
+ const filePath = getLiveDiscoveryPath(runtimeBaseDir);
377
+ const temporaryPath = path.join(
378
+ directory,
379
+ `.daemon.${process.pid}.${randomUUID()}.tmp`
380
+ );
381
+ const lock = await lockDirectory(target);
382
+ let handle;
383
+ let operationError;
384
+ let operationSucceeded = false;
385
+ let published = false;
386
+ try {
387
+ lock.assertHealthy();
388
+ await assertDirectoryIdentity(target);
389
+ const current = await readExistingRecord(filePath);
390
+ if (current && (current.pid !== record.pid || current.instanceNonce !== record.instanceNonce)) {
391
+ if ((options.isProcessAlive ?? processIsAlive)(current.pid)) {
392
+ throw new LiveDiscoveryOwnerActiveError(current.pid);
393
+ }
394
+ throw new LiveDiscoveryStateError();
395
+ }
396
+ handle = await fs.open(temporaryPath, "wx", 384);
397
+ const serialized = `${JSON.stringify(record)}
398
+ `;
399
+ if (Buffer.byteLength(serialized) > MAX_DISCOVERY_BYTES) {
400
+ throw new Error("Live discovery record is too large.");
401
+ }
402
+ await handle.writeFile(serialized, "utf8");
403
+ await handle.chmod(384);
404
+ await handle.sync();
405
+ await handle.close();
406
+ handle = void 0;
407
+ lock.assertHealthy();
408
+ await assertDirectoryIdentity(target);
409
+ await fs.rename(temporaryPath, filePath);
410
+ published = true;
411
+ await syncDirectory(directory);
412
+ lock.assertHealthy();
413
+ operationSucceeded = true;
414
+ } catch (error) {
415
+ operationError = error;
416
+ }
417
+ const cleanupErrors = [];
418
+ await handle?.close().catch((error) => cleanupErrors.push(error));
419
+ await fs.unlink(temporaryPath).catch((error) => {
420
+ if (error.code !== "ENOENT") cleanupErrors.push(error);
421
+ });
422
+ await lock.release().catch((error) => cleanupErrors.push(error));
423
+ if (!operationSucceeded) {
424
+ const cause = cleanupErrors.length > 0 ? new AggregateError(
425
+ [operationError, ...cleanupErrors],
426
+ "Live discovery publication cleanup failed."
427
+ ) : operationError;
428
+ if (published) throw new LiveDiscoveryPublicationError(cause);
429
+ if (cleanupErrors.length > 0) {
430
+ throw cause;
431
+ }
432
+ throw operationError;
433
+ }
434
+ if (cleanupErrors.length > 0) {
435
+ throw new LiveDiscoveryPublicationError(
436
+ new AggregateError(
437
+ cleanupErrors,
438
+ "Live discovery publication cleanup failed."
439
+ )
440
+ );
441
+ }
442
+ return filePath;
443
+ }
444
+ __name(writeLiveDiscoveryFile, "writeLiveDiscoveryFile");
445
+ async function removeLiveDiscoveryFile(runtimeBaseDir, owner) {
446
+ if (!NONCE_PATTERN.test(owner.instanceNonce) || !Number.isSafeInteger(owner.pid) || owner.pid <= 0) {
447
+ throw new LiveDiscoveryStateError();
448
+ }
449
+ const target = await prepareDirectory(runtimeBaseDir, false);
450
+ if (!target) return false;
451
+ const filePath = getLiveDiscoveryPath(runtimeBaseDir);
452
+ const lock = await lockDirectory(target);
453
+ try {
454
+ lock.assertHealthy();
455
+ await assertDirectoryIdentity(target);
456
+ const current = await readExistingRecord(filePath);
457
+ if (!current) return false;
458
+ if (current.instanceNonce !== owner.instanceNonce || current.pid !== owner.pid) {
459
+ throw new LiveDiscoveryStateError();
460
+ }
461
+ lock.assertHealthy();
462
+ await assertDirectoryIdentity(target);
463
+ await fs.unlink(filePath);
464
+ await syncDirectory(target.directory);
465
+ lock.assertHealthy();
466
+ return true;
467
+ } finally {
468
+ await lock.release();
469
+ }
470
+ }
471
+ __name(removeLiveDiscoveryFile, "removeLiveDiscoveryFile");
472
+
473
+ export {
474
+ LIVE_DISCOVERY_RELATIVE_PATH,
475
+ LiveDiscoveryOwnerActiveError,
476
+ LiveDiscoveryStateError,
477
+ LiveDiscoveryPublicationError,
478
+ getStableLiveDiscoveryBaseDir,
479
+ getLiveDiscoveryPath,
480
+ handoffLiveDiscoveryOwner,
481
+ writeLiveDiscoveryFile,
482
+ removeLiveDiscoveryFile
483
+ };
484
+ /**
485
+ * @license
486
+ * Copyright 2026 Qwen Team
487
+ * SPDX-License-Identifier: Apache-2.0
488
+ */
@@ -2,26 +2,26 @@
2
2
  "use strict";
3
3
  import {
4
4
  getExtensionManager
5
- } from "./chunk-IH4Z54RJ.js";
5
+ } from "./chunk-QV5YN5YD.js";
6
6
  import {
7
7
  parseChannelConfig
8
- } from "./chunk-BSR5AXZR.js";
8
+ } from "./chunk-OD2WU5QY.js";
9
9
  import {
10
10
  getPlugin,
11
11
  registerPlugin
12
- } from "./chunk-OK47XBYH.js";
12
+ } from "./chunk-A4QRWUDE.js";
13
13
  import {
14
14
  sanitizeLogText
15
15
  } from "./chunk-AW27A43Y.js";
16
16
  import {
17
17
  loadSettings
18
- } from "./chunk-3GDBZJD6.js";
18
+ } from "./chunk-A267JX7H.js";
19
19
  import {
20
20
  hashDaemonWorkspace
21
- } from "./chunk-K34GJQOZ.js";
21
+ } from "./chunk-TIGA2IVL.js";
22
22
  import {
23
23
  Storage
24
- } from "./chunk-HOSVOUDK.js";
24
+ } from "./chunk-BUQDLC2G.js";
25
25
  import {
26
26
  writeStderrLine,
27
27
  writeStdoutLine
@@ -3,18 +3,18 @@
3
3
  import {
4
4
  require_semver
5
5
  } from "./chunk-2AUM35J5.js";
6
- import {
7
- t
8
- } from "./chunk-IRSLAS4M.js";
9
6
  import {
10
7
  getNpmCliPath
11
- } from "./chunk-7KJPO7YH.js";
8
+ } from "./chunk-BKPPWD33.js";
9
+ import {
10
+ t
11
+ } from "./chunk-HUTNYWBG.js";
12
12
  import {
13
13
  getPackageJson
14
14
  } from "./chunk-WZMH7II3.js";
15
15
  import {
16
16
  createDebugLogger
17
- } from "./chunk-HOSVOUDK.js";
17
+ } from "./chunk-BUQDLC2G.js";
18
18
  import {
19
19
  init_esbuild_shims
20
20
  } from "./chunk-5O2XNYP6.js";
@@ -2,20 +2,20 @@
2
2
  "use strict";
3
3
  import {
4
4
  performStandaloneUpdate
5
- } from "./chunk-OPVF453Q.js";
5
+ } from "./chunk-NEFOOD54.js";
6
6
  import {
7
7
  updateEventEmitter
8
8
  } from "./chunk-YAF2MQZ6.js";
9
- import {
10
- t
11
- } from "./chunk-IRSLAS4M.js";
12
9
  import {
13
10
  getInstallationInfo,
14
11
  resolveUpdateCommand
15
- } from "./chunk-7KJPO7YH.js";
12
+ } from "./chunk-BKPPWD33.js";
13
+ import {
14
+ t
15
+ } from "./chunk-HUTNYWBG.js";
16
16
  import {
17
17
  createDebugLogger
18
- } from "./chunk-HOSVOUDK.js";
18
+ } from "./chunk-BUQDLC2G.js";
19
19
  import {
20
20
  init_esbuild_shims
21
21
  } from "./chunk-5O2XNYP6.js";
@@ -5,7 +5,7 @@ import {
5
5
  BaseToolInvocation,
6
6
  ToolDisplayNames,
7
7
  ToolNames
8
- } from "./chunk-YIGGWOJE.js";
8
+ } from "./chunk-6HY6IF3Z.js";
9
9
  import {
10
10
  init_esbuild_shims
11
11
  } from "./chunk-5O2XNYP6.js";
@@ -2,17 +2,17 @@
2
2
  "use strict";
3
3
  import {
4
4
  functionResponsePartsToString
5
- } from "./chunk-QSD4UH74.js";
5
+ } from "./chunk-NNHNLJ2X.js";
6
6
  import {
7
7
  projectJsonStringToByteBudget
8
- } from "./chunk-UI5UGEF4.js";
8
+ } from "./chunk-RLKC46YT.js";
9
9
  import {
10
10
  parseAndFormatApiError
11
- } from "./chunk-EBPLKY6U.js";
11
+ } from "./chunk-4S5337WV.js";
12
12
  import {
13
13
  formatVisionBridgeNoticeDisplay,
14
14
  isVisionBridgeNoticeDisplay
15
- } from "./chunk-4KM2SYK5.js";
15
+ } from "./chunk-RVOJ2FBP.js";
16
16
  import {
17
17
  init_esbuild_shims
18
18
  } from "./chunk-5O2XNYP6.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  BaseJsonOutputAdapter
5
- } from "./chunk-MUNA4QDC.js";
5
+ } from "./chunk-UZPM4XHR.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-5O2XNYP6.js";
@@ -9,7 +9,7 @@ import {
9
9
  relaxSchemaForFunctionCalling,
10
10
  safeJsonParse,
11
11
  setGenAiUsageProvenance
12
- } from "./chunk-QLTATTPS.js";
12
+ } from "./chunk-5CVO7YES.js";
13
13
  import {
14
14
  setToolCallPreparations
15
15
  } from "./chunk-GLCZKT5V.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-46UV252V.js";
22
22
  import {
23
23
  createDebugLogger
24
- } from "./chunk-HOSVOUDK.js";
24
+ } from "./chunk-BUQDLC2G.js";
25
25
  import {
26
26
  FinishReason,
27
27
  GenerateContentResponse
@@ -2,11 +2,11 @@
2
2
  "use strict";
3
3
  import {
4
4
  createTask
5
- } from "./chunk-YILJKX2T.js";
5
+ } from "./chunk-CKSJECTU.js";
6
6
  import {
7
7
  getPlanRequiredTeammatePreApprovalMessage,
8
8
  isPlanRequiredTeammateAwaitingApproval
9
- } from "./chunk-63FNZTWG.js";
9
+ } from "./chunk-RWDNJBWN.js";
10
10
  import {
11
11
  resolveActiveTeamName
12
12
  } from "./chunk-S6LOFUVP.js";
@@ -15,7 +15,7 @@ import {
15
15
  BaseToolInvocation,
16
16
  ToolDisplayNames,
17
17
  ToolNames
18
- } from "./chunk-YIGGWOJE.js";
18
+ } from "./chunk-6HY6IF3Z.js";
19
19
  import {
20
20
  init_esbuild_shims
21
21
  } from "./chunk-5O2XNYP6.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  expandHomeDir
5
- } from "./chunk-HOSVOUDK.js";
5
+ } from "./chunk-BUQDLC2G.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-5O2XNYP6.js";
@@ -2,20 +2,20 @@
2
2
  "use strict";
3
3
  import {
4
4
  getInboxesDir
5
- } from "./chunk-D2RNVVH6.js";
5
+ } from "./chunk-OVZPVYZB.js";
6
6
  import {
7
7
  require_proper_lockfile
8
- } from "./chunk-KRXPRVGL.js";
8
+ } from "./chunk-MLXTMF7H.js";
9
9
  import {
10
10
  Mutex
11
11
  } from "./chunk-VGC4I5JJ.js";
12
12
  import {
13
13
  atomicWriteJSON
14
- } from "./chunk-YBHUXEC6.js";
14
+ } from "./chunk-FDGGZIYW.js";
15
15
  import {
16
16
  createDebugLogger,
17
17
  isNodeError
18
- } from "./chunk-HOSVOUDK.js";
18
+ } from "./chunk-BUQDLC2G.js";
19
19
  import {
20
20
  init_esbuild_shims
21
21
  } from "./chunk-5O2XNYP6.js";