@qwen-code/qwen-code 0.21.6-preview.0 → 0.21.7

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 (309) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +19 -9
  2. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
  3. package/bundled/qc-helper/docs/features/channels/github.md +31 -19
  4. package/bundled/qc-helper/docs/features/code-review.md +30 -1
  5. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  6. package/bundled/review/SKILL.md +59 -22
  7. package/chunks/{MaxSizedBox-A3UYJS6B.js → MaxSizedBox-ANWZBPTS.js} +38 -38
  8. package/chunks/{StandaloneSessionPicker-NGLY26I4.js → StandaloneSessionPicker-XKS3VU3A.js} +56 -55
  9. package/chunks/{acp-startup-profiler-3RICG2YW.js → acp-startup-profiler-ORIQ2CCQ.js} +2 -2
  10. package/chunks/{acpAgent-V54T2EEL.js → acpAgent-KUAZ3GCZ.js} +1091 -150
  11. package/chunks/{agent-2P53VL2L.js → agent-T6PTGX5R.js} +35 -35
  12. package/chunks/{agent-headless-6X4GCFRD.js → agent-headless-PR7YCB7S.js} +35 -35
  13. package/chunks/{anthropicContentGenerator-3CAHEZBM.js → anthropicContentGenerator-DTMVEL5M.js} +7 -7
  14. package/chunks/{artifact-tool-RROCCJDA.js → artifact-tool-U4VOZIK5.js} +2 -2
  15. package/chunks/{askUserQuestion-2EPPBPUZ.js → askUserQuestion-XOBQLPFA.js} +2 -2
  16. package/chunks/{bridge-TCFMLKHR.js → bridge-NU6YEEHK.js} +41 -41
  17. package/chunks/{channel-management-service-5XPPTWUQ.js → channel-management-service-FSQ7SHYI.js} +1 -1
  18. package/chunks/{channel-settings-store-B4HNMNQV.js → channel-settings-store-35VQVUVV.js} +42 -42
  19. package/chunks/{channel-worker-group-SVGPDH2C.js → channel-worker-group-JWQK224X.js} +5 -5
  20. package/chunks/{channel-worker-manager-72ZK2GTS.js → channel-worker-manager-77E3OXRQ.js} +5 -5
  21. package/chunks/{channel-worker-supervisor-NUEDVHX4.js → channel-worker-supervisor-62YWUGP2.js} +3 -3
  22. package/chunks/{chunk-XC656O42.js → chunk-22NBYCPD.js} +3 -3
  23. package/chunks/{chunk-WXS647W5.js → chunk-23RZCH76.js} +3 -3
  24. package/chunks/{chunk-O656RSMC.js → chunk-2U3WZGZG.js} +18 -10
  25. package/chunks/chunk-2VSTGY6M.js +107 -0
  26. package/chunks/{chunk-AU3XNTMV.js → chunk-33ACCIIY.js} +3 -3
  27. package/chunks/{chunk-MBEMTXQT.js → chunk-3K7FH2KQ.js} +1 -32
  28. package/chunks/{chunk-CJBRIJ7W.js → chunk-3NB7TSE2.js} +3 -3
  29. package/chunks/{chunk-QYPT3QUD.js → chunk-3ULCB3NE.js} +3 -3
  30. package/chunks/{chunk-7FUVSN4D.js → chunk-55LYDVPU.js} +1 -1
  31. package/chunks/{chunk-3ZRS2XNY.js → chunk-5KH532V7.js} +1 -1
  32. package/chunks/{chunk-P7LKADIT.js → chunk-6EOI4HOK.js} +7 -7
  33. package/chunks/{chunk-X6DV3WKN.js → chunk-6GONZVLS.js} +1 -1
  34. package/chunks/{chunk-T4XY5CT4.js → chunk-6HVUFDS2.js} +7 -7
  35. package/chunks/{chunk-5L6CQ4ZU.js → chunk-6M26GBKX.js} +2 -2
  36. package/chunks/{chunk-SPUDIAHX.js → chunk-6UWFTUQL.js} +530 -388
  37. package/chunks/{chunk-EKWNNQQD.js → chunk-6XJMFJ4D.js} +16 -10
  38. package/chunks/{chunk-72DZPDH4.js → chunk-6XU3PH66.js} +10 -5
  39. package/chunks/{chunk-WIPQR44Y.js → chunk-72LNFGUY.js} +3 -3
  40. package/chunks/{chunk-33FNCQSY.js → chunk-7MH4J33A.js} +2 -2
  41. package/chunks/{chunk-2AGOQ7QO.js → chunk-7UFKAV7Y.js} +118 -6
  42. package/chunks/{chunk-HKNSU4WX.js → chunk-AE77C5ZU.js} +198 -35
  43. package/chunks/{chunk-JELIWHXD.js → chunk-AOHJKPKL.js} +1 -1
  44. package/chunks/{chunk-GLNBDYUX.js → chunk-AXMWHKXA.js} +6 -2
  45. package/chunks/{chunk-H36SETQS.js → chunk-B2GJNDTV.js} +1 -1
  46. package/chunks/{chunk-QMBEW7EW.js → chunk-BGG4MBYD.js} +2 -2
  47. package/chunks/{chunk-QL4TN4HS.js → chunk-BRVWYMKV.js} +1 -1
  48. package/chunks/{chunk-6WBWIPBF.js → chunk-BVWVWGLE.js} +2 -2
  49. package/chunks/{chunk-WPKIU4PA.js → chunk-CB2464BK.js} +6 -6
  50. package/chunks/{chunk-2UISUFHQ.js → chunk-CJXIIILK.js} +3 -3
  51. package/chunks/{chunk-WK4TJUEA.js → chunk-CKASRHZI.js} +1 -1
  52. package/chunks/{chunk-Z7JILXGX.js → chunk-CNIID3TV.js} +3 -3
  53. package/chunks/{chunk-6KEN3RIC.js → chunk-CSZEXZBE.js} +3 -3
  54. package/chunks/{chunk-KKN2IE7Q.js → chunk-CTJLZLB5.js} +1 -1
  55. package/chunks/{chunk-5CDI4UOY.js → chunk-CXE7E23H.js} +131 -48
  56. package/chunks/{chunk-URJHXOSO.js → chunk-CYR3HI5X.js} +3 -3
  57. package/chunks/{chunk-546CDN6D.js → chunk-DBOFL3LQ.js} +3 -3
  58. package/chunks/{chunk-4LKVQFHM.js → chunk-DREZZAZM.js} +2 -2
  59. package/chunks/{chunk-2U7GPHA6.js → chunk-E33LOKRA.js} +1 -1
  60. package/chunks/{chunk-2DNKEBXY.js → chunk-EI3HZX6C.js} +1 -1
  61. package/chunks/{chunk-U25CMJYY.js → chunk-EKPKKXY2.js} +1 -1
  62. package/chunks/{chunk-QG2ACINA.js → chunk-EORNAQDT.js} +1 -1
  63. package/chunks/{chunk-432XCUHF.js → chunk-EQL65XGA.js} +1 -1
  64. package/chunks/{chunk-TYERNYH4.js → chunk-EUNWC2VS.js} +2 -2
  65. package/chunks/{chunk-CDHNGCJI.js → chunk-EUQTXRKZ.js} +7 -7
  66. package/chunks/{chunk-UH7Z7Y45.js → chunk-FOGU3LJX.js} +1 -1
  67. package/chunks/{chunk-BU4BRCPX.js → chunk-FPM27XN4.js} +5 -5
  68. package/chunks/{chunk-E4WHKETF.js → chunk-FVKHVJZQ.js} +2 -49
  69. package/chunks/{chunk-NKST54XA.js → chunk-FZBZSYKU.js} +1 -1
  70. package/chunks/{chunk-XZCMQUOF.js → chunk-GDXET5XU.js} +31 -3387
  71. package/chunks/{chunk-A5YZ3FA2.js → chunk-GM463R2B.js} +1 -1
  72. package/chunks/{chunk-MOHAWIAW.js → chunk-GNPNYXJB.js} +2 -2
  73. package/chunks/{chunk-AFZTZLFB.js → chunk-GSS34377.js} +3 -3
  74. package/chunks/{chunk-MVLM6PJK.js → chunk-H2UQ2M5Z.js} +6 -2
  75. package/chunks/{chunk-BK2UNYWD.js → chunk-HIBNSEJE.js} +12 -0
  76. package/chunks/{chunk-CXYBX4AL.js → chunk-HQB2KUAN.js} +1 -1
  77. package/chunks/{chunk-ZQL73PPE.js → chunk-HYRDKNUY.js} +2 -2
  78. package/chunks/{chunk-D7D7RXIJ.js → chunk-IC4Z6LX6.js} +1 -1
  79. package/chunks/{chunk-HU5TUALO.js → chunk-IIJEYBNH.js} +3 -3
  80. package/chunks/{chunk-DTAPI453.js → chunk-IUFV6FYU.js} +2 -2
  81. package/chunks/{chunk-MISUEWB4.js → chunk-J6SZID63.js} +12 -8
  82. package/chunks/{chunk-OWAK7LMW.js → chunk-KGJGEEVR.js} +7 -0
  83. package/chunks/{chunk-BFHXDAR7.js → chunk-KKBPOU75.js} +1 -1
  84. package/chunks/{chunk-XOZ2R6XI.js → chunk-KKJJB5X6.js} +3578 -1487
  85. package/chunks/{chunk-PQTK2FVO.js → chunk-KR4ZSC7K.js} +4 -4
  86. package/chunks/{chunk-NAYPZ72V.js → chunk-KXSDEOFU.js} +1 -1
  87. package/chunks/{chunk-MGSSJT27.js → chunk-L4N6TIP7.js} +5 -3
  88. package/chunks/{chunk-4T6QMNX2.js → chunk-LA7YLSR6.js} +185 -12
  89. package/chunks/{chunk-4E5PO6R7.js → chunk-LEMXGVEP.js} +4 -4
  90. package/chunks/{chunk-WVAESIM6.js → chunk-LZC3B5N2.js} +4 -4
  91. package/chunks/{chunk-6O5DVH27.js → chunk-M6HMMKVG.js} +1 -1
  92. package/chunks/{chunk-Z5S6KH2B.js → chunk-MAJS7AT4.js} +6 -6
  93. package/chunks/{chunk-XNZBXQCG.js → chunk-MKVZE4ZJ.js} +1 -1
  94. package/chunks/{chunk-I7JDGNG6.js → chunk-MVUQRLOH.js} +9 -5
  95. package/chunks/{chunk-GLWP3FDB.js → chunk-MZSJ43WV.js} +31 -2
  96. package/chunks/{chunk-ZPPP6VCL.js → chunk-NG2R4N5O.js} +1 -1
  97. package/chunks/chunk-NKLP3DCK.js +22 -0
  98. package/chunks/{chunk-WIRAPZ62.js → chunk-NLREQJFK.js} +7 -1
  99. package/chunks/{chunk-N47ZM2KI.js → chunk-OFI7IGST.js} +12 -12
  100. package/chunks/{chunk-DBIEZC7T.js → chunk-OH2VKQXH.js} +42 -16
  101. package/chunks/{chunk-C4GRKMUL.js → chunk-OHJLEW5J.js} +5 -5
  102. package/chunks/{chunk-3RXUYQJI.js → chunk-OIVKILPI.js} +49 -0
  103. package/chunks/{chunk-VDLXPEI5.js → chunk-OMKQH5C5.js} +3 -3
  104. package/chunks/{chunk-LBWNSLJK.js → chunk-ONSZH6VM.js} +2 -2
  105. package/chunks/{chunk-DYA25Y7U.js → chunk-OWMAZHIX.js} +1 -1
  106. package/chunks/{chunk-WAOLM6SQ.js → chunk-P2AJ7FTI.js} +1 -1
  107. package/chunks/{chunk-MFBUJMQ3.js → chunk-P3LEG54R.js} +4 -4
  108. package/chunks/{chunk-WVRJKSIG.js → chunk-PJOBIWUG.js} +1 -1
  109. package/chunks/{chunk-YUVTZ4UH.js → chunk-PQBHU2IA.js} +114 -18
  110. package/chunks/{chunk-GTM6IHBB.js → chunk-Q3JQ7OSU.js} +2 -1
  111. package/chunks/{chunk-IISDPZ5X.js → chunk-QETYKPMG.js} +1 -1
  112. package/chunks/{chunk-UKZEXS6K.js → chunk-R574ATRM.js} +11 -0
  113. package/chunks/{chunk-DOICUTPO.js → chunk-RERATVSK.js} +11 -10
  114. package/chunks/chunk-RGSBTHSU.js +3381 -0
  115. package/chunks/{chunk-6D6V55ZQ.js → chunk-RMH5OWLD.js} +1 -1
  116. package/chunks/{chunk-AVDEBBMI.js → chunk-RNVQB725.js} +2 -2
  117. package/chunks/{chunk-QWUYFMAR.js → chunk-RUL4S3K3.js} +87 -67
  118. package/chunks/{chunk-RTWF7FF7.js → chunk-RZHU3ILK.js} +5 -5
  119. package/chunks/{chunk-3DTM3RPU.js → chunk-S7CV4KO6.js} +3 -3
  120. package/chunks/{chunk-ZH7G3A4U.js → chunk-SCI7K3GM.js} +4 -4
  121. package/chunks/{chunk-YAVY33G4.js → chunk-SEZ556DZ.js} +1 -1
  122. package/chunks/{chunk-6KZP75GT.js → chunk-SHZYHGQH.js} +1 -1
  123. package/chunks/chunk-SOORFWKY.js +155 -0
  124. package/chunks/{chunk-NYZAL2W2.js → chunk-SPMY6CX6.js} +4 -4
  125. package/chunks/{chunk-EHMN6SEG.js → chunk-TDXGKHDN.js} +4 -4
  126. package/chunks/{chunk-XKTCA6BW.js → chunk-TLV2IMHR.js} +5 -5
  127. package/chunks/{chunk-XSGQKR37.js → chunk-TRLYP7OF.js} +358 -20
  128. package/chunks/{chunk-DG563ZCS.js → chunk-TYKC75AX.js} +3 -3
  129. package/chunks/{chunk-KVUBYJDM.js → chunk-TZEZYNYD.js} +1 -1
  130. package/chunks/{chunk-XC2VAFVZ.js → chunk-UVX4Y6IN.js} +1 -1
  131. package/chunks/{chunk-IKXE3AAC.js → chunk-VOARQPTA.js} +2 -2
  132. package/chunks/{chunk-TVFC3XF5.js → chunk-W4B7UBUS.js} +7 -7
  133. package/chunks/{chunk-M744OFVE.js → chunk-W7U4ESW2.js} +1 -1
  134. package/chunks/{chunk-URN76TKR.js → chunk-WCG5O7IP.js} +2 -2
  135. package/chunks/{chunk-A6SX5TAH.js → chunk-XCWO3SMQ.js} +9 -5
  136. package/chunks/{chunk-FDV3CXTD.js → chunk-Y4EWSQF7.js} +3 -3
  137. package/chunks/{chunk-3PRJYMXC.js → chunk-Y4NGLFGJ.js} +1 -1
  138. package/chunks/{chunk-DOA7MCDY.js → chunk-Y7E5LNLO.js} +973 -892
  139. package/chunks/{chunk-3LGZEYOF.js → chunk-YHEEE624.js} +2 -2
  140. package/chunks/{chunk-Y5HIDFKZ.js → chunk-YJQCUTT2.js} +4 -4
  141. package/chunks/{chunk-QONSRAEV.js → chunk-YP5KH5Y7.js} +1 -1
  142. package/chunks/{chunk-SQ3ZJOYL.js → chunk-ZJ3VGYHK.js} +20 -20
  143. package/chunks/{chunk-7GYP5COR.js → chunk-ZXU5UHMI.js} +1 -1
  144. package/chunks/{computer-use-GTOP2CVH.js → computer-use-KEAPATUY.js} +35 -35
  145. package/chunks/{config-utils-LIRO7NSU.js → config-utils-K7SCOWHD.js} +2 -2
  146. package/chunks/{contextCommand-K6T6RRF3.js → contextCommand-ZJA6A5K5.js} +38 -38
  147. package/chunks/{core-runtime-D2626QQU.js → core-runtime-QMJPWHCI.js} +35 -35
  148. package/chunks/create-sub-session-DJE6XICH.js +772 -0
  149. package/chunks/{create-sub-session-6EWLAZD5.js → create-sub-session-E4PBYXV5.js} +2 -2
  150. package/chunks/{cron-create-CCRIULJE.js → cron-create-GRBWYMIJ.js} +4 -4
  151. package/chunks/{cron-delete-FCFW6BGP.js → cron-delete-4CMKBR2M.js} +4 -4
  152. package/chunks/{cron-list-QDBVCHRF.js → cron-list-W7K4ASOA.js} +4 -4
  153. package/chunks/{daemon-CCIX4BMG.js → daemon-SCTQMM7Z.js} +165 -5
  154. package/chunks/{daemon-status-provider-2EHRZZVF.js → daemon-status-provider-FSWDPE2G.js} +45 -45
  155. package/chunks/{daemon-trust-policy-B3EPDJDR.js → daemon-trust-policy-P5L5VFAY.js} +41 -41
  156. package/chunks/{daemon-trust-policy-monitor-MFM5X26G.js → daemon-trust-policy-monitor-73JYN6ET.js} +41 -41
  157. package/chunks/{deferred-core-runtime-KXN7HLN7.js → deferred-core-runtime-BWRCCFTE.js} +35 -35
  158. package/chunks/discovery-XLHITE74.js +220 -0
  159. package/chunks/{display-image-GUJA352B.js → display-image-O2XFPQTC.js} +4 -4
  160. package/chunks/{dist-A7H2KKUC.js → dist-K4WWQBHS.js} +277 -98
  161. package/chunks/{dist-IKGVITP3.js → dist-KS4O2NKE.js} +99 -6
  162. package/chunks/{earlyInputCapture-WUNYYFOS.js → earlyInputCapture-L5ST23A6.js} +36 -36
  163. package/chunks/{edit-DMFCBP2D.js → edit-LHHRFNFK.js} +35 -35
  164. package/chunks/{enter-worktree-5SVBCXFC.js → enter-worktree-6NXCRZPF.js} +35 -35
  165. package/chunks/{enterPlanMode-QUIZFQ4M.js → enterPlanMode-ZVQT4U7D.js} +35 -35
  166. package/chunks/{environment-U6QP23VJ.js → environment-GJ2HWJOS.js} +38 -38
  167. package/chunks/{errors-GZWFA6ON.js → errors-6RLH3XXC.js} +38 -38
  168. package/chunks/{exit-worktree-FUB44KAF.js → exit-worktree-I2YLUHHY.js} +35 -35
  169. package/chunks/{exitPlanMode-XSHHYR73.js → exitPlanMode-7CCWKO7I.js} +35 -35
  170. package/chunks/{fast-path-JHQJSIMZ.js → fast-path-DVFD4HQD.js} +2 -2
  171. package/chunks/{gemini-O44ETOKT.js → gemini-7FWGOYD4.js} +78 -78
  172. package/chunks/{geminiContentGenerator-TTM4TZJM.js → geminiContentGenerator-V2WVLIXU.js} +6 -6
  173. package/chunks/{glob-YECOWTRW.js → glob-3N6GGI75.js} +35 -35
  174. package/chunks/{goal-tools-3AZKX5WQ.js → goal-tools-APOW6UXL.js} +3 -3
  175. package/chunks/{grep-BZO4LOTA.js → grep-V43ILZVX.js} +35 -35
  176. package/chunks/{handleAutoUpdate-TOO52D6H.js → handleAutoUpdate-A5WFVWIA.js} +40 -40
  177. package/chunks/{i18n-ARJYXZQ5.js → i18n-PLVQ4FBZ.js} +37 -37
  178. package/chunks/{image-gen-J6Q2YBEU.js → image-gen-7C6IK6DC.js} +9 -9
  179. package/chunks/{initializer-CEZ4RPQV.js → initializer-CVAIKZYL.js} +42 -42
  180. package/chunks/{installationInfo-AEGIIQAT.js → installationInfo-J6QDHNTK.js} +36 -36
  181. package/chunks/{keychain-token-storage-7BT4TQ2A.js → keychain-token-storage-TVAMTNP7.js} +2 -2
  182. package/chunks/{list-7XLPV5GC.js → list-ZZ4OUUWV.js} +44 -44
  183. package/chunks/{list-agents-GC4BRET7.js → list-agents-KFFIIS2G.js} +2 -2
  184. package/chunks/{loadedSettingsAdapter-YK5SBHOT.js → loadedSettingsAdapter-QRYRJSWL.js} +41 -41
  185. package/chunks/{loggingContentGenerator-I7QDXS43.js → loggingContentGenerator-OJCO75HM.js} +17 -17
  186. package/chunks/{loop-wakeup-SQQSBMEY.js → loop-wakeup-TLMJPMMP.js} +5 -5
  187. package/chunks/{ls-63CC3NNX.js → ls-UVVE2XGE.js} +4 -4
  188. package/chunks/{lsp-P6NVJVNT.js → lsp-QMEA2VLB.js} +2 -2
  189. package/chunks/{managed-npm-update-YSL7PA7G.js → managed-npm-update-PCOSCP2N.js} +48 -39
  190. package/chunks/{mcp-RKFQZXP6.js → mcp-M3WKKWKY.js} +41 -41
  191. package/chunks/{monitor-QHHJIKGL.js → monitor-GN24FH6C.js} +35 -35
  192. package/chunks/{nonInteractiveCli-XEBIE7MG.js → nonInteractiveCli-KPTU3VSQ.js} +75 -75
  193. package/chunks/{notebook-edit-SG7X2EQA.js → notebook-edit-4YM65BBO.js} +35 -35
  194. package/chunks/{openaiContentGenerator-63CVR33K.js → openaiContentGenerator-EDQT6GTV.js} +19 -19
  195. package/chunks/{pidfile-I3CXJGQD.js → pidfile-JOIIRN2C.js} +36 -36
  196. package/chunks/{processUtils-LJ3DSANX.js → processUtils-5SV4MX3Q.js} +2 -2
  197. package/chunks/{qwenContentGenerator-JINBVCH6.js → qwenContentGenerator-ODRJSUGR.js} +40 -40
  198. package/chunks/{qwenOAuth2-SY2O3NRR.js → qwenOAuth2-NESCMZ47.js} +8 -8
  199. package/chunks/{read-file-PGTXF25I.js → read-file-HPSODLPK.js} +10 -10
  200. package/chunks/{read-mcp-resource-RTSSEER5.js → read-mcp-resource-2TNSJTC3.js} +2 -2
  201. package/chunks/{record-artifact-E6AWQU2Z.js → record-artifact-RAON52FC.js} +3 -3
  202. package/chunks/{resumeHistoryUtils-FB2NFVZ2.js → resumeHistoryUtils-TXCOFFMQ.js} +42 -41
  203. package/chunks/{ripGrep-IY3KGPM6.js → ripGrep-ZKQGTQAO.js} +35 -35
  204. package/chunks/{run-qwen-serve-UYEMGPKA.js → run-qwen-serve-ZPKPKECF.js} +516 -87
  205. package/chunks/{runtime-CG3BKRFE.js → runtime-2FLNNM36.js} +44 -44
  206. package/chunks/{scheduler-VFUVGDE5.js → scheduler-365PJHNR.js} +35 -35
  207. package/chunks/{sdk-exporters-http-IL2346MJ.js → sdk-exporters-http-KHAB5JSD.js} +2 -2
  208. package/chunks/{sdk-impl-SYKGVWOZ.js → sdk-impl-KD7FSTC3.js} +2 -2
  209. package/chunks/{send-message-TL6FIMMN.js → send-message-ZM7MRUGP.js} +5 -5
  210. package/chunks/{serve-ZCCQ2G2L.js → serve-QD2RNLKJ.js} +42 -42
  211. package/chunks/{server-WS7LWXPP.js → server-XLJVLTYM.js} +7952 -611
  212. package/chunks/{session-IQLCT32T.js → session-3VTUHH4Q.js} +78 -78
  213. package/chunks/{settings-NX4EUIE6.js → settings-KULVPCQC.js} +40 -40
  214. package/chunks/{shell-THDYM4CS.js → shell-3SWW22MH.js} +35 -35
  215. package/chunks/{skill-OXXZBNQB.js → skill-KDHWYS7W.js} +14 -14
  216. package/chunks/{skill-settings-T3JZ33T2.js → skill-settings-NMY4JEJC.js} +40 -40
  217. package/chunks/{spawnChannel-COLJMSA7.js → spawnChannel-ZKS4Q5OU.js} +37 -37
  218. package/chunks/{standalone-update-ICW7H5IF.js → standalone-update-7CXPGAQ4.js} +38 -38
  219. package/chunks/{startInteractiveUI-6BDRXSMF.js → startInteractiveUI-2QQLEKM6.js} +473 -233
  220. package/chunks/{stdioHelpers-HGIYTWAY.js → stdioHelpers-7A2EE64Z.js} +5 -3
  221. package/chunks/{syntheticOutput-BN7E626U.js → syntheticOutput-ZLCUTKO2.js} +3 -3
  222. package/chunks/{task-create-2X4UP4F3.js → task-create-CQP5UEA3.js} +9 -9
  223. package/chunks/{task-list-WOLJPZ64.js → task-list-XLEZOJXP.js} +5 -5
  224. package/chunks/{task-stop-TNXRNAL2.js → task-stop-7ZQM5CFF.js} +2 -2
  225. package/chunks/{task-update-VDUSN36E.js → task-update-JA75U2SN.js} +9 -9
  226. package/chunks/{team-create-BCSMDK4Z.js → team-create-2WTNGAOX.js} +35 -35
  227. package/chunks/{team-delete-D2VMSDOT.js → team-delete-MHY3UZGY.js} +5 -5
  228. package/chunks/{team-plan-approval-B5YRLJFV.js → team-plan-approval-LZTYLEG4.js} +35 -35
  229. package/chunks/{terminal-image-renderer-PW6Z6VFY.js → terminal-image-renderer-R5HHAFJN.js} +41 -36
  230. package/chunks/{theme-manager-CMVKD2JH.js → theme-manager-PAUCSJFF.js} +36 -36
  231. package/chunks/{todoWrite-MHWHO5UO.js → todoWrite-UPVOHYGD.js} +4 -4
  232. package/chunks/{tool-search-SQTUSG6P.js → tool-search-2BFCGLI6.js} +13 -13
  233. package/chunks/{total-session-admission-XAXOSE46.js → total-session-admission-MK4SINFK.js} +41 -41
  234. package/chunks/{trustedFolders-Z2UAEG2V.js → trustedFolders-TJ5S26N7.js} +37 -37
  235. package/chunks/{update-relaunch-JBLI6LJF.js → update-relaunch-N7AYLARF.js} +6 -6
  236. package/chunks/{updateCheck-FDAVGOFT.js → updateCheck-QRZ3DVT5.js} +39 -39
  237. package/chunks/{useAutoAcceptIndicator-PDZFIYRM.js → useAutoAcceptIndicator-DBJ7Y5AF.js} +44 -44
  238. package/chunks/{validateNonInterActiveAuth-Q4763ONQ.js → validateNonInterActiveAuth-6ZQWUDS3.js} +72 -72
  239. package/chunks/{version-C7MPCGWD.js → version-AJQGQWXC.js} +1 -1
  240. package/chunks/{web-fetch-L7RAPOJB.js → web-fetch-QWJYRXFL.js} +13 -13
  241. package/chunks/{web-search-IDOYUOWX.js → web-search-2AOXJGHU.js} +9 -9
  242. package/chunks/web-shell-static-O73YPVVC.js +33 -0
  243. package/chunks/{workflow-HXURUJB5.js → workflow-ERH3SJG2.js} +36 -36
  244. package/chunks/{workspace-providers-status-JZ3GPWNU.js → workspace-providers-status-HZ474RA4.js} +44 -44
  245. package/chunks/{workspace-registration-store-SM2PWB6L.js → workspace-registration-store-6EUP4JXG.js} +1 -1
  246. package/chunks/{workspace-registry-6W4ES7BJ.js → workspace-registry-R4APRRNC.js} +41 -41
  247. package/chunks/{workspace-service-V47ZFJRX.js → workspace-service-HFIFDMU7.js} +46 -46
  248. package/chunks/{workspace-skills-status-6ZQ45XKA.js → workspace-skills-status-HAHEIHGK.js} +42 -42
  249. package/chunks/{workspace-trust-reconciler-6V25LMCN.js → workspace-trust-reconciler-65GTAGDK.js} +50 -50
  250. package/chunks/{write-file-H2QOF25K.js → write-file-B34CDELV.js} +35 -35
  251. package/chunks/{zoom-image-JTUSS43N.js → zoom-image-HPRBZHSS.js} +10 -10
  252. package/cli.js +15 -15
  253. package/package.json +3 -3
  254. package/web-shell/assets/{arc-DtI1rZcQ.js → arc-Ip-FFDJ0.js} +1 -1
  255. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BPZwSVct.js → architectureDiagram-3BPJPVTR-CChqgwIb.js} +1 -1
  256. package/web-shell/assets/{blockDiagram-GPEHLZMM-BIQ03j4C.js → blockDiagram-GPEHLZMM-BHN-Tfss.js} +1 -1
  257. package/web-shell/assets/{c4Diagram-AAUBKEIU-CB0RyFGm.js → c4Diagram-AAUBKEIU-BhyjzDjN.js} +1 -1
  258. package/web-shell/assets/channel-Cu8qd6OB.js +1 -0
  259. package/web-shell/assets/{chunk-2J33WTMH-B3WoS-4H.js → chunk-2J33WTMH-BB9eyHrx.js} +1 -1
  260. package/web-shell/assets/{chunk-4BX2VUAB-C98xYZ1X.js → chunk-4BX2VUAB-BeV7ce_J.js} +1 -1
  261. package/web-shell/assets/{chunk-55IACEB6-CbTIWRwQ.js → chunk-55IACEB6-DO7kXDiV.js} +1 -1
  262. package/web-shell/assets/{chunk-727SXJPM-DWGnKTPu.js → chunk-727SXJPM-B27MPznD.js} +1 -1
  263. package/web-shell/assets/{chunk-AQP2D5EJ-4__QyCEX.js → chunk-AQP2D5EJ-DHIjqjD_.js} +1 -1
  264. package/web-shell/assets/{chunk-FMBD7UC4-DFtG1YCW.js → chunk-FMBD7UC4-DabMqyN2.js} +1 -1
  265. package/web-shell/assets/{chunk-ND2GUHAM-rvAhW51N.js → chunk-ND2GUHAM-Dw7Nnnxc.js} +1 -1
  266. package/web-shell/assets/{chunk-QZHKN3VN-DfiU9pwZ.js → chunk-QZHKN3VN-DdaZew1Q.js} +1 -1
  267. package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +1 -0
  268. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +1 -0
  269. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cc4EIdxu.js → cose-bilkent-S5V4N54A-CgBpCYH5.js} +1 -1
  270. package/web-shell/assets/{dagre-BM42HDAG-CZNj4dGW.js → dagre-BM42HDAG-BB4IU8G0.js} +1 -1
  271. package/web-shell/assets/{diagram-2AECGRRQ-D5tiqQCr.js → diagram-2AECGRRQ-BcUTHU37.js} +1 -1
  272. package/web-shell/assets/{diagram-5GNKFQAL-pwzw0jVO.js → diagram-5GNKFQAL-B6Lyihyv.js} +1 -1
  273. package/web-shell/assets/{diagram-KO2AKTUF-4CWiM00x.js → diagram-KO2AKTUF-CRIJOjpG.js} +1 -1
  274. package/web-shell/assets/{diagram-LMA3HP47-Dd7rc7Qf.js → diagram-LMA3HP47-DdNiwWWT.js} +1 -1
  275. package/web-shell/assets/{diagram-OG6HWLK6-_vzV52ml.js → diagram-OG6HWLK6-Dz4b32Do.js} +1 -1
  276. package/web-shell/assets/{erDiagram-TEJ5UH35-CqbE2bx_.js → erDiagram-TEJ5UH35-D-8NGw77.js} +1 -1
  277. package/web-shell/assets/{flowDiagram-I6XJVG4X-CaxNr7w4.js → flowDiagram-I6XJVG4X-Dun26LyM.js} +1 -1
  278. package/web-shell/assets/{ganttDiagram-6RSMTGT7-AGjrtfUA.js → ganttDiagram-6RSMTGT7-F10Hu1Gc.js} +1 -1
  279. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-ADG2zSkc.js → gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js} +1 -1
  280. package/web-shell/assets/{index-BOryKCqt.js → index-BXqw-nGq.js} +1 -1
  281. package/web-shell/assets/index-QQlUCJGg.css +5 -0
  282. package/web-shell/assets/index-hcgjV7vS.js +1768 -0
  283. package/web-shell/assets/{infoDiagram-5YYISTIA-CE3B_IoZ.js → infoDiagram-5YYISTIA-DVgTMLvj.js} +1 -1
  284. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CN-Frhoi.js → ishikawaDiagram-YF4QCWOH-uT-KepvK.js} +1 -1
  285. package/web-shell/assets/{journeyDiagram-JHISSGLW-CGgezS93.js → journeyDiagram-JHISSGLW-Vg_XadQf.js} +1 -1
  286. package/web-shell/assets/{kanban-definition-UN3LZRKU-BqWijky5.js → kanban-definition-UN3LZRKU-Dyv1ESBE.js} +1 -1
  287. package/web-shell/assets/{linear-D8sfpZf6.js → linear-BMIepYX3.js} +1 -1
  288. package/web-shell/assets/{mermaid.core-3PA4QrzM.js → mermaid.core-zA8pJ9ag.js} +5 -5
  289. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D9QxwiCY.js → mindmap-definition-RKZ34NQL-BCW_BZ_5.js} +1 -1
  290. package/web-shell/assets/{pieDiagram-4H26LBE5-Bioaf6uE.js → pieDiagram-4H26LBE5-DseNEGp2.js} +1 -1
  291. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DBb2AS73.js → quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js} +1 -1
  292. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DXOvZ3KB.js → requirementDiagram-4Y6WPE33-CVOlCRPf.js} +1 -1
  293. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-D9qg09Dm.js → sankeyDiagram-5OEKKPKP-CGhgrUJZ.js} +1 -1
  294. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DSAUIfpw.js → sequenceDiagram-3UESZ5HK-dlqmpLuQ.js} +1 -1
  295. package/web-shell/assets/{stateDiagram-AJRCARHV-BPZkzfQ3.js → stateDiagram-AJRCARHV-B9EW10Xb.js} +1 -1
  296. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +1 -0
  297. package/web-shell/assets/{timeline-definition-PNZ67QCA-UDaQp9sP.js → timeline-definition-PNZ67QCA-BBRh0mgZ.js} +1 -1
  298. package/web-shell/assets/{vennDiagram-CIIHVFJN-2ouhAnHO.js → vennDiagram-CIIHVFJN-B8Gs-REP.js} +1 -1
  299. package/web-shell/assets/{wardley-L42UT6IY-Cq_WEvTK.js → wardley-L42UT6IY-D_y80Ur7.js} +1 -1
  300. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-Dt24aXOM.js → wardleyDiagram-YWT4CUSO-D-CNfHJ-.js} +1 -1
  301. package/web-shell/assets/{xychartDiagram-2RQKCTM6-A5Xk2WCH.js → xychartDiagram-2RQKCTM6-DQ5CvELo.js} +1 -1
  302. package/web-shell/index.html +2 -2
  303. package/chunks/create-sub-session-MWUWNBM6.js +0 -401
  304. package/web-shell/assets/channel-vfbVFuM1.js +0 -1
  305. package/web-shell/assets/classDiagram-4FO5ZUOK-Cvr8atq3.js +0 -1
  306. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cvr8atq3.js +0 -1
  307. package/web-shell/assets/index-Cb1LjsCv.css +0 -5
  308. package/web-shell/assets/index-CvJDaIy8.js +0 -1756
  309. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DInOqnhZ.js +0 -1
@@ -31,11 +31,10 @@ import {
31
31
  parseDaemonStatusDetail,
32
32
  positiveFiniteOrNull,
33
33
  prepareManagedScratchRoot,
34
- require_express,
35
- resolveWebShellDir,
34
+ resolveAcpHttpEnabled,
36
35
  setDeferredRuntimeRequestTiming,
37
36
  toDaemonStatusMemoryLimits
38
- } from "./chunk-XZCMQUOF.js";
37
+ } from "./chunk-RGSBTHSU.js";
39
38
  import {
40
39
  isLoopbackBind
41
40
  } from "./chunk-RXFQM6FQ.js";
@@ -43,6 +42,13 @@ import {
43
42
  formatMemoryBudgetStderr,
44
43
  resolveDaemonMemoryBudget
45
44
  } from "./chunk-HGCQ5SE7.js";
45
+ import {
46
+ require_express,
47
+ resolveWebShellDir
48
+ } from "./chunk-GDXET5XU.js";
49
+ import {
50
+ LIVE_HOST_PROTOCOL_VERSION
51
+ } from "./chunk-NKLP3DCK.js";
46
52
  import {
47
53
  DEFAULT_COMPACTED_REPLAY_MAX_BYTES,
48
54
  DEFAULT_MAX_JOURNAL_BYTES,
@@ -65,24 +71,24 @@ import {
65
71
  MAX_REGISTERED_WORKSPACES,
66
72
  resolveWorkspaceInputs,
67
73
  workspaceRegistrationId
68
- } from "./chunk-WAOLM6SQ.js";
69
- import "./chunk-3DTM3RPU.js";
74
+ } from "./chunk-P2AJ7FTI.js";
75
+ import "./chunk-S7CV4KO6.js";
70
76
  import {
71
77
  LOAD_REPLAY_META_KEY
72
- } from "./chunk-UKZEXS6K.js";
78
+ } from "./chunk-R574ATRM.js";
73
79
  import "./chunk-J26HHFI5.js";
74
80
  import {
75
81
  canonicalizeWorkspace,
76
82
  translateAndCheckAbsoluteWorkspacePath
77
83
  } from "./chunk-6PLDPT2C.js";
78
- import "./chunk-XNZBXQCG.js";
84
+ import "./chunk-MKVZE4ZJ.js";
79
85
  import "./chunk-FYJ7W2PI.js";
80
86
  import {
81
87
  ChannelDeliveryError,
82
88
  ChannelWebhookEnqueueError,
83
89
  QWEN_SERVER_TOKEN_ENV,
84
90
  isChannelDeliveryError
85
- } from "./chunk-QONSRAEV.js";
91
+ } from "./chunk-YP5KH5Y7.js";
86
92
  import {
87
93
  normalizeWorkerDiagnostic,
88
94
  sanitizeWorkerDiagnostic
@@ -90,7 +96,7 @@ import {
90
96
  import {
91
97
  channelSelectionNames
92
98
  } from "./chunk-ALMR3E6Q.js";
93
- import "./chunk-BK2UNYWD.js";
99
+ import "./chunk-HIBNSEJE.js";
94
100
  import {
95
101
  EXTERNAL_TOOL_GUARD_REQUIRED_VALUE,
96
102
  EXTERNAL_TOOL_GUARD_TOKEN_ENV,
@@ -110,7 +116,7 @@ import {
110
116
  import "./chunk-6PEXNQTX.js";
111
117
  import {
112
118
  getCliVersion
113
- } from "./chunk-NKST54XA.js";
119
+ } from "./chunk-FZBZSYKU.js";
114
120
  import "./chunk-VJNBRRZG.js";
115
121
  import "./chunk-ALGGS7UH.js";
116
122
  import {
@@ -133,7 +139,7 @@ import "./chunk-Q7YDKOGY.js";
133
139
  import {
134
140
  writeStderrLine,
135
141
  writeStdoutLine
136
- } from "./chunk-OWAK7LMW.js";
142
+ } from "./chunk-KGJGEEVR.js";
137
143
  import "./chunk-DMTGGOSA.js";
138
144
  import "./chunk-YQ3U5MUC.js";
139
145
  import {
@@ -147,7 +153,7 @@ import {
147
153
  // packages/cli/src/serve/run-qwen-serve.ts
148
154
  init_esbuild_shims();
149
155
  var import_express = __toESM(require_express(), 1);
150
- import { X509Certificate, createHash as createHash2, timingSafeEqual } from "node:crypto";
156
+ import { X509Certificate, createHash as createHash3, timingSafeEqual } from "node:crypto";
151
157
  import * as fs from "node:fs";
152
158
  import * as https from "node:https";
153
159
  import * as path from "node:path";
@@ -1283,7 +1289,7 @@ function createConcreteLogger(input) {
1283
1289
  }
1284
1290
  });
1285
1291
  let timeout;
1286
- const deadline = new Promise((resolve2) => {
1292
+ const deadline = new Promise((resolve3) => {
1287
1293
  timeout = setTimeout(() => {
1288
1294
  try {
1289
1295
  input.warnOnce(
@@ -1292,7 +1298,7 @@ function createConcreteLogger(input) {
1292
1298
  );
1293
1299
  } catch {
1294
1300
  } finally {
1295
- resolve2();
1301
+ resolve3();
1296
1302
  }
1297
1303
  }, input.policy.closeDrainBudgetMs);
1298
1304
  timeout.unref();
@@ -1636,6 +1642,190 @@ ${capUtf8Record(
1636
1642
  }
1637
1643
  __name(initDaemonLogger, "initDaemonLogger");
1638
1644
 
1645
+ // packages/cli/src/serve/live/conversation-workspace.ts
1646
+ init_esbuild_shims();
1647
+ import { createHash as createHash2 } from "node:crypto";
1648
+ import { lstat, mkdir, realpath, rmdir } from "node:fs/promises";
1649
+ import { homedir } from "node:os";
1650
+ import { isAbsolute, join as join2, relative as relative2, resolve, sep } from "node:path";
1651
+ var isSamePath = /* @__PURE__ */ __name((left, right) => process.platform === "win32" ? left.toLowerCase() === right.toLowerCase() : left === right, "isSamePath");
1652
+ function conversationDirectoryName(sessionId) {
1653
+ if (sessionId.length === 0 || sessionId.length > 256) {
1654
+ throw new Error("Live conversation session id is invalid");
1655
+ }
1656
+ return `conversation-${createHash2("sha256").update(sessionId).digest("hex")}`;
1657
+ }
1658
+ __name(conversationDirectoryName, "conversationDirectoryName");
1659
+ function validateRootStats(stats, label = "root") {
1660
+ if (stats.isSymbolicLink() || !stats.isDirectory()) {
1661
+ throw new Error(
1662
+ `Live conversation ${label} must be a non-symlink directory`
1663
+ );
1664
+ }
1665
+ if (process.platform !== "win32" && typeof process.getuid === "function" && stats.uid !== process.getuid()) {
1666
+ throw new Error(
1667
+ `Live conversation ${label} must be owned by the daemon user`
1668
+ );
1669
+ }
1670
+ if (process.platform !== "win32" && (stats.mode & 63) !== 0) {
1671
+ throw new Error(
1672
+ `Live conversation ${label} must be accessible only to its owner`
1673
+ );
1674
+ }
1675
+ }
1676
+ __name(validateRootStats, "validateRootStats");
1677
+ function hasIdentity(stats, root) {
1678
+ return stats.dev === root.device && stats.ino === root.inode;
1679
+ }
1680
+ __name(hasIdentity, "hasIdentity");
1681
+ async function validateConversationDirectory(root, name, candidate, parent = root.canonicalRoot) {
1682
+ const before = await lstat(candidate);
1683
+ validateRootStats(before, "directory");
1684
+ const canonical = await realpath(candidate);
1685
+ const after = await lstat(canonical);
1686
+ validateRootStats(after, "directory");
1687
+ const child = relative2(parent, canonical);
1688
+ if (child !== name || child.includes(sep) || child.startsWith("..") || isAbsolute(child) || before.dev !== after.dev || before.ino !== after.ino) {
1689
+ throw new Error(
1690
+ "Live conversation directory must be an owned direct child"
1691
+ );
1692
+ }
1693
+ await revalidateLiveConversationRoot(root);
1694
+ return canonical;
1695
+ }
1696
+ __name(validateConversationDirectory, "validateConversationDirectory");
1697
+ function getLiveConversationRootPath(homeDir = homedir()) {
1698
+ return resolve(homeDir, "Documents", "Qwen Code", "Conversations");
1699
+ }
1700
+ __name(getLiveConversationRootPath, "getLiveConversationRootPath");
1701
+ async function createRoot(configuredRoot) {
1702
+ try {
1703
+ await mkdir(configuredRoot, { recursive: true, mode: 448 });
1704
+ } catch (error) {
1705
+ let existing;
1706
+ try {
1707
+ existing = await lstat(configuredRoot);
1708
+ } catch {
1709
+ throw error;
1710
+ }
1711
+ validateRootStats(existing);
1712
+ throw error;
1713
+ }
1714
+ const before = await lstat(configuredRoot);
1715
+ validateRootStats(before);
1716
+ const canonicalRoot = await realpath(configuredRoot);
1717
+ const after = await lstat(canonicalRoot);
1718
+ validateRootStats(after);
1719
+ if (before.dev !== after.dev || before.ino !== after.ino) {
1720
+ throw new Error(
1721
+ "Live conversation root identity changed during validation"
1722
+ );
1723
+ }
1724
+ return {
1725
+ configuredRoot,
1726
+ canonicalRoot,
1727
+ device: after.dev,
1728
+ inode: after.ino
1729
+ };
1730
+ }
1731
+ __name(createRoot, "createRoot");
1732
+ async function revalidateLiveConversationRoot(root) {
1733
+ const configuredStats = await lstat(root.configuredRoot);
1734
+ validateRootStats(configuredStats);
1735
+ if (!hasIdentity(configuredStats, root)) {
1736
+ throw new Error("Live conversation root identity changed");
1737
+ }
1738
+ const canonical = await realpath(root.configuredRoot);
1739
+ if (!isSamePath(canonical, root.canonicalRoot)) {
1740
+ throw new Error("Live conversation root canonical path changed");
1741
+ }
1742
+ const canonicalStats = await lstat(root.canonicalRoot);
1743
+ validateRootStats(canonicalStats);
1744
+ if (!hasIdentity(canonicalStats, root)) {
1745
+ throw new Error("Live conversation root identity changed");
1746
+ }
1747
+ return root;
1748
+ }
1749
+ __name(revalidateLiveConversationRoot, "revalidateLiveConversationRoot");
1750
+ async function assertExactLiveConversationRoot(root, candidate) {
1751
+ await revalidateLiveConversationRoot(root);
1752
+ const resolvedCandidate = resolve(candidate);
1753
+ if (!isSamePath(resolvedCandidate, root.configuredRoot) && !isSamePath(resolvedCandidate, root.canonicalRoot)) {
1754
+ throw new Error("Workspace must be the exact Live conversation root");
1755
+ }
1756
+ const stats = await lstat(resolvedCandidate);
1757
+ validateRootStats(stats);
1758
+ const canonical = await realpath(resolvedCandidate);
1759
+ if (!isSamePath(canonical, root.canonicalRoot) || !hasIdentity(stats, root)) {
1760
+ throw new Error("Workspace must be the exact Live conversation root");
1761
+ }
1762
+ return root;
1763
+ }
1764
+ __name(assertExactLiveConversationRoot, "assertExactLiveConversationRoot");
1765
+ var LiveConversationWorkspace = class {
1766
+ static {
1767
+ __name(this, "LiveConversationWorkspace");
1768
+ }
1769
+ rootPath;
1770
+ rootPromise;
1771
+ constructor(options = {}) {
1772
+ this.rootPath = getLiveConversationRootPath(options.homeDir);
1773
+ }
1774
+ async getRoot() {
1775
+ if (!this.rootPromise) {
1776
+ const pending = createRoot(this.rootPath);
1777
+ this.rootPromise = pending;
1778
+ void pending.catch(() => {
1779
+ if (this.rootPromise === pending) this.rootPromise = void 0;
1780
+ });
1781
+ }
1782
+ return this.rootPromise;
1783
+ }
1784
+ async revalidate() {
1785
+ return revalidateLiveConversationRoot(await this.getRoot());
1786
+ }
1787
+ async assertExactRoot(candidate) {
1788
+ return assertExactLiveConversationRoot(await this.getRoot(), candidate);
1789
+ }
1790
+ async materializeConversationDirectory(sessionId) {
1791
+ const root = await this.revalidate();
1792
+ const name = conversationDirectoryName(sessionId);
1793
+ const candidate = join2(root.canonicalRoot, name);
1794
+ try {
1795
+ await mkdir(candidate, { mode: 448 });
1796
+ } catch (error) {
1797
+ if (!error || typeof error !== "object" || error.code !== "EEXIST") {
1798
+ throw error;
1799
+ }
1800
+ }
1801
+ return validateConversationDirectory(root, name, candidate);
1802
+ }
1803
+ async discardEmptyConversationDirectory(sessionId) {
1804
+ const root = await this.revalidate();
1805
+ const name = conversationDirectoryName(sessionId);
1806
+ const candidate = join2(root.canonicalRoot, name);
1807
+ let canonical;
1808
+ try {
1809
+ canonical = await validateConversationDirectory(root, name, candidate);
1810
+ } catch (error) {
1811
+ if (error && typeof error === "object" && error.code === "ENOENT") {
1812
+ return false;
1813
+ }
1814
+ throw error;
1815
+ }
1816
+ try {
1817
+ await rmdir(canonical);
1818
+ } catch (error) {
1819
+ if (error && typeof error === "object" && (error.code === "ENOENT" || error.code === "ENOTEMPTY")) {
1820
+ return false;
1821
+ }
1822
+ throw error;
1823
+ }
1824
+ await revalidateLiveConversationRoot(root);
1825
+ return true;
1826
+ }
1827
+ };
1828
+
1639
1829
  // packages/cli/src/serve/daemon-metrics-ring.ts
1640
1830
  init_esbuild_shims();
1641
1831
  var MAX_SAMPLES_PER_WINDOW = 4096;
@@ -2292,7 +2482,10 @@ function rawChannelCwd(entry) {
2292
2482
  }
2293
2483
  __name(rawChannelCwd, "rawChannelCwd");
2294
2484
  function resolveChannelWorkspaceGroups(input) {
2295
- const { workspaces, selection, loadChannelsConfig } = input;
2485
+ const { selection, loadChannelsConfig } = input;
2486
+ const workspaces = input.workspaces.filter(
2487
+ (workspace) => workspace.provenance !== "live-conversation"
2488
+ );
2296
2489
  const primary = workspaces.find((workspace) => workspace.primary);
2297
2490
  if (!primary) {
2298
2491
  return {
@@ -2400,6 +2593,7 @@ var QWEN_SERVE_PROMPT_DEADLINE_MS_ENV = "QWEN_SERVE_PROMPT_DEADLINE_MS";
2400
2593
  var QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS_ENV = "QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS";
2401
2594
  var SHUTDOWN_FORCE_CLOSE_MS = 5e3;
2402
2595
  var DAEMON_LOG_FORCED_FLUSH_BUDGET_MS = 250;
2596
+ var DEFAULT_LIVE_DISCOVERY_RETRY_MS = 5e3;
2403
2597
  function channelDeliveryPublicError(code) {
2404
2598
  switch (code) {
2405
2599
  case "channel_worker_unavailable":
@@ -2490,8 +2684,8 @@ async function flushDaemonLogBounded(daemonLog, budgetMs) {
2490
2684
  await Promise.race([
2491
2685
  daemonLog.flush().catch(() => {
2492
2686
  }),
2493
- new Promise((resolve2) => {
2494
- timer = setTimeout(resolve2, budgetMs);
2687
+ new Promise((resolve3) => {
2688
+ timer = setTimeout(resolve3, budgetMs);
2495
2689
  timer.unref();
2496
2690
  })
2497
2691
  ]);
@@ -2738,12 +2932,12 @@ var retryableChannelWorkerShutdownErrors = /* @__PURE__ */ new WeakSet();
2738
2932
  var channelWorkerRuntimePromise;
2739
2933
  async function loadChannelWorkerRuntime() {
2740
2934
  channelWorkerRuntimePromise ??= Promise.all([
2741
- import("./channel-worker-supervisor-NUEDVHX4.js"),
2742
- import("./pidfile-I3CXJGQD.js"),
2743
- import("./runtime-CG3BKRFE.js"),
2935
+ import("./channel-worker-supervisor-62YWUGP2.js"),
2936
+ import("./pidfile-JOIIRN2C.js"),
2937
+ import("./runtime-2FLNNM36.js"),
2744
2938
  import("./cli-entry-path-4VJ3Y6T2.js"),
2745
- import("./channel-worker-group-SVGPDH2C.js"),
2746
- import("./channel-worker-manager-72ZK2GTS.js")
2939
+ import("./channel-worker-group-JWQK224X.js"),
2940
+ import("./channel-worker-manager-77E3OXRQ.js")
2747
2941
  ]).then(
2748
2942
  ([
2749
2943
  supervisor,
@@ -2848,10 +3042,16 @@ function shouldPreheatBridge(deps) {
2848
3042
  __name(shouldPreheatBridge, "shouldPreheatBridge");
2849
3043
  var coreRuntimePromise;
2850
3044
  function loadCoreRuntime() {
2851
- coreRuntimePromise ??= import("./core-runtime-D2626QQU.js");
3045
+ coreRuntimePromise ??= import("./core-runtime-QMJPWHCI.js");
2852
3046
  return coreRuntimePromise;
2853
3047
  }
2854
3048
  __name(loadCoreRuntime, "loadCoreRuntime");
3049
+ var liveDiscoveryRuntimePromise;
3050
+ function loadLiveDiscoveryRuntime() {
3051
+ liveDiscoveryRuntimePromise ??= import("./discovery-XLHITE74.js");
3052
+ return liveDiscoveryRuntimePromise;
3053
+ }
3054
+ __name(loadLiveDiscoveryRuntime, "loadLiveDiscoveryRuntime");
2855
3055
  async function resolveDaemonLogBaseDirForRun(input) {
2856
3056
  if (input.deps.daemonLogBaseDir) {
2857
3057
  return input.deps.daemonLogBaseDir;
@@ -2878,10 +3078,10 @@ __name(resolveDaemonLogBaseDirForRun, "resolveDaemonLogBaseDirForRun");
2878
3078
  var settingsRuntimePromise;
2879
3079
  function loadSettingsRuntimeModules() {
2880
3080
  settingsRuntimePromise ??= Promise.all([
2881
- import("./settings-NX4EUIE6.js"),
2882
- import("./environment-U6QP23VJ.js"),
2883
- import("./loadedSettingsAdapter-YK5SBHOT.js"),
2884
- import("./trustedFolders-Z2UAEG2V.js")
3081
+ import("./settings-KULVPCQC.js"),
3082
+ import("./environment-GJ2HWJOS.js"),
3083
+ import("./loadedSettingsAdapter-QRYRJSWL.js"),
3084
+ import("./trustedFolders-TJ5S26N7.js")
2885
3085
  ]).then(([settings, environment, loadedSettingsAdapter, trustedFolders]) => ({
2886
3086
  settings,
2887
3087
  environment,
@@ -2894,8 +3094,8 @@ __name(loadSettingsRuntimeModules, "loadSettingsRuntimeModules");
2894
3094
  var channelWebhookConfigRuntimePromise;
2895
3095
  function loadChannelWebhookConfigRuntime() {
2896
3096
  channelWebhookConfigRuntimePromise ??= Promise.all([
2897
- import("./runtime-CG3BKRFE.js"),
2898
- import("./config-utils-LIRO7NSU.js")
3097
+ import("./runtime-2FLNNM36.js"),
3098
+ import("./config-utils-K7SCOWHD.js")
2899
3099
  ]).then(([channelRuntime, configUtils]) => ({
2900
3100
  loadChannelsConfig: channelRuntime.loadChannelsConfig,
2901
3101
  parseChannelWebhookConfig: configUtils.parseChannelWebhookConfig
@@ -2920,17 +3120,17 @@ async function loadServeRuntimeModules() {
2920
3120
  totalSessionAdmissionModule,
2921
3121
  workspaceRegistryModule
2922
3122
  ] = await Promise.all([
2923
- import("./server-WS7LWXPP.js"),
2924
- import("./bridge-TCFMLKHR.js"),
2925
- import("./spawnChannel-COLJMSA7.js"),
3123
+ import("./server-XLJVLTYM.js"),
3124
+ import("./bridge-NU6YEEHK.js"),
3125
+ import("./spawnChannel-ZKS4Q5OU.js"),
2926
3126
  import("./process-registry-2CHQBXH5.js"),
2927
- import("./workspace-service-V47ZFJRX.js"),
3127
+ import("./workspace-service-HFIFDMU7.js"),
2928
3128
  import("./types-ML3TRJQ5.js"),
2929
- import("./daemon-status-provider-2EHRZZVF.js"),
2930
- import("./workspace-providers-status-JZ3GPWNU.js"),
2931
- import("./workspace-skills-status-6ZQ45XKA.js"),
2932
- import("./total-session-admission-XAXOSE46.js"),
2933
- import("./workspace-registry-6W4ES7BJ.js")
3129
+ import("./daemon-status-provider-FSWDPE2G.js"),
3130
+ import("./workspace-providers-status-HZ474RA4.js"),
3131
+ import("./workspace-skills-status-HAHEIHGK.js"),
3132
+ import("./total-session-admission-MK4SINFK.js"),
3133
+ import("./workspace-registry-R4APRRNC.js")
2934
3134
  ]);
2935
3135
  return {
2936
3136
  createServeApp: serverModule.createServeApp,
@@ -3125,12 +3325,12 @@ async function waitForRuntimeStartingForShutdown(runtimeStarting, daemonLog, tim
3125
3325
  let timer;
3126
3326
  await Promise.race([
3127
3327
  runtimeStarting,
3128
- new Promise((resolve2) => {
3328
+ new Promise((resolve3) => {
3129
3329
  timer = setTimeout(() => {
3130
3330
  daemonLog.warn(
3131
3331
  `${timeoutMs}ms runtime-startup wait reached during shutdown; continuing listener close`
3132
3332
  );
3133
- resolve2();
3333
+ resolve3();
3134
3334
  }, timeoutMs);
3135
3335
  timer.unref();
3136
3336
  })
@@ -3147,6 +3347,18 @@ var BOOTSTRAP_SERVE_PATHS = /* @__PURE__ */ new Set([
3147
3347
  BOOTSTRAP_CAPABILITIES_PATH,
3148
3348
  BOOTSTRAP_DAEMON_STATUS_PATH
3149
3349
  ]);
3350
+ var RUNTIME_STARTUP_FAILED_ENVELOPE = {
3351
+ error: "Daemon runtime failed to start",
3352
+ code: "daemon_runtime_failed"
3353
+ };
3354
+ var RUNTIME_STARTUP_STARTING_ENVELOPE = {
3355
+ error: "Daemon runtime is still starting",
3356
+ code: "daemon_runtime_starting"
3357
+ };
3358
+ function runtimeStartupEnvelope(runtimeError) {
3359
+ return runtimeError ? RUNTIME_STARTUP_FAILED_ENVELOPE : RUNTIME_STARTUP_STARTING_ENVELOPE;
3360
+ }
3361
+ __name(runtimeStartupEnvelope, "runtimeStartupEnvelope");
3150
3362
  function createBootstrapServeApp(input) {
3151
3363
  const {
3152
3364
  opts,
@@ -3206,10 +3418,7 @@ function createBootstrapServeApp(input) {
3206
3418
  if (runtimeError === void 0) {
3207
3419
  res.setHeader("Retry-After", "1");
3208
3420
  }
3209
- res.status(503).json({
3210
- error: runtimeError ? "Daemon runtime failed to start" : "Daemon runtime is still starting",
3211
- code: runtimeError ? "daemon_runtime_failed" : "daemon_runtime_starting"
3212
- });
3421
+ res.status(503).json(runtimeStartupEnvelope(runtimeError));
3213
3422
  return;
3214
3423
  }
3215
3424
  res.status(200).json(
@@ -3372,11 +3581,7 @@ function createBootstrapServeApp(input) {
3372
3581
  res.status(200).json(response);
3373
3582
  });
3374
3583
  app.use((_req, res) => {
3375
- const runtimeError = getRuntimeError();
3376
- res.status(503).json({
3377
- error: runtimeError ? "Daemon runtime failed to start" : "Daemon runtime is still starting",
3378
- code: runtimeError ? "daemon_runtime_failed" : "daemon_runtime_starting"
3379
- });
3584
+ res.status(503).json(runtimeStartupEnvelope(getRuntimeError()));
3380
3585
  });
3381
3586
  return app;
3382
3587
  }
@@ -3394,7 +3599,10 @@ function createDelegatingServeApp(bootstrapApp, getRuntimeApp, options = {}) {
3394
3599
  };
3395
3600
  const webhookRequest = isChannelWebhookRequest(req);
3396
3601
  const authGate = webhookRequest ? options.authenticateDeferredChannelWebhookRequest ?? options.authenticateDeferredRuntimeRequest : options.authenticateDeferredRuntimeRequest;
3397
- if (authGate) {
3602
+ const preAuthExempted = authGate !== void 0 && await Promise.resolve(options.isPreAuthRequest?.(req)).catch(
3603
+ () => false
3604
+ ) === true;
3605
+ if (authGate && !preAuthExempted) {
3398
3606
  if (!runSynchronousRequestGate(authGate, req, res, next)) {
3399
3607
  return;
3400
3608
  }
@@ -3406,6 +3614,10 @@ function createDelegatingServeApp(bootstrapApp, getRuntimeApp, options = {}) {
3406
3614
  try {
3407
3615
  await options.runtimeReady;
3408
3616
  } catch {
3617
+ if (preAuthExempted) {
3618
+ res.status(503).json(RUNTIME_STARTUP_FAILED_ENVELOPE);
3619
+ return;
3620
+ }
3409
3621
  } finally {
3410
3622
  timing.waitMs = Math.round((performance2.now() - waitStartedAt) * 100) / 100;
3411
3623
  }
@@ -3496,8 +3708,8 @@ function matchesWebhookSecret(candidate, expected) {
3496
3708
  if (typeof candidate !== "string" || typeof expected !== "string" || expected.length === 0) {
3497
3709
  return false;
3498
3710
  }
3499
- const expectedDigest = createHash2("sha256").update(expected).digest();
3500
- const candidateDigest = createHash2("sha256").update(candidate).digest();
3711
+ const expectedDigest = createHash3("sha256").update(expected).digest();
3712
+ const candidateDigest = createHash3("sha256").update(candidate).digest();
3501
3713
  return timingSafeEqual(expectedDigest, candidateDigest);
3502
3714
  }
3503
3715
  __name(matchesWebhookSecret, "matchesWebhookSecret");
@@ -3842,7 +4054,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
3842
4054
  }
3843
4055
  let workspaceRegistrationStore = deps.workspaceRegistrationStore;
3844
4056
  if (workspaceRegistrationStore === void 0 && process.env["QWEN_SERVE_NO_PERSISTENT_REGISTRATION"] !== "1") {
3845
- const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-SM2PWB6L.js");
4057
+ const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-6EUP4JXG.js");
3846
4058
  workspaceRegistrationStore = new WorkspaceRegistrationStore(boundWorkspace);
3847
4059
  }
3848
4060
  if (workspaceRegistrationStore) {
@@ -4125,8 +4337,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4125
4337
  let startRuntimeAfterHealth;
4126
4338
  let startRuntimeForRequest;
4127
4339
  const deferRuntimeUntilFirstHealth = deps.resolveOnListen === true && deps.deferRuntimeUntilFirstHealth === true;
4128
- const runtimeReady = new Promise((resolve2, reject) => {
4129
- markRuntimeReady = resolve2;
4340
+ const runtimeReady = new Promise((resolve3, reject) => {
4341
+ markRuntimeReady = resolve3;
4130
4342
  markRuntimeFailed = reject;
4131
4343
  });
4132
4344
  void runtimeReady.catch(() => {
@@ -4320,6 +4532,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4320
4532
  }, "stopSafely");
4321
4533
  stopSafely("scheduled-task keepalive", locals.stopScheduledTaskKeepalive);
4322
4534
  stopSafely("workspace git state", locals.stopWorkspaceGitState);
4535
+ stopSafely("Live Host coordinator", locals.stopLiveCoordinator);
4323
4536
  stopTrustPolicyMonitor(app2);
4324
4537
  for (const stop of locals.subSessionStoppers ?? []) {
4325
4538
  stopSafely("sub-session launcher", stop);
@@ -4379,7 +4592,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4379
4592
  loadCoreRuntime(),
4380
4593
  loadSettingsRuntimeModules(),
4381
4594
  cliVersionPromise,
4382
- import("./daemon-trust-policy-B3EPDJDR.js")
4595
+ import("./daemon-trust-policy-P5L5VFAY.js")
4383
4596
  ]);
4384
4597
  cliVersion = resolvedCliVersion;
4385
4598
  settingsRuntime.environment.preResolveHomeEnvOverrides();
@@ -4402,6 +4615,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4402
4615
  `qwen serve: managed scratch workspaces are unavailable: ${err instanceof Error ? err.message : String(err)}`
4403
4616
  );
4404
4617
  }
4618
+ const liveConversationWorkspace = deps.liveConversationWorkspace ?? new LiveConversationWorkspace();
4405
4619
  let runtimeBootSettings;
4406
4620
  try {
4407
4621
  runtimeBootSettings = settingsRuntime.settings.loadSettings(
@@ -4744,7 +4958,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4744
4958
  resolveSkillSettings,
4745
4959
  skillSettingStrings,
4746
4960
  updateWorkspaceSkillSettingLists
4747
- } = await import("./skill-settings-T3JZ33T2.js");
4961
+ } = await import("./skill-settings-NMY4JEJC.js");
4748
4962
  const fresh = loadSettingsForPersistence(workspace);
4749
4963
  const normalizedName = skillName.trim().toLowerCase();
4750
4964
  const resolved = resolveSkillSettings(fresh);
@@ -4843,7 +5057,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4843
5057
  );
4844
5058
  }
4845
5059
  }), "persistSettingsFn");
4846
- const { createSubSessionLauncher } = await import("./create-sub-session-MWUWNBM6.js");
5060
+ const { createSubSessionLauncher } = await import("./create-sub-session-DJE6XICH.js");
4847
5061
  const subSessionLauncher = createSubSessionLauncher({
4848
5062
  getBridge: /* @__PURE__ */ __name(() => bridgeRef, "getBridge"),
4849
5063
  boundWorkspace,
@@ -5434,9 +5648,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5434
5648
  "Managed scratch runtime must use an accepted direct child directory"
5435
5649
  );
5436
5650
  }
5651
+ if (provenance === "live-conversation") {
5652
+ await liveConversationWorkspace.assertExactRoot(cwd);
5653
+ }
5437
5654
  const snapshot = buildOptions?.snapshot ?? await trustPolicy.readDaemonTrustPolicySnapshot();
5438
5655
  const decision = buildOptions?.decision ?? trustPolicy.evaluateDaemonWorkspaceTrust(snapshot, cwd);
5439
- const trusted = provenance === "managed-scratch" ? true : buildOptions?.trusted ?? decision.targetTrusted;
5656
+ const trusted = provenance === "managed-scratch" || provenance === "live-conversation" ? true : buildOptions?.trusted ?? decision.targetTrusted;
5440
5657
  let wsSettings;
5441
5658
  try {
5442
5659
  wsSettings = settingsRuntime.settings.loadSettings(cwd, {
@@ -5491,6 +5708,17 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5491
5708
  const wsSubSessionLauncher = createSubSessionLauncher({
5492
5709
  getBridge: /* @__PURE__ */ __name(() => wsBridgeRef, "getBridge"),
5493
5710
  boundWorkspace: cwd,
5711
+ ...provenance === "live-conversation" ? {
5712
+ notifySentCompletion: true,
5713
+ isolatedWorkspace: {
5714
+ materializeDirectory: /* @__PURE__ */ __name((sessionId) => liveConversationWorkspace.materializeConversationDirectory(
5715
+ sessionId
5716
+ ), "materializeDirectory"),
5717
+ discardEmptyDirectory: /* @__PURE__ */ __name((sessionId) => liveConversationWorkspace.discardEmptyConversationDirectory(
5718
+ sessionId
5719
+ ), "discardEmptyDirectory")
5720
+ }
5721
+ } : {},
5494
5722
  ...subSessionConcurrencyCapsFromSettings(
5495
5723
  wsSettings?.merged.serve ?? {}
5496
5724
  )
@@ -5668,11 +5896,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5668
5896
  workspaceId: wsHash,
5669
5897
  workspaceCwd: cwd,
5670
5898
  sessionRuntimeBaseDir: wsEnv.sessionRuntimeBaseDir,
5671
- ...buildOptions?.displayName !== void 0 ? { displayName: buildOptions.displayName } : {},
5899
+ ...buildOptions?.displayName !== void 0 ? { displayName: buildOptions.displayName } : provenance === "live-conversation" ? { displayName: "Conversations" } : {},
5672
5900
  primary: buildOptions?.primary ?? false,
5673
5901
  trusted,
5674
5902
  provenance,
5675
- removable: buildOptions?.removable ?? true,
5903
+ removable: buildOptions?.removable ?? provenance !== "live-conversation",
5676
5904
  registrationIds: [...buildOptions?.registrationIds ?? []],
5677
5905
  env: wsEnv.metadata,
5678
5906
  bridge: wsBridge,
@@ -5686,7 +5914,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5686
5914
  })
5687
5915
  };
5688
5916
  subSessionStoppersByRuntime.set(wsRuntime, wsSubSessionLauncher.stop);
5689
- if (provenance !== "managed-scratch" && !buildOptions?.snapshot) {
5917
+ if (provenance === "existing" && !buildOptions?.snapshot) {
5690
5918
  const latest = await trustPolicy.readDaemonTrustPolicySnapshot();
5691
5919
  if (latest.revision !== snapshot.revision) {
5692
5920
  generationGuard.close();
@@ -5718,6 +5946,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5718
5946
  const serveAppForRuntimeLifecycle = { current: void 0 };
5719
5947
  const workspaceRuntimeRemoval = {
5720
5948
  async runtimeAdded(runtimeAdded) {
5949
+ if (runtimeAdded.provenance === "live-conversation") return;
5721
5950
  channelWebhookEnvByWorkspace.set(
5722
5951
  runtimeAdded.workspaceCwd,
5723
5952
  workspaceRuntimeEffectiveEnv(runtimeAdded, daemonRuntimeBaseEnv)
@@ -5750,7 +5979,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5750
5979
  invalidatePrimaryServeFeaturesCache();
5751
5980
  }
5752
5981
  totalSessionAdmission.beginWorkspaceDrain(runtimeToDrain.workspaceCwd);
5753
- channelWorkerManager?.beginWorkspaceDrain(runtimeToDrain.workspaceCwd);
5982
+ if (runtimeToDrain.provenance !== "live-conversation") {
5983
+ channelWorkerManager?.beginWorkspaceDrain(
5984
+ runtimeToDrain.workspaceCwd
5985
+ );
5986
+ }
5754
5987
  workspaceVoiceCoordinator.beginWorkspaceDrain(runtimeToDrain);
5755
5988
  channelWebhookEnvByWorkspace.delete(runtimeToDrain.workspaceCwd);
5756
5989
  channelWebhookConfigVersion += 1;
@@ -5771,15 +6004,21 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5771
6004
  bridgeRef = runtimeToDrain.bridge;
5772
6005
  invalidatePrimaryServeFeaturesCache();
5773
6006
  }
5774
- channelWorkerManager?.cancelWorkspaceDrain(runtimeToDrain.workspaceCwd);
6007
+ if (runtimeToDrain.provenance !== "live-conversation") {
6008
+ channelWorkerManager?.cancelWorkspaceDrain(
6009
+ runtimeToDrain.workspaceCwd
6010
+ );
6011
+ }
5775
6012
  totalSessionAdmission.cancelWorkspaceDrain(runtimeToDrain.workspaceCwd);
5776
6013
  workspaceVoiceCoordinator.cancelWorkspaceDrain(runtimeToDrain);
5777
- channelWebhookEnvByWorkspace.set(
5778
- runtimeToDrain.workspaceCwd,
5779
- workspaceRuntimeEffectiveEnv(runtimeToDrain, daemonRuntimeBaseEnv)
5780
- );
5781
- channelWebhookConfigVersion += 1;
5782
- refreshChannelWebhookConfigs?.();
6014
+ if (runtimeToDrain.provenance !== "live-conversation") {
6015
+ channelWebhookEnvByWorkspace.set(
6016
+ runtimeToDrain.workspaceCwd,
6017
+ workspaceRuntimeEffectiveEnv(runtimeToDrain, daemonRuntimeBaseEnv)
6018
+ );
6019
+ channelWebhookConfigVersion += 1;
6020
+ refreshChannelWebhookConfigs?.();
6021
+ }
5783
6022
  const app3 = serveAppForRuntimeLifecycle.current ?? runtimeApp ?? runtimeAppForCleanup;
5784
6023
  const startScheduledTaskKeepaliveForWorkspace = app3?.locals?.["startScheduledTaskKeepaliveForWorkspace"];
5785
6024
  try {
@@ -5802,7 +6041,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5802
6041
  pendingSessionStarts: totalSessionAdmission.snapshotForWorkspace(
5803
6042
  runtimeToDrain.workspaceCwd
5804
6043
  ).inFlight,
5805
- channelWorkers: channelWorkerManager?.workspaceActivity(
6044
+ channelWorkers: runtimeToDrain.provenance === "live-conversation" ? 0 : channelWorkerManager?.workspaceActivity(
5806
6045
  runtimeToDrain.workspaceCwd
5807
6046
  ) ?? 0,
5808
6047
  voiceSessions: workspaceVoiceCoordinator.getWorkspaceActivity(runtimeToDrain)
@@ -5834,7 +6073,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5834
6073
  stopSubSessions?.();
5835
6074
  } catch {
5836
6075
  }
5837
- if (reason !== "daemon_shutdown" && channelWorkerManager) {
6076
+ if (reason !== "daemon_shutdown" && channelWorkerManager && runtimeToDrain.provenance !== "live-conversation") {
5838
6077
  await channelWorkerManager.removeWorkspace(runtimeToDrain.workspaceCwd).catch((err) => {
5839
6078
  daemonLog.error(
5840
6079
  "workspace channel worker cleanup error",
@@ -5956,8 +6195,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5956
6195
  { createChannelManagementService },
5957
6196
  { WorkspaceChannelSettingsStore }
5958
6197
  ] = await Promise.all([
5959
- import("./channel-management-service-5XPPTWUQ.js"),
5960
- import("./channel-settings-store-B4HNMNQV.js")
6198
+ import("./channel-management-service-FSQ7SHYI.js"),
6199
+ import("./channel-settings-store-35VQVUVV.js")
5961
6200
  ]);
5962
6201
  return createChannelManagementService({
5963
6202
  workspaceCwd: targetRuntime.workspaceCwd,
@@ -6019,6 +6258,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6019
6258
  getWorkspaceTrustPolicySnapshot: /* @__PURE__ */ __name(() => latestTrustPolicySnapshot, "getWorkspaceTrustPolicySnapshot")
6020
6259
  } : {},
6021
6260
  managedScratchRoot,
6261
+ liveConversationWorkspace,
6022
6262
  workspaceRegistrationStore,
6023
6263
  workspaceRuntimeRemoval,
6024
6264
  workspaceTrustHotReloadAvailable,
@@ -6036,6 +6276,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6036
6276
  primaryWorkspaceTrusted: trustedWorkspace,
6037
6277
  primaryRuntimeEnv,
6038
6278
  daemonEnv: daemonRuntimeBaseEnv,
6279
+ runtimePlatform: deps.runtimePlatform,
6039
6280
  daemonLog,
6040
6281
  getChannelWorkerSnapshot,
6041
6282
  getChannelWorkerSnapshots,
@@ -6153,8 +6394,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6153
6394
  { createWorkspaceTrustReconciler },
6154
6395
  { createDaemonTrustPolicyMonitor }
6155
6396
  ] = await Promise.all([
6156
- import("./workspace-trust-reconciler-6V25LMCN.js"),
6157
- import("./daemon-trust-policy-monitor-MFM5X26G.js")
6397
+ import("./workspace-trust-reconciler-65GTAGDK.js"),
6398
+ import("./daemon-trust-policy-monitor-73JYN6ET.js")
6158
6399
  ]);
6159
6400
  const materializationFor = /* @__PURE__ */ __name((entry, snapshot, decision) => {
6160
6401
  const boundWorkspaces2 = entry.primary && decision.targetTrusted ? runtime.resolveBoundWorkspacesFromIdeEnv(
@@ -6249,7 +6490,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6249
6490
  handle?.disposeWorkspace(runtimeToDispose.workspaceId);
6250
6491
  const deadline = Date.now() + 1e3;
6251
6492
  while ((handle?.getWorkspaceActivity(runtimeToDispose.workspaceId).memoryTasks ?? 0) > 0 && Date.now() < deadline) {
6252
- await new Promise((resolve2) => setTimeout(resolve2, 25));
6493
+ await new Promise((resolve3) => setTimeout(resolve3, 25));
6253
6494
  }
6254
6495
  if ((handle?.getWorkspaceActivity(runtimeToDispose.workspaceId).memoryTasks ?? 0) > 0) {
6255
6496
  throw new Error(
@@ -6343,7 +6584,15 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6343
6584
  startRuntime: /* @__PURE__ */ __name(() => startRuntimeForRequest?.() ?? false, "startRuntime"),
6344
6585
  runtimeReady,
6345
6586
  authenticateDeferredRuntimeRequest: bearerAuth(opts.token),
6346
- authenticateDeferredChannelWebhookRequest: deferredChannelWebhookAuth
6587
+ authenticateDeferredChannelWebhookRequest: deferredChannelWebhookAuth,
6588
+ // The runtime app serves these before bearerAuth; a browser navigation
6589
+ // cannot attach the bearer header, so the cold gate must let them
6590
+ // through (and start the runtime) exactly like the warm app would.
6591
+ // Dynamic import keeps web-shell-static out of the serve fast-path
6592
+ // static closure (see the import-boundary guards in fast-path.test.ts).
6593
+ isPreAuthRequest: webShellMounted ? (req) => import("./web-shell-static-O73YPVVC.js").then(
6594
+ (webShellStatic) => webShellStatic.isPreAuthWebShellRequest(req)
6595
+ ) : void 0
6347
6596
  });
6348
6597
  let listenHostname = opts.hostname;
6349
6598
  if (opts.hostname.startsWith("[")) {
@@ -6361,7 +6610,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6361
6610
  );
6362
6611
  }
6363
6612
  const channelValidationSettingsRuntime = opts.channelSelection ? await loadSettingsRuntimeModules() : void 0;
6364
- const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-B3EPDJDR.js") : void 0;
6613
+ const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-P5L5VFAY.js") : void 0;
6365
6614
  const channelValidationTrustSnapshot = channelValidationTrustPolicy ? await channelValidationTrustPolicy.readDaemonTrustPolicySnapshot() : void 0;
6366
6615
  const resolveChannelWorkspaceGroupsAtListen = /* @__PURE__ */ __name(() => {
6367
6616
  if (!opts.channelSelection || !channelValidationSettingsRuntime || !channelRuntime) {
@@ -6467,7 +6716,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6467
6716
  if (opts.channelSelection) {
6468
6717
  reserveChannelServicePidfile(opts.channelSelection);
6469
6718
  }
6470
- return await new Promise((resolve2, reject) => {
6719
+ return await new Promise((resolve3, reject) => {
6471
6720
  const onListening = /* @__PURE__ */ __name((error) => {
6472
6721
  if (error) return;
6473
6722
  startup.listenerReadyAt = (/* @__PURE__ */ new Date()).toISOString();
@@ -6485,6 +6734,168 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6485
6734
  actualPort = typeof addr === "object" && addr ? addr.port : opts.port;
6486
6735
  const scheme = tlsOptions ? "https" : "http";
6487
6736
  const url = `${scheme}://${formatHostForUrl(opts.hostname)}:${actualPort}`;
6737
+ const liveRuntimeBaseDir = path.dirname(daemonLogBaseDir);
6738
+ const liveDiscoveryOwners = [];
6739
+ let liveDiscoveryPublish;
6740
+ let liveDiscoveryRetryTimer;
6741
+ let liveDiscoveryRetryTask;
6742
+ let liveDiscoveryEnabled = false;
6743
+ let liveDiscoveryShuttingDown = false;
6744
+ let liveDiscoveryToggle = Promise.resolve();
6745
+ let attemptPendingLiveDiscovery;
6746
+ const pendingLiveDiscoveryBaseDirs = /* @__PURE__ */ new Set();
6747
+ const warnedLiveDiscoveryOwners = /* @__PURE__ */ new Set();
6748
+ const liveDiscoveryRetryDelayMs = deps.liveDiscoveryRetryDelayMs !== void 0 && Number.isFinite(deps.liveDiscoveryRetryDelayMs) && deps.liveDiscoveryRetryDelayMs >= 10 ? Math.min(deps.liveDiscoveryRetryDelayMs, 6e4) : DEFAULT_LIVE_DISCOVERY_RETRY_MS;
6749
+ const scheduleLiveDiscoveryRetry = /* @__PURE__ */ __name(() => {
6750
+ if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled || liveDiscoveryRetryTimer || liveDiscoveryRetryTask || pendingLiveDiscoveryBaseDirs.size === 0 || !attemptPendingLiveDiscovery) {
6751
+ return;
6752
+ }
6753
+ liveDiscoveryRetryTimer = setTimeout(() => {
6754
+ liveDiscoveryRetryTimer = void 0;
6755
+ if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled || !attemptPendingLiveDiscovery) {
6756
+ return;
6757
+ }
6758
+ const retry = attemptPendingLiveDiscovery().finally(() => {
6759
+ if (liveDiscoveryRetryTask === retry) {
6760
+ liveDiscoveryRetryTask = void 0;
6761
+ }
6762
+ scheduleLiveDiscoveryRetry();
6763
+ });
6764
+ liveDiscoveryRetryTask = retry;
6765
+ }, liveDiscoveryRetryDelayMs);
6766
+ liveDiscoveryRetryTimer.unref();
6767
+ }, "scheduleLiveDiscoveryRetry");
6768
+ const cancelLiveDiscoveryRetry = /* @__PURE__ */ __name(() => {
6769
+ if (!liveDiscoveryRetryTimer) return;
6770
+ clearTimeout(liveDiscoveryRetryTimer);
6771
+ liveDiscoveryRetryTimer = void 0;
6772
+ }, "cancelLiveDiscoveryRetry");
6773
+ const publishLiveDiscovery = /* @__PURE__ */ __name((candidateApp) => {
6774
+ if (liveDiscoveryShuttingDown) return Promise.resolve();
6775
+ if (!resolveAcpHttpEnabled()) return Promise.resolve();
6776
+ if (candidateApp.locals?.["liveVoiceEnabled"] !== true)
6777
+ return Promise.resolve();
6778
+ liveDiscoveryEnabled = true;
6779
+ if (liveDiscoveryPublish) return liveDiscoveryPublish;
6780
+ const coordinator = candidateApp.locals?.["liveCoordinator"];
6781
+ const instanceNonce = coordinator?.daemonInstanceNonce;
6782
+ if (typeof instanceNonce !== "string") return Promise.resolve();
6783
+ liveDiscoveryPublish = loadLiveDiscoveryRuntime().then(
6784
+ async ({
6785
+ getStableLiveDiscoveryBaseDir,
6786
+ LiveDiscoveryOwnerActiveError,
6787
+ writeLiveDiscoveryFile
6788
+ }) => {
6789
+ if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled) return;
6790
+ const stableBaseDir = path.resolve(
6791
+ deps.liveDiscoveryStableBaseDir ?? getStableLiveDiscoveryBaseDir()
6792
+ );
6793
+ const runtimeBaseDir = path.resolve(liveRuntimeBaseDir);
6794
+ const targetBaseDirs = /* @__PURE__ */ new Set();
6795
+ if (runtimeBaseDir !== stableBaseDir) {
6796
+ targetBaseDirs.add(runtimeBaseDir);
6797
+ }
6798
+ targetBaseDirs.add(stableBaseDir);
6799
+ for (const baseDir of targetBaseDirs) {
6800
+ pendingLiveDiscoveryBaseDirs.add(baseDir);
6801
+ }
6802
+ const record = {
6803
+ url,
6804
+ ...token ? { token } : {},
6805
+ protocolVersion: LIVE_HOST_PROTOCOL_VERSION,
6806
+ pid: process.pid,
6807
+ instanceNonce
6808
+ };
6809
+ attemptPendingLiveDiscovery = /* @__PURE__ */ __name(async () => {
6810
+ for (const runtimeBaseDir2 of [
6811
+ ...pendingLiveDiscoveryBaseDirs
6812
+ ]) {
6813
+ if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled)
6814
+ return;
6815
+ try {
6816
+ await writeLiveDiscoveryFile(runtimeBaseDir2, record);
6817
+ pendingLiveDiscoveryBaseDirs.delete(runtimeBaseDir2);
6818
+ warnedLiveDiscoveryOwners.delete(runtimeBaseDir2);
6819
+ liveDiscoveryOwners.push({
6820
+ runtimeBaseDir: runtimeBaseDir2,
6821
+ instanceNonce,
6822
+ pid: process.pid
6823
+ });
6824
+ } catch (err) {
6825
+ if (err instanceof LiveDiscoveryOwnerActiveError) {
6826
+ if (!warnedLiveDiscoveryOwners.has(runtimeBaseDir2)) {
6827
+ warnedLiveDiscoveryOwners.add(runtimeBaseDir2);
6828
+ daemonLog.warn(
6829
+ `failed to publish Live Host discovery at ${runtimeBaseDir2}: ${err.message}`
6830
+ );
6831
+ }
6832
+ continue;
6833
+ }
6834
+ pendingLiveDiscoveryBaseDirs.delete(runtimeBaseDir2);
6835
+ daemonLog.warn(
6836
+ `failed to publish Live Host discovery at ${runtimeBaseDir2}: ${err instanceof Error ? err.message : String(err)}`
6837
+ );
6838
+ }
6839
+ }
6840
+ }, "attemptPendingLiveDiscovery");
6841
+ await attemptPendingLiveDiscovery();
6842
+ scheduleLiveDiscoveryRetry();
6843
+ }
6844
+ ).catch((err) => {
6845
+ daemonLog.warn(
6846
+ `failed to publish Live Host discovery: ${err instanceof Error ? err.message : String(err)}`
6847
+ );
6848
+ });
6849
+ return liveDiscoveryPublish;
6850
+ }, "publishLiveDiscovery");
6851
+ const removeLiveDiscoveryOwners = /* @__PURE__ */ __name(async () => {
6852
+ const owners = liveDiscoveryOwners.splice(0);
6853
+ if (owners.length === 0) return;
6854
+ let removeLiveDiscoveryFile;
6855
+ try {
6856
+ ({ removeLiveDiscoveryFile } = await loadLiveDiscoveryRuntime());
6857
+ } catch (err) {
6858
+ daemonLog.warn(
6859
+ `failed to load Live discovery runtime for cleanup: ${err instanceof Error ? err.message : String(err)}`
6860
+ );
6861
+ return;
6862
+ }
6863
+ for (const owner of owners) {
6864
+ try {
6865
+ await removeLiveDiscoveryFile(owner.runtimeBaseDir, owner);
6866
+ } catch (err) {
6867
+ daemonLog.warn(
6868
+ `failed to remove Live Host discovery at ${owner.runtimeBaseDir}: ${err instanceof Error ? err.message : String(err)}`
6869
+ );
6870
+ }
6871
+ }
6872
+ }, "removeLiveDiscoveryOwners");
6873
+ const unpublishLiveDiscovery = /* @__PURE__ */ __name(async () => {
6874
+ liveDiscoveryEnabled = false;
6875
+ cancelLiveDiscoveryRetry();
6876
+ pendingLiveDiscoveryBaseDirs.clear();
6877
+ attemptPendingLiveDiscovery = void 0;
6878
+ await liveDiscoveryPublish;
6879
+ await liveDiscoveryRetryTask;
6880
+ liveDiscoveryPublish = void 0;
6881
+ liveDiscoveryRetryTask = void 0;
6882
+ await removeLiveDiscoveryOwners();
6883
+ }, "unpublishLiveDiscovery");
6884
+ const attachLiveDiscoveryControl = /* @__PURE__ */ __name((candidateApp) => {
6885
+ candidateApp.locals.setLiveDiscoveryEnabled = (enabled) => {
6886
+ const operation = liveDiscoveryToggle.then(
6887
+ () => enabled ? publishLiveDiscovery(candidateApp) : unpublishLiveDiscovery()
6888
+ );
6889
+ liveDiscoveryToggle = operation.catch(() => void 0);
6890
+ return operation;
6891
+ };
6892
+ }, "attachLiveDiscoveryControl");
6893
+ const cleanupLiveDiscovery = /* @__PURE__ */ __name(async () => {
6894
+ liveDiscoveryShuttingDown = true;
6895
+ cancelLiveDiscoveryRetry();
6896
+ await liveDiscoveryToggle;
6897
+ await unpublishLiveDiscovery();
6898
+ }, "cleanupLiveDiscovery");
6488
6899
  try {
6489
6900
  channelWorkspaceGroups = resolveChannelWorkspaceGroupsAtListen();
6490
6901
  } catch (err) {
@@ -6622,7 +7033,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6622
7033
  daemonLog.error("runtime startup failed", error2);
6623
7034
  markRuntimeFailed(error2);
6624
7035
  if (closeServerAfterChannelWorkerStartupFailure && server.listening) {
6625
- runtimeFailureListenerClose = new Promise((resolve3) => {
7036
+ runtimeFailureListenerClose = new Promise((resolve4) => {
6626
7037
  server.close((closeErr) => {
6627
7038
  if (closeErr) {
6628
7039
  daemonLog.error(
@@ -6630,7 +7041,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6630
7041
  closeErr
6631
7042
  );
6632
7043
  }
6633
- resolve3();
7044
+ resolve4();
6634
7045
  });
6635
7046
  });
6636
7047
  server.closeAllConnections();
@@ -6661,7 +7072,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6661
7072
  "Workspace registry is not available for channel workers."
6662
7073
  );
6663
7074
  }
6664
- const runtimes = registry.list();
7075
+ const runtimes = registry.list().filter((runtime) => runtime.provenance !== "live-conversation");
6665
7076
  if (runtimes.length <= 1 && operation === "initial") {
6666
7077
  const primary = registry.primary;
6667
7078
  if (!primary.trusted) {
@@ -6696,7 +7107,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6696
7107
  return {
6697
7108
  workspaceCwd: runtime.workspaceCwd,
6698
7109
  primary: runtime.primary,
6699
- trusted: runtime.trusted
7110
+ trusted: runtime.trusted,
7111
+ provenance: runtime.provenance
6700
7112
  };
6701
7113
  }),
6702
7114
  selection: channelSelection,
@@ -6808,6 +7220,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6808
7220
  const completeRuntimeStartup = /* @__PURE__ */ __name(async (candidateApp) => {
6809
7221
  if (runtimeStartupSettled) return;
6810
7222
  runtimeApp = candidateApp;
7223
+ attachLiveDiscoveryControl(candidateApp);
6811
7224
  const acpHandle = candidateApp.locals?.["acpHandle"];
6812
7225
  acpHandle?.attachServer?.(server);
6813
7226
  if (opts.channelSelection) {
@@ -6817,6 +7230,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6817
7230
  if (runtimeStartupSettled) return;
6818
7231
  }
6819
7232
  if (runtimeStartupSettled) return;
7233
+ await publishLiveDiscovery(candidateApp);
6820
7234
  runtimeStartupSettled = true;
6821
7235
  clearRuntimeStartupTimer();
6822
7236
  markRuntimeReady();
@@ -6960,11 +7374,15 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6960
7374
  if (closePromise) return closePromise;
6961
7375
  closePromise = new Promise((res, rej) => {
6962
7376
  shuttingDown = true;
7377
+ liveDiscoveryShuttingDown = true;
7378
+ cancelLiveDiscoveryRetry();
6963
7379
  channelControlDraining = true;
6964
7380
  const initiallyMountedApp = runtimeApp ?? runtimeAppForCleanup;
6965
7381
  const initiallyMountedManagement = initiallyMountedApp?.locals?.["workspaceManagementHandle"];
6966
7382
  const initiallyMountedSessionMaintenance = initiallyMountedApp?.locals?.["sessionArchiveCoordinator"];
6967
7383
  const initialManagementWait = initiallyMountedManagement?.sealAndWait?.();
7384
+ const initiallyMountedLive = initiallyMountedApp?.locals;
7385
+ const initialLiveWait = initiallyMountedLive?.sealAndWaitLiveCoordinator?.();
6968
7386
  const initialSessionMaintenanceWait = initiallyMountedSessionMaintenance?.sealMaintenanceAndWait?.();
6969
7387
  let processRegistryShutdown;
6970
7388
  const startProcessRegistryShutdown = /* @__PURE__ */ __name(() => {
@@ -7014,6 +7432,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7014
7432
  rej(retryableError);
7015
7433
  return;
7016
7434
  }
7435
+ await cleanupLiveDiscovery();
7017
7436
  if (loggerPublished || loggerSignalOwned) {
7018
7437
  writeDaemonLifecycleBestEffort(() => {
7019
7438
  if (finalErr) {
@@ -7045,6 +7464,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7045
7464
  if (workspaceManagementHandle !== initiallyMountedManagement) {
7046
7465
  await workspaceManagementHandle?.sealAndWait?.();
7047
7466
  }
7467
+ const liveLifecycleHandle = appForCleanup?.locals;
7468
+ await initialLiveWait;
7469
+ if (liveLifecycleHandle !== initiallyMountedLive) {
7470
+ await liveLifecycleHandle?.sealAndWaitLiveCoordinator?.();
7471
+ }
7048
7472
  await initialSessionMaintenanceWait;
7049
7473
  if (sessionMaintenance !== initiallyMountedSessionMaintenance) {
7050
7474
  await sessionMaintenance?.sealMaintenanceAndWait?.();
@@ -7158,6 +7582,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7158
7582
  });
7159
7583
  const preparedRuntimeApp = runtimeApp ?? runtimeAppForCleanup;
7160
7584
  if (preparedRuntimeApp && bridgeRef && deps.bridge) {
7585
+ attachLiveDiscoveryControl(preparedRuntimeApp);
7161
7586
  if (shouldPreheat) {
7162
7587
  startBridgePreheat(bridgeRef);
7163
7588
  }
@@ -7169,6 +7594,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7169
7594
  } else {
7170
7595
  const acpHandle = preparedRuntimeApp.locals?.["acpHandle"];
7171
7596
  acpHandle?.attachServer?.(server);
7597
+ void publishLiveDiscovery(preparedRuntimeApp);
7172
7598
  }
7173
7599
  } else if (deferRuntimeUntilFirstHealth) {
7174
7600
  scheduleRuntimeStartFallback();
@@ -7178,13 +7604,16 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7178
7604
  if (deps.resolveOnListen) {
7179
7605
  loggerPublished = true;
7180
7606
  loggerLifecycle.published();
7181
- resolve2(handle);
7607
+ void (liveDiscoveryPublish ?? Promise.resolve()).then(
7608
+ () => resolve3(handle)
7609
+ );
7182
7610
  } else {
7183
7611
  void runtimeReady.then(
7184
- () => {
7612
+ async () => {
7613
+ await liveDiscoveryPublish;
7185
7614
  loggerPublished = true;
7186
7615
  loggerLifecycle.published();
7187
- resolve2(handle);
7616
+ resolve3(handle);
7188
7617
  },
7189
7618
  (err) => {
7190
7619
  void handle.close().then(