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

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 (238) hide show
  1. package/bundled/qc-helper/docs/features/channels/github.md +31 -19
  2. package/bundled/qc-helper/docs/features/code-review.md +3 -1
  3. package/bundled/review/SKILL.md +16 -11
  4. package/chunks/{MaxSizedBox-A3UYJS6B.js → MaxSizedBox-2HFKP4LI.js} +8 -8
  5. package/chunks/{StandaloneSessionPicker-NGLY26I4.js → StandaloneSessionPicker-RBV72M5N.js} +23 -23
  6. package/chunks/{acp-startup-profiler-3RICG2YW.js → acp-startup-profiler-ORIQ2CCQ.js} +2 -2
  7. package/chunks/{acpAgent-V54T2EEL.js → acpAgent-WO6JFCVQ.js} +1059 -118
  8. package/chunks/{agent-2P53VL2L.js → agent-AHGLYNZ4.js} +8 -8
  9. package/chunks/{agent-headless-6X4GCFRD.js → agent-headless-NTXKKGRO.js} +8 -8
  10. package/chunks/{bridge-TCFMLKHR.js → bridge-RPAU64CA.js} +13 -13
  11. package/chunks/{channel-management-service-5XPPTWUQ.js → channel-management-service-IGEUOVRT.js} +1 -1
  12. package/chunks/{channel-settings-store-B4HNMNQV.js → channel-settings-store-ON64MF7G.js} +15 -15
  13. package/chunks/{channel-worker-group-SVGPDH2C.js → channel-worker-group-JWQK224X.js} +5 -5
  14. package/chunks/{channel-worker-manager-72ZK2GTS.js → channel-worker-manager-77E3OXRQ.js} +5 -5
  15. package/chunks/{channel-worker-supervisor-NUEDVHX4.js → channel-worker-supervisor-62YWUGP2.js} +3 -3
  16. package/chunks/{chunk-AFZTZLFB.js → chunk-2POQWYM6.js} +2 -2
  17. package/chunks/{chunk-RTWF7FF7.js → chunk-3LZKY4V4.js} +3 -3
  18. package/chunks/{chunk-T4XY5CT4.js → chunk-3UOLYNTF.js} +5 -5
  19. package/chunks/{chunk-WAOLM6SQ.js → chunk-4JH77A2U.js} +1 -1
  20. package/chunks/{chunk-MISUEWB4.js → chunk-4S4OEQ6U.js} +10 -6
  21. package/chunks/{chunk-URJHXOSO.js → chunk-4WTAQEHV.js} +1 -1
  22. package/chunks/{chunk-BU4BRCPX.js → chunk-536SWZTA.js} +5 -5
  23. package/chunks/{chunk-6KEN3RIC.js → chunk-5MJGUQU5.js} +3 -3
  24. package/chunks/{chunk-Z5S6KH2B.js → chunk-75QMRMO7.js} +4 -4
  25. package/chunks/{chunk-DOA7MCDY.js → chunk-A4VTILZT.js} +898 -847
  26. package/chunks/{chunk-72DZPDH4.js → chunk-ACZRB7AD.js} +8 -3
  27. package/chunks/{chunk-P7LKADIT.js → chunk-BOGOR4HB.js} +5 -5
  28. package/chunks/{chunk-QL4TN4HS.js → chunk-BRVWYMKV.js} +1 -1
  29. package/chunks/{chunk-7FUVSN4D.js → chunk-C4CBJQKY.js} +1 -1
  30. package/chunks/{chunk-X6DV3WKN.js → chunk-CA4UIDFU.js} +1 -1
  31. package/chunks/{chunk-MVLM6PJK.js → chunk-CJ5WLD5Y.js} +6 -2
  32. package/chunks/{chunk-6D6V55ZQ.js → chunk-DIT4V3XH.js} +1 -1
  33. package/chunks/{chunk-DOICUTPO.js → chunk-DVBEGGLG.js} +8 -8
  34. package/chunks/{chunk-DTAPI453.js → chunk-EMYZIABH.js} +1 -1
  35. package/chunks/{chunk-4E5PO6R7.js → chunk-EXCEQD22.js} +3 -3
  36. package/chunks/{chunk-EHMN6SEG.js → chunk-FZFP7RZI.js} +3 -3
  37. package/chunks/{chunk-C4GRKMUL.js → chunk-G5NNWEYE.js} +5 -5
  38. package/chunks/{chunk-QWUYFMAR.js → chunk-GESMMPAK.js} +33 -33
  39. package/chunks/{chunk-WPKIU4PA.js → chunk-GK2H5GRC.js} +4 -4
  40. package/chunks/{chunk-SQ3ZJOYL.js → chunk-GWRHVJY2.js} +11 -11
  41. package/chunks/{chunk-BK2UNYWD.js → chunk-HIBNSEJE.js} +12 -0
  42. package/chunks/{chunk-5CDI4UOY.js → chunk-HY25ULVN.js} +1 -1
  43. package/chunks/{chunk-IISDPZ5X.js → chunk-IMOQO6YL.js} +1 -1
  44. package/chunks/{chunk-ZQL73PPE.js → chunk-JE44IPH6.js} +1 -1
  45. package/chunks/{chunk-NYZAL2W2.js → chunk-K2B3X3E7.js} +3 -3
  46. package/chunks/{chunk-OWAK7LMW.js → chunk-KGJGEEVR.js} +7 -0
  47. package/chunks/{chunk-546CDN6D.js → chunk-KHUA3NQV.js} +2 -2
  48. package/chunks/{chunk-7GYP5COR.js → chunk-LAAFLUQV.js} +1 -1
  49. package/chunks/{chunk-XNZBXQCG.js → chunk-MKVZE4ZJ.js} +1 -1
  50. package/chunks/{chunk-N47ZM2KI.js → chunk-N2GJU6KI.js} +9 -9
  51. package/chunks/{chunk-WIPQR44Y.js → chunk-NGJOAKJY.js} +3 -3
  52. package/chunks/chunk-NKLP3DCK.js +22 -0
  53. package/chunks/{chunk-3ZRS2XNY.js → chunk-NKSF7HYF.js} +1 -1
  54. package/chunks/{chunk-HKNSU4WX.js → chunk-O7V7N4G7.js} +1 -1
  55. package/chunks/{chunk-CJBRIJ7W.js → chunk-ODPXHGLL.js} +2 -2
  56. package/chunks/{chunk-4T6QMNX2.js → chunk-OP2OHZ7K.js} +183 -10
  57. package/chunks/{chunk-CDHNGCJI.js → chunk-OWSW7EYP.js} +5 -5
  58. package/chunks/{chunk-FDV3CXTD.js → chunk-OXX3FG2N.js} +2 -2
  59. package/chunks/{chunk-YUVTZ4UH.js → chunk-PPUOYL77.js} +70 -5
  60. package/chunks/{chunk-O656RSMC.js → chunk-PX5DNLSA.js} +1 -1
  61. package/chunks/{chunk-6KZP75GT.js → chunk-Q5RM32DR.js} +1 -1
  62. package/chunks/{chunk-AU3XNTMV.js → chunk-QZKYZCN3.js} +1 -1
  63. package/chunks/{chunk-UKZEXS6K.js → chunk-R574ATRM.js} +11 -0
  64. package/chunks/{chunk-XKTCA6BW.js → chunk-R5RBXLNC.js} +3 -3
  65. package/chunks/{chunk-NAYPZ72V.js → chunk-RFUHDCNF.js} +1 -1
  66. package/chunks/{chunk-QG2ACINA.js → chunk-RHTTKJTP.js} +1 -1
  67. package/chunks/{chunk-IKXE3AAC.js → chunk-RK2EE3T7.js} +1 -1
  68. package/chunks/{chunk-3DTM3RPU.js → chunk-S7CV4KO6.js} +3 -3
  69. package/chunks/{chunk-ZH7G3A4U.js → chunk-SKNE3KQC.js} +3 -3
  70. package/chunks/{chunk-PQTK2FVO.js → chunk-SLSWFHDF.js} +3 -3
  71. package/chunks/{chunk-2U7GPHA6.js → chunk-SQC6K5HI.js} +1 -1
  72. package/chunks/{chunk-Y5HIDFKZ.js → chunk-SQOMTWQT.js} +4 -4
  73. package/chunks/{chunk-CXYBX4AL.js → chunk-SUKEUUAA.js} +1 -1
  74. package/chunks/{chunk-WXS647W5.js → chunk-T4JSA7KU.js} +2 -2
  75. package/chunks/{chunk-I7JDGNG6.js → chunk-T5U6IM4C.js} +6 -2
  76. package/chunks/{chunk-TVFC3XF5.js → chunk-TGGEZINK.js} +5 -5
  77. package/chunks/{chunk-AVDEBBMI.js → chunk-TOGZTG4X.js} +2 -2
  78. package/chunks/{chunk-A6SX5TAH.js → chunk-TSERKWCX.js} +6 -2
  79. package/chunks/{chunk-XSGQKR37.js → chunk-U4AF3QLU.js} +355 -17
  80. package/chunks/{chunk-WIRAPZ62.js → chunk-UGTWD35F.js} +7 -1
  81. package/chunks/{chunk-DG563ZCS.js → chunk-ULPQQSDN.js} +2 -2
  82. package/chunks/{chunk-DBIEZC7T.js → chunk-VGFPFM4U.js} +3 -3
  83. package/chunks/{chunk-VDLXPEI5.js → chunk-VNQCPBC2.js} +3 -3
  84. package/chunks/{chunk-WVRJKSIG.js → chunk-VSALQLT7.js} +1 -1
  85. package/chunks/{chunk-EKWNNQQD.js → chunk-W5DXUTXD.js} +12 -6
  86. package/chunks/{chunk-M744OFVE.js → chunk-W7U4ESW2.js} +1 -1
  87. package/chunks/{chunk-MFBUJMQ3.js → chunk-WNU7TZTO.js} +4 -4
  88. package/chunks/{chunk-GTM6IHBB.js → chunk-WO2B5E5B.js} +1 -0
  89. package/chunks/{chunk-SPUDIAHX.js → chunk-XA4TMLFN.js} +11 -11
  90. package/chunks/{chunk-XOZ2R6XI.js → chunk-XM2O73NC.js} +1245 -295
  91. package/chunks/{chunk-NKST54XA.js → chunk-YMBOEAF4.js} +1 -1
  92. package/chunks/{chunk-QONSRAEV.js → chunk-YP5KH5Y7.js} +1 -1
  93. package/chunks/{chunk-XZCMQUOF.js → chunk-YZQTA3ID.js} +20 -11
  94. package/chunks/{computer-use-GTOP2CVH.js → computer-use-5HXJ2P4X.js} +8 -8
  95. package/chunks/{config-utils-LIRO7NSU.js → config-utils-VXD4SPVR.js} +2 -2
  96. package/chunks/{contextCommand-K6T6RRF3.js → contextCommand-7BEHRX2H.js} +11 -11
  97. package/chunks/{core-runtime-D2626QQU.js → core-runtime-U4VJ5TIV.js} +8 -8
  98. package/chunks/create-sub-session-QZNQY332.js +772 -0
  99. package/chunks/{daemon-CCIX4BMG.js → daemon-YI5RY62O.js} +115 -3
  100. package/chunks/{daemon-status-provider-2EHRZZVF.js → daemon-status-provider-UJUGTDTL.js} +17 -17
  101. package/chunks/{daemon-trust-policy-B3EPDJDR.js → daemon-trust-policy-ZHDD5VYQ.js} +14 -14
  102. package/chunks/{daemon-trust-policy-monitor-MFM5X26G.js → daemon-trust-policy-monitor-5SHYBDGA.js} +14 -14
  103. package/chunks/{deferred-core-runtime-KXN7HLN7.js → deferred-core-runtime-QWAEBTR5.js} +8 -8
  104. package/chunks/discovery-XLHITE74.js +220 -0
  105. package/chunks/{dist-IKGVITP3.js → dist-KS4O2NKE.js} +99 -6
  106. package/chunks/{earlyInputCapture-WUNYYFOS.js → earlyInputCapture-5BMSGKOI.js} +8 -8
  107. package/chunks/{edit-DMFCBP2D.js → edit-IVQQVYYK.js} +8 -8
  108. package/chunks/{enter-worktree-5SVBCXFC.js → enter-worktree-P3DF2N6O.js} +8 -8
  109. package/chunks/{enterPlanMode-QUIZFQ4M.js → enterPlanMode-KKTDVLAD.js} +8 -8
  110. package/chunks/{environment-U6QP23VJ.js → environment-W5TRDM3G.js} +11 -11
  111. package/chunks/{errors-GZWFA6ON.js → errors-GJJB36IG.js} +11 -11
  112. package/chunks/{exit-worktree-FUB44KAF.js → exit-worktree-LV5RLOCU.js} +8 -8
  113. package/chunks/{exitPlanMode-XSHHYR73.js → exitPlanMode-TUGOB2LL.js} +8 -8
  114. package/chunks/{fast-path-JHQJSIMZ.js → fast-path-2FU23PAQ.js} +2 -2
  115. package/chunks/{gemini-O44ETOKT.js → gemini-KDULDQPP.js} +47 -47
  116. package/chunks/{geminiContentGenerator-TTM4TZJM.js → geminiContentGenerator-LOCFHNVA.js} +1 -1
  117. package/chunks/{glob-YECOWTRW.js → glob-Z4NQFKWS.js} +8 -8
  118. package/chunks/{grep-BZO4LOTA.js → grep-Z67Z7EN6.js} +8 -8
  119. package/chunks/{handleAutoUpdate-TOO52D6H.js → handleAutoUpdate-DFUZE6I6.js} +13 -13
  120. package/chunks/{i18n-ARJYXZQ5.js → i18n-R4FMZ7N2.js} +10 -10
  121. package/chunks/{image-gen-J6Q2YBEU.js → image-gen-4CQJPQP5.js} +1 -1
  122. package/chunks/{initializer-CEZ4RPQV.js → initializer-DK672ZVE.js} +14 -14
  123. package/chunks/{installationInfo-AEGIIQAT.js → installationInfo-PO4Z3ES7.js} +9 -9
  124. package/chunks/{list-7XLPV5GC.js → list-QXQF6C53.js} +17 -17
  125. package/chunks/{loadedSettingsAdapter-YK5SBHOT.js → loadedSettingsAdapter-4D7GUGW6.js} +14 -14
  126. package/chunks/{loggingContentGenerator-I7QDXS43.js → loggingContentGenerator-2P3MNACM.js} +3 -3
  127. package/chunks/{managed-npm-update-YSL7PA7G.js → managed-npm-update-LWVJQTWO.js} +21 -12
  128. package/chunks/{mcp-RKFQZXP6.js → mcp-GHETAR6V.js} +14 -14
  129. package/chunks/{monitor-QHHJIKGL.js → monitor-4T7W4M6Q.js} +8 -8
  130. package/chunks/{nonInteractiveCli-XEBIE7MG.js → nonInteractiveCli-P4UKCJFM.js} +42 -42
  131. package/chunks/{notebook-edit-SG7X2EQA.js → notebook-edit-OC2V7U5D.js} +8 -8
  132. package/chunks/{openaiContentGenerator-63CVR33K.js → openaiContentGenerator-RAJUFWQY.js} +3 -3
  133. package/chunks/{pidfile-I3CXJGQD.js → pidfile-HVPYVRLS.js} +8 -8
  134. package/chunks/{processUtils-LJ3DSANX.js → processUtils-VIQ4JHVX.js} +2 -2
  135. package/chunks/{qwenContentGenerator-JINBVCH6.js → qwenContentGenerator-2QLCUFNZ.js} +9 -9
  136. package/chunks/{qwenOAuth2-SY2O3NRR.js → qwenOAuth2-J2X3EN43.js} +1 -1
  137. package/chunks/{read-file-PGTXF25I.js → read-file-ZNAN2B26.js} +2 -2
  138. package/chunks/{resumeHistoryUtils-FB2NFVZ2.js → resumeHistoryUtils-RCY7AL5Y.js} +12 -12
  139. package/chunks/{ripGrep-IY3KGPM6.js → ripGrep-C3KMLZM5.js} +8 -8
  140. package/chunks/{run-qwen-serve-UYEMGPKA.js → run-qwen-serve-3JN75CIQ.js} +481 -74
  141. package/chunks/{runtime-CG3BKRFE.js → runtime-VUA4WQYD.js} +17 -17
  142. package/chunks/{scheduler-VFUVGDE5.js → scheduler-Z4IBXCOY.js} +8 -8
  143. package/chunks/{serve-ZCCQ2G2L.js → serve-67T3P7XI.js} +14 -14
  144. package/chunks/{server-WS7LWXPP.js → server-46ZO2CLV.js} +7648 -596
  145. package/chunks/{session-IQLCT32T.js → session-B4IFAFC4.js} +45 -45
  146. package/chunks/{settings-NX4EUIE6.js → settings-AI2BTBOZ.js} +13 -13
  147. package/chunks/{shell-THDYM4CS.js → shell-BKII3B6E.js} +8 -8
  148. package/chunks/{skill-OXXZBNQB.js → skill-6CFOWVGA.js} +3 -3
  149. package/chunks/{skill-settings-T3JZ33T2.js → skill-settings-6BFQWMW4.js} +13 -13
  150. package/chunks/{spawnChannel-COLJMSA7.js → spawnChannel-FJXW35U7.js} +10 -10
  151. package/chunks/{standalone-update-ICW7H5IF.js → standalone-update-WVINHRNS.js} +11 -11
  152. package/chunks/{startInteractiveUI-6BDRXSMF.js → startInteractiveUI-YE57CJ57.js} +132 -132
  153. package/chunks/{stdioHelpers-HGIYTWAY.js → stdioHelpers-7A2EE64Z.js} +5 -3
  154. package/chunks/{task-create-2X4UP4F3.js → task-create-Q727MXHJ.js} +2 -2
  155. package/chunks/{task-list-WOLJPZ64.js → task-list-G6KPQ5JT.js} +1 -1
  156. package/chunks/{task-update-VDUSN36E.js → task-update-YB7PXO4R.js} +2 -2
  157. package/chunks/{team-create-BCSMDK4Z.js → team-create-GNC7NFY6.js} +8 -8
  158. package/chunks/{team-delete-D2VMSDOT.js → team-delete-GDO7H2T4.js} +1 -1
  159. package/chunks/{team-plan-approval-B5YRLJFV.js → team-plan-approval-ECALJLIO.js} +8 -8
  160. package/chunks/{terminal-image-renderer-PW6Z6VFY.js → terminal-image-renderer-II74TFVW.js} +8 -8
  161. package/chunks/{theme-manager-CMVKD2JH.js → theme-manager-2MGEDD22.js} +8 -8
  162. package/chunks/{tool-search-SQTUSG6P.js → tool-search-S6LRRACA.js} +2 -2
  163. package/chunks/{total-session-admission-XAXOSE46.js → total-session-admission-7WVAWQPU.js} +13 -13
  164. package/chunks/{trustedFolders-Z2UAEG2V.js → trustedFolders-NFS4KHO4.js} +10 -10
  165. package/chunks/{update-relaunch-JBLI6LJF.js → update-relaunch-Q5HLZ6UW.js} +6 -6
  166. package/chunks/{updateCheck-FDAVGOFT.js → updateCheck-UOVZSTP7.js} +12 -12
  167. package/chunks/{useAutoAcceptIndicator-PDZFIYRM.js → useAutoAcceptIndicator-PC6MOJCO.js} +16 -16
  168. package/chunks/{validateNonInterActiveAuth-Q4763ONQ.js → validateNonInterActiveAuth-YMQP3ZM7.js} +39 -39
  169. package/chunks/{version-C7MPCGWD.js → version-T4AQFZJH.js} +1 -1
  170. package/chunks/{web-fetch-L7RAPOJB.js → web-fetch-JQCJHEEX.js} +2 -2
  171. package/chunks/{web-search-IDOYUOWX.js → web-search-QGZ2KY4G.js} +2 -2
  172. package/chunks/{workflow-HXURUJB5.js → workflow-YIT27YWZ.js} +9 -9
  173. package/chunks/{workspace-providers-status-JZ3GPWNU.js → workspace-providers-status-FIDZQ2PL.js} +17 -17
  174. package/chunks/{workspace-registration-store-SM2PWB6L.js → workspace-registration-store-RCSPE4DU.js} +1 -1
  175. package/chunks/{workspace-registry-6W4ES7BJ.js → workspace-registry-5PEUCY6E.js} +13 -13
  176. package/chunks/{workspace-service-V47ZFJRX.js → workspace-service-LANDVPL7.js} +18 -18
  177. package/chunks/{workspace-skills-status-6ZQ45XKA.js → workspace-skills-status-2IQVJNIN.js} +15 -15
  178. package/chunks/{workspace-trust-reconciler-6V25LMCN.js → workspace-trust-reconciler-CZPZZCZC.js} +22 -22
  179. package/chunks/{write-file-H2QOF25K.js → write-file-G5VNGCOG.js} +8 -8
  180. package/chunks/{zoom-image-JTUSS43N.js → zoom-image-6RBLD7X6.js} +2 -2
  181. package/cli.js +15 -15
  182. package/package.json +3 -3
  183. package/web-shell/assets/{arc-DtI1rZcQ.js → arc-B-Vtkp1W.js} +1 -1
  184. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BPZwSVct.js → architectureDiagram-3BPJPVTR-qmTXIj64.js} +1 -1
  185. package/web-shell/assets/{blockDiagram-GPEHLZMM-BIQ03j4C.js → blockDiagram-GPEHLZMM-ZlnXEtdP.js} +1 -1
  186. package/web-shell/assets/{c4Diagram-AAUBKEIU-CB0RyFGm.js → c4Diagram-AAUBKEIU-Wyoirf6Z.js} +1 -1
  187. package/web-shell/assets/channel-DXaHnfjS.js +1 -0
  188. package/web-shell/assets/{chunk-2J33WTMH-B3WoS-4H.js → chunk-2J33WTMH-WQwbq9d8.js} +1 -1
  189. package/web-shell/assets/{chunk-4BX2VUAB-C98xYZ1X.js → chunk-4BX2VUAB-DQKnAXC4.js} +1 -1
  190. package/web-shell/assets/{chunk-55IACEB6-CbTIWRwQ.js → chunk-55IACEB6-DIdgXNcO.js} +1 -1
  191. package/web-shell/assets/{chunk-727SXJPM-DWGnKTPu.js → chunk-727SXJPM-CUwGOLEd.js} +1 -1
  192. package/web-shell/assets/{chunk-AQP2D5EJ-4__QyCEX.js → chunk-AQP2D5EJ-CCBGZFZ4.js} +1 -1
  193. package/web-shell/assets/{chunk-FMBD7UC4-DFtG1YCW.js → chunk-FMBD7UC4-DMGXProk.js} +1 -1
  194. package/web-shell/assets/{chunk-ND2GUHAM-rvAhW51N.js → chunk-ND2GUHAM-yejcFqsh.js} +1 -1
  195. package/web-shell/assets/{chunk-QZHKN3VN-DfiU9pwZ.js → chunk-QZHKN3VN-DxCyqTf7.js} +1 -1
  196. package/web-shell/assets/classDiagram-4FO5ZUOK-BigU82A0.js +1 -0
  197. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BigU82A0.js +1 -0
  198. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cc4EIdxu.js → cose-bilkent-S5V4N54A-DOrF3cg_.js} +1 -1
  199. package/web-shell/assets/{dagre-BM42HDAG-CZNj4dGW.js → dagre-BM42HDAG-Be6CdYQ_.js} +1 -1
  200. package/web-shell/assets/{diagram-2AECGRRQ-D5tiqQCr.js → diagram-2AECGRRQ-B_Rjsft2.js} +1 -1
  201. package/web-shell/assets/{diagram-5GNKFQAL-pwzw0jVO.js → diagram-5GNKFQAL-BvQbKSm1.js} +1 -1
  202. package/web-shell/assets/{diagram-KO2AKTUF-4CWiM00x.js → diagram-KO2AKTUF-BsdmMdpS.js} +1 -1
  203. package/web-shell/assets/{diagram-LMA3HP47-Dd7rc7Qf.js → diagram-LMA3HP47-CrQlBaNr.js} +1 -1
  204. package/web-shell/assets/{diagram-OG6HWLK6-_vzV52ml.js → diagram-OG6HWLK6-aB1MD_DL.js} +1 -1
  205. package/web-shell/assets/{erDiagram-TEJ5UH35-CqbE2bx_.js → erDiagram-TEJ5UH35-F-eUUn9n.js} +1 -1
  206. package/web-shell/assets/{flowDiagram-I6XJVG4X-CaxNr7w4.js → flowDiagram-I6XJVG4X-DY_d8lUK.js} +1 -1
  207. package/web-shell/assets/{ganttDiagram-6RSMTGT7-AGjrtfUA.js → ganttDiagram-6RSMTGT7-Dqu7KBPg.js} +1 -1
  208. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-ADG2zSkc.js → gitGraphDiagram-PVQCEYII-2IkU_VEj.js} +1 -1
  209. package/web-shell/assets/{index-BOryKCqt.js → index-BuSbqggh.js} +1 -1
  210. package/web-shell/assets/index-DrfC2e9s.js +1768 -0
  211. package/web-shell/assets/index-QQlUCJGg.css +5 -0
  212. package/web-shell/assets/{infoDiagram-5YYISTIA-CE3B_IoZ.js → infoDiagram-5YYISTIA-C4orwzPw.js} +1 -1
  213. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CN-Frhoi.js → ishikawaDiagram-YF4QCWOH-fXUEfef_.js} +1 -1
  214. package/web-shell/assets/{journeyDiagram-JHISSGLW-CGgezS93.js → journeyDiagram-JHISSGLW-Bs0I1_J5.js} +1 -1
  215. package/web-shell/assets/{kanban-definition-UN3LZRKU-BqWijky5.js → kanban-definition-UN3LZRKU-BPRj1dw_.js} +1 -1
  216. package/web-shell/assets/{linear-D8sfpZf6.js → linear-DFS6ZDpW.js} +1 -1
  217. package/web-shell/assets/{mermaid.core-3PA4QrzM.js → mermaid.core-CZxjWMaO.js} +5 -5
  218. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D9QxwiCY.js → mindmap-definition-RKZ34NQL-Dsr3PmNs.js} +1 -1
  219. package/web-shell/assets/{pieDiagram-4H26LBE5-Bioaf6uE.js → pieDiagram-4H26LBE5-D5Ngpz5Y.js} +1 -1
  220. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DBb2AS73.js → quadrantDiagram-W4KKPZXB-WJK9I25z.js} +1 -1
  221. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DXOvZ3KB.js → requirementDiagram-4Y6WPE33-CmrYcwOH.js} +1 -1
  222. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-D9qg09Dm.js → sankeyDiagram-5OEKKPKP-7SjCc4Mv.js} +1 -1
  223. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DSAUIfpw.js → sequenceDiagram-3UESZ5HK-Dl9E0IRM.js} +1 -1
  224. package/web-shell/assets/{stateDiagram-AJRCARHV-BPZkzfQ3.js → stateDiagram-AJRCARHV-CRRio7yV.js} +1 -1
  225. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-1atT7XaU.js +1 -0
  226. package/web-shell/assets/{timeline-definition-PNZ67QCA-UDaQp9sP.js → timeline-definition-PNZ67QCA-DVyXjjfq.js} +1 -1
  227. package/web-shell/assets/{vennDiagram-CIIHVFJN-2ouhAnHO.js → vennDiagram-CIIHVFJN-Nb2Lckzq.js} +1 -1
  228. package/web-shell/assets/{wardley-L42UT6IY-Cq_WEvTK.js → wardley-L42UT6IY-DuL_otIP.js} +1 -1
  229. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-Dt24aXOM.js → wardleyDiagram-YWT4CUSO-DVI9Q4Aa.js} +1 -1
  230. package/web-shell/assets/{xychartDiagram-2RQKCTM6-A5Xk2WCH.js → xychartDiagram-2RQKCTM6-BNjAm7KD.js} +1 -1
  231. package/web-shell/index.html +2 -2
  232. package/chunks/create-sub-session-MWUWNBM6.js +0 -401
  233. package/web-shell/assets/channel-vfbVFuM1.js +0 -1
  234. package/web-shell/assets/classDiagram-4FO5ZUOK-Cvr8atq3.js +0 -1
  235. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cvr8atq3.js +0 -1
  236. package/web-shell/assets/index-Cb1LjsCv.css +0 -5
  237. package/web-shell/assets/index-CvJDaIy8.js +0 -1756
  238. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DInOqnhZ.js +0 -1
@@ -32,10 +32,11 @@ import {
32
32
  positiveFiniteOrNull,
33
33
  prepareManagedScratchRoot,
34
34
  require_express,
35
+ resolveAcpHttpEnabled,
35
36
  resolveWebShellDir,
36
37
  setDeferredRuntimeRequestTiming,
37
38
  toDaemonStatusMemoryLimits
38
- } from "./chunk-XZCMQUOF.js";
39
+ } from "./chunk-YZQTA3ID.js";
39
40
  import {
40
41
  isLoopbackBind
41
42
  } from "./chunk-RXFQM6FQ.js";
@@ -43,6 +44,9 @@ import {
43
44
  formatMemoryBudgetStderr,
44
45
  resolveDaemonMemoryBudget
45
46
  } from "./chunk-HGCQ5SE7.js";
47
+ import {
48
+ LIVE_HOST_PROTOCOL_VERSION
49
+ } from "./chunk-NKLP3DCK.js";
46
50
  import {
47
51
  DEFAULT_COMPACTED_REPLAY_MAX_BYTES,
48
52
  DEFAULT_MAX_JOURNAL_BYTES,
@@ -65,24 +69,24 @@ import {
65
69
  MAX_REGISTERED_WORKSPACES,
66
70
  resolveWorkspaceInputs,
67
71
  workspaceRegistrationId
68
- } from "./chunk-WAOLM6SQ.js";
69
- import "./chunk-3DTM3RPU.js";
72
+ } from "./chunk-4JH77A2U.js";
73
+ import "./chunk-S7CV4KO6.js";
70
74
  import {
71
75
  LOAD_REPLAY_META_KEY
72
- } from "./chunk-UKZEXS6K.js";
76
+ } from "./chunk-R574ATRM.js";
73
77
  import "./chunk-J26HHFI5.js";
74
78
  import {
75
79
  canonicalizeWorkspace,
76
80
  translateAndCheckAbsoluteWorkspacePath
77
81
  } from "./chunk-6PLDPT2C.js";
78
- import "./chunk-XNZBXQCG.js";
82
+ import "./chunk-MKVZE4ZJ.js";
79
83
  import "./chunk-FYJ7W2PI.js";
80
84
  import {
81
85
  ChannelDeliveryError,
82
86
  ChannelWebhookEnqueueError,
83
87
  QWEN_SERVER_TOKEN_ENV,
84
88
  isChannelDeliveryError
85
- } from "./chunk-QONSRAEV.js";
89
+ } from "./chunk-YP5KH5Y7.js";
86
90
  import {
87
91
  normalizeWorkerDiagnostic,
88
92
  sanitizeWorkerDiagnostic
@@ -90,7 +94,7 @@ import {
90
94
  import {
91
95
  channelSelectionNames
92
96
  } from "./chunk-ALMR3E6Q.js";
93
- import "./chunk-BK2UNYWD.js";
97
+ import "./chunk-HIBNSEJE.js";
94
98
  import {
95
99
  EXTERNAL_TOOL_GUARD_REQUIRED_VALUE,
96
100
  EXTERNAL_TOOL_GUARD_TOKEN_ENV,
@@ -110,7 +114,7 @@ import {
110
114
  import "./chunk-6PEXNQTX.js";
111
115
  import {
112
116
  getCliVersion
113
- } from "./chunk-NKST54XA.js";
117
+ } from "./chunk-YMBOEAF4.js";
114
118
  import "./chunk-VJNBRRZG.js";
115
119
  import "./chunk-ALGGS7UH.js";
116
120
  import {
@@ -133,7 +137,7 @@ import "./chunk-Q7YDKOGY.js";
133
137
  import {
134
138
  writeStderrLine,
135
139
  writeStdoutLine
136
- } from "./chunk-OWAK7LMW.js";
140
+ } from "./chunk-KGJGEEVR.js";
137
141
  import "./chunk-DMTGGOSA.js";
138
142
  import "./chunk-YQ3U5MUC.js";
139
143
  import {
@@ -147,7 +151,7 @@ import {
147
151
  // packages/cli/src/serve/run-qwen-serve.ts
148
152
  init_esbuild_shims();
149
153
  var import_express = __toESM(require_express(), 1);
150
- import { X509Certificate, createHash as createHash2, timingSafeEqual } from "node:crypto";
154
+ import { X509Certificate, createHash as createHash3, timingSafeEqual } from "node:crypto";
151
155
  import * as fs from "node:fs";
152
156
  import * as https from "node:https";
153
157
  import * as path from "node:path";
@@ -1283,7 +1287,7 @@ function createConcreteLogger(input) {
1283
1287
  }
1284
1288
  });
1285
1289
  let timeout;
1286
- const deadline = new Promise((resolve2) => {
1290
+ const deadline = new Promise((resolve3) => {
1287
1291
  timeout = setTimeout(() => {
1288
1292
  try {
1289
1293
  input.warnOnce(
@@ -1292,7 +1296,7 @@ function createConcreteLogger(input) {
1292
1296
  );
1293
1297
  } catch {
1294
1298
  } finally {
1295
- resolve2();
1299
+ resolve3();
1296
1300
  }
1297
1301
  }, input.policy.closeDrainBudgetMs);
1298
1302
  timeout.unref();
@@ -1636,6 +1640,190 @@ ${capUtf8Record(
1636
1640
  }
1637
1641
  __name(initDaemonLogger, "initDaemonLogger");
1638
1642
 
1643
+ // packages/cli/src/serve/live/conversation-workspace.ts
1644
+ init_esbuild_shims();
1645
+ import { createHash as createHash2 } from "node:crypto";
1646
+ import { lstat, mkdir, realpath, rmdir } from "node:fs/promises";
1647
+ import { homedir } from "node:os";
1648
+ import { isAbsolute, join as join2, relative as relative2, resolve, sep } from "node:path";
1649
+ var isSamePath = /* @__PURE__ */ __name((left, right) => process.platform === "win32" ? left.toLowerCase() === right.toLowerCase() : left === right, "isSamePath");
1650
+ function conversationDirectoryName(sessionId) {
1651
+ if (sessionId.length === 0 || sessionId.length > 256) {
1652
+ throw new Error("Live conversation session id is invalid");
1653
+ }
1654
+ return `conversation-${createHash2("sha256").update(sessionId).digest("hex")}`;
1655
+ }
1656
+ __name(conversationDirectoryName, "conversationDirectoryName");
1657
+ function validateRootStats(stats, label = "root") {
1658
+ if (stats.isSymbolicLink() || !stats.isDirectory()) {
1659
+ throw new Error(
1660
+ `Live conversation ${label} must be a non-symlink directory`
1661
+ );
1662
+ }
1663
+ if (process.platform !== "win32" && typeof process.getuid === "function" && stats.uid !== process.getuid()) {
1664
+ throw new Error(
1665
+ `Live conversation ${label} must be owned by the daemon user`
1666
+ );
1667
+ }
1668
+ if (process.platform !== "win32" && (stats.mode & 63) !== 0) {
1669
+ throw new Error(
1670
+ `Live conversation ${label} must be accessible only to its owner`
1671
+ );
1672
+ }
1673
+ }
1674
+ __name(validateRootStats, "validateRootStats");
1675
+ function hasIdentity(stats, root) {
1676
+ return stats.dev === root.device && stats.ino === root.inode;
1677
+ }
1678
+ __name(hasIdentity, "hasIdentity");
1679
+ async function validateConversationDirectory(root, name, candidate, parent = root.canonicalRoot) {
1680
+ const before = await lstat(candidate);
1681
+ validateRootStats(before, "directory");
1682
+ const canonical = await realpath(candidate);
1683
+ const after = await lstat(canonical);
1684
+ validateRootStats(after, "directory");
1685
+ const child = relative2(parent, canonical);
1686
+ if (child !== name || child.includes(sep) || child.startsWith("..") || isAbsolute(child) || before.dev !== after.dev || before.ino !== after.ino) {
1687
+ throw new Error(
1688
+ "Live conversation directory must be an owned direct child"
1689
+ );
1690
+ }
1691
+ await revalidateLiveConversationRoot(root);
1692
+ return canonical;
1693
+ }
1694
+ __name(validateConversationDirectory, "validateConversationDirectory");
1695
+ function getLiveConversationRootPath(homeDir = homedir()) {
1696
+ return resolve(homeDir, "Documents", "Qwen Code", "Conversations");
1697
+ }
1698
+ __name(getLiveConversationRootPath, "getLiveConversationRootPath");
1699
+ async function createRoot(configuredRoot) {
1700
+ try {
1701
+ await mkdir(configuredRoot, { recursive: true, mode: 448 });
1702
+ } catch (error) {
1703
+ let existing;
1704
+ try {
1705
+ existing = await lstat(configuredRoot);
1706
+ } catch {
1707
+ throw error;
1708
+ }
1709
+ validateRootStats(existing);
1710
+ throw error;
1711
+ }
1712
+ const before = await lstat(configuredRoot);
1713
+ validateRootStats(before);
1714
+ const canonicalRoot = await realpath(configuredRoot);
1715
+ const after = await lstat(canonicalRoot);
1716
+ validateRootStats(after);
1717
+ if (before.dev !== after.dev || before.ino !== after.ino) {
1718
+ throw new Error(
1719
+ "Live conversation root identity changed during validation"
1720
+ );
1721
+ }
1722
+ return {
1723
+ configuredRoot,
1724
+ canonicalRoot,
1725
+ device: after.dev,
1726
+ inode: after.ino
1727
+ };
1728
+ }
1729
+ __name(createRoot, "createRoot");
1730
+ async function revalidateLiveConversationRoot(root) {
1731
+ const configuredStats = await lstat(root.configuredRoot);
1732
+ validateRootStats(configuredStats);
1733
+ if (!hasIdentity(configuredStats, root)) {
1734
+ throw new Error("Live conversation root identity changed");
1735
+ }
1736
+ const canonical = await realpath(root.configuredRoot);
1737
+ if (!isSamePath(canonical, root.canonicalRoot)) {
1738
+ throw new Error("Live conversation root canonical path changed");
1739
+ }
1740
+ const canonicalStats = await lstat(root.canonicalRoot);
1741
+ validateRootStats(canonicalStats);
1742
+ if (!hasIdentity(canonicalStats, root)) {
1743
+ throw new Error("Live conversation root identity changed");
1744
+ }
1745
+ return root;
1746
+ }
1747
+ __name(revalidateLiveConversationRoot, "revalidateLiveConversationRoot");
1748
+ async function assertExactLiveConversationRoot(root, candidate) {
1749
+ await revalidateLiveConversationRoot(root);
1750
+ const resolvedCandidate = resolve(candidate);
1751
+ if (!isSamePath(resolvedCandidate, root.configuredRoot) && !isSamePath(resolvedCandidate, root.canonicalRoot)) {
1752
+ throw new Error("Workspace must be the exact Live conversation root");
1753
+ }
1754
+ const stats = await lstat(resolvedCandidate);
1755
+ validateRootStats(stats);
1756
+ const canonical = await realpath(resolvedCandidate);
1757
+ if (!isSamePath(canonical, root.canonicalRoot) || !hasIdentity(stats, root)) {
1758
+ throw new Error("Workspace must be the exact Live conversation root");
1759
+ }
1760
+ return root;
1761
+ }
1762
+ __name(assertExactLiveConversationRoot, "assertExactLiveConversationRoot");
1763
+ var LiveConversationWorkspace = class {
1764
+ static {
1765
+ __name(this, "LiveConversationWorkspace");
1766
+ }
1767
+ rootPath;
1768
+ rootPromise;
1769
+ constructor(options = {}) {
1770
+ this.rootPath = getLiveConversationRootPath(options.homeDir);
1771
+ }
1772
+ async getRoot() {
1773
+ if (!this.rootPromise) {
1774
+ const pending = createRoot(this.rootPath);
1775
+ this.rootPromise = pending;
1776
+ void pending.catch(() => {
1777
+ if (this.rootPromise === pending) this.rootPromise = void 0;
1778
+ });
1779
+ }
1780
+ return this.rootPromise;
1781
+ }
1782
+ async revalidate() {
1783
+ return revalidateLiveConversationRoot(await this.getRoot());
1784
+ }
1785
+ async assertExactRoot(candidate) {
1786
+ return assertExactLiveConversationRoot(await this.getRoot(), candidate);
1787
+ }
1788
+ async materializeConversationDirectory(sessionId) {
1789
+ const root = await this.revalidate();
1790
+ const name = conversationDirectoryName(sessionId);
1791
+ const candidate = join2(root.canonicalRoot, name);
1792
+ try {
1793
+ await mkdir(candidate, { mode: 448 });
1794
+ } catch (error) {
1795
+ if (!error || typeof error !== "object" || error.code !== "EEXIST") {
1796
+ throw error;
1797
+ }
1798
+ }
1799
+ return validateConversationDirectory(root, name, candidate);
1800
+ }
1801
+ async discardEmptyConversationDirectory(sessionId) {
1802
+ const root = await this.revalidate();
1803
+ const name = conversationDirectoryName(sessionId);
1804
+ const candidate = join2(root.canonicalRoot, name);
1805
+ let canonical;
1806
+ try {
1807
+ canonical = await validateConversationDirectory(root, name, candidate);
1808
+ } catch (error) {
1809
+ if (error && typeof error === "object" && error.code === "ENOENT") {
1810
+ return false;
1811
+ }
1812
+ throw error;
1813
+ }
1814
+ try {
1815
+ await rmdir(canonical);
1816
+ } catch (error) {
1817
+ if (error && typeof error === "object" && (error.code === "ENOENT" || error.code === "ENOTEMPTY")) {
1818
+ return false;
1819
+ }
1820
+ throw error;
1821
+ }
1822
+ await revalidateLiveConversationRoot(root);
1823
+ return true;
1824
+ }
1825
+ };
1826
+
1639
1827
  // packages/cli/src/serve/daemon-metrics-ring.ts
1640
1828
  init_esbuild_shims();
1641
1829
  var MAX_SAMPLES_PER_WINDOW = 4096;
@@ -2292,7 +2480,10 @@ function rawChannelCwd(entry) {
2292
2480
  }
2293
2481
  __name(rawChannelCwd, "rawChannelCwd");
2294
2482
  function resolveChannelWorkspaceGroups(input) {
2295
- const { workspaces, selection, loadChannelsConfig } = input;
2483
+ const { selection, loadChannelsConfig } = input;
2484
+ const workspaces = input.workspaces.filter(
2485
+ (workspace) => workspace.provenance !== "live-conversation"
2486
+ );
2296
2487
  const primary = workspaces.find((workspace) => workspace.primary);
2297
2488
  if (!primary) {
2298
2489
  return {
@@ -2400,6 +2591,7 @@ var QWEN_SERVE_PROMPT_DEADLINE_MS_ENV = "QWEN_SERVE_PROMPT_DEADLINE_MS";
2400
2591
  var QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS_ENV = "QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS";
2401
2592
  var SHUTDOWN_FORCE_CLOSE_MS = 5e3;
2402
2593
  var DAEMON_LOG_FORCED_FLUSH_BUDGET_MS = 250;
2594
+ var DEFAULT_LIVE_DISCOVERY_RETRY_MS = 5e3;
2403
2595
  function channelDeliveryPublicError(code) {
2404
2596
  switch (code) {
2405
2597
  case "channel_worker_unavailable":
@@ -2490,8 +2682,8 @@ async function flushDaemonLogBounded(daemonLog, budgetMs) {
2490
2682
  await Promise.race([
2491
2683
  daemonLog.flush().catch(() => {
2492
2684
  }),
2493
- new Promise((resolve2) => {
2494
- timer = setTimeout(resolve2, budgetMs);
2685
+ new Promise((resolve3) => {
2686
+ timer = setTimeout(resolve3, budgetMs);
2495
2687
  timer.unref();
2496
2688
  })
2497
2689
  ]);
@@ -2738,12 +2930,12 @@ var retryableChannelWorkerShutdownErrors = /* @__PURE__ */ new WeakSet();
2738
2930
  var channelWorkerRuntimePromise;
2739
2931
  async function loadChannelWorkerRuntime() {
2740
2932
  channelWorkerRuntimePromise ??= Promise.all([
2741
- import("./channel-worker-supervisor-NUEDVHX4.js"),
2742
- import("./pidfile-I3CXJGQD.js"),
2743
- import("./runtime-CG3BKRFE.js"),
2933
+ import("./channel-worker-supervisor-62YWUGP2.js"),
2934
+ import("./pidfile-HVPYVRLS.js"),
2935
+ import("./runtime-VUA4WQYD.js"),
2744
2936
  import("./cli-entry-path-4VJ3Y6T2.js"),
2745
- import("./channel-worker-group-SVGPDH2C.js"),
2746
- import("./channel-worker-manager-72ZK2GTS.js")
2937
+ import("./channel-worker-group-JWQK224X.js"),
2938
+ import("./channel-worker-manager-77E3OXRQ.js")
2747
2939
  ]).then(
2748
2940
  ([
2749
2941
  supervisor,
@@ -2848,10 +3040,16 @@ function shouldPreheatBridge(deps) {
2848
3040
  __name(shouldPreheatBridge, "shouldPreheatBridge");
2849
3041
  var coreRuntimePromise;
2850
3042
  function loadCoreRuntime() {
2851
- coreRuntimePromise ??= import("./core-runtime-D2626QQU.js");
3043
+ coreRuntimePromise ??= import("./core-runtime-U4VJ5TIV.js");
2852
3044
  return coreRuntimePromise;
2853
3045
  }
2854
3046
  __name(loadCoreRuntime, "loadCoreRuntime");
3047
+ var liveDiscoveryRuntimePromise;
3048
+ function loadLiveDiscoveryRuntime() {
3049
+ liveDiscoveryRuntimePromise ??= import("./discovery-XLHITE74.js");
3050
+ return liveDiscoveryRuntimePromise;
3051
+ }
3052
+ __name(loadLiveDiscoveryRuntime, "loadLiveDiscoveryRuntime");
2855
3053
  async function resolveDaemonLogBaseDirForRun(input) {
2856
3054
  if (input.deps.daemonLogBaseDir) {
2857
3055
  return input.deps.daemonLogBaseDir;
@@ -2878,10 +3076,10 @@ __name(resolveDaemonLogBaseDirForRun, "resolveDaemonLogBaseDirForRun");
2878
3076
  var settingsRuntimePromise;
2879
3077
  function loadSettingsRuntimeModules() {
2880
3078
  settingsRuntimePromise ??= Promise.all([
2881
- import("./settings-NX4EUIE6.js"),
2882
- import("./environment-U6QP23VJ.js"),
2883
- import("./loadedSettingsAdapter-YK5SBHOT.js"),
2884
- import("./trustedFolders-Z2UAEG2V.js")
3079
+ import("./settings-AI2BTBOZ.js"),
3080
+ import("./environment-W5TRDM3G.js"),
3081
+ import("./loadedSettingsAdapter-4D7GUGW6.js"),
3082
+ import("./trustedFolders-NFS4KHO4.js")
2885
3083
  ]).then(([settings, environment, loadedSettingsAdapter, trustedFolders]) => ({
2886
3084
  settings,
2887
3085
  environment,
@@ -2894,8 +3092,8 @@ __name(loadSettingsRuntimeModules, "loadSettingsRuntimeModules");
2894
3092
  var channelWebhookConfigRuntimePromise;
2895
3093
  function loadChannelWebhookConfigRuntime() {
2896
3094
  channelWebhookConfigRuntimePromise ??= Promise.all([
2897
- import("./runtime-CG3BKRFE.js"),
2898
- import("./config-utils-LIRO7NSU.js")
3095
+ import("./runtime-VUA4WQYD.js"),
3096
+ import("./config-utils-VXD4SPVR.js")
2899
3097
  ]).then(([channelRuntime, configUtils]) => ({
2900
3098
  loadChannelsConfig: channelRuntime.loadChannelsConfig,
2901
3099
  parseChannelWebhookConfig: configUtils.parseChannelWebhookConfig
@@ -2920,17 +3118,17 @@ async function loadServeRuntimeModules() {
2920
3118
  totalSessionAdmissionModule,
2921
3119
  workspaceRegistryModule
2922
3120
  ] = await Promise.all([
2923
- import("./server-WS7LWXPP.js"),
2924
- import("./bridge-TCFMLKHR.js"),
2925
- import("./spawnChannel-COLJMSA7.js"),
3121
+ import("./server-46ZO2CLV.js"),
3122
+ import("./bridge-RPAU64CA.js"),
3123
+ import("./spawnChannel-FJXW35U7.js"),
2926
3124
  import("./process-registry-2CHQBXH5.js"),
2927
- import("./workspace-service-V47ZFJRX.js"),
3125
+ import("./workspace-service-LANDVPL7.js"),
2928
3126
  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")
3127
+ import("./daemon-status-provider-UJUGTDTL.js"),
3128
+ import("./workspace-providers-status-FIDZQ2PL.js"),
3129
+ import("./workspace-skills-status-2IQVJNIN.js"),
3130
+ import("./total-session-admission-7WVAWQPU.js"),
3131
+ import("./workspace-registry-5PEUCY6E.js")
2934
3132
  ]);
2935
3133
  return {
2936
3134
  createServeApp: serverModule.createServeApp,
@@ -3125,12 +3323,12 @@ async function waitForRuntimeStartingForShutdown(runtimeStarting, daemonLog, tim
3125
3323
  let timer;
3126
3324
  await Promise.race([
3127
3325
  runtimeStarting,
3128
- new Promise((resolve2) => {
3326
+ new Promise((resolve3) => {
3129
3327
  timer = setTimeout(() => {
3130
3328
  daemonLog.warn(
3131
3329
  `${timeoutMs}ms runtime-startup wait reached during shutdown; continuing listener close`
3132
3330
  );
3133
- resolve2();
3331
+ resolve3();
3134
3332
  }, timeoutMs);
3135
3333
  timer.unref();
3136
3334
  })
@@ -3496,8 +3694,8 @@ function matchesWebhookSecret(candidate, expected) {
3496
3694
  if (typeof candidate !== "string" || typeof expected !== "string" || expected.length === 0) {
3497
3695
  return false;
3498
3696
  }
3499
- const expectedDigest = createHash2("sha256").update(expected).digest();
3500
- const candidateDigest = createHash2("sha256").update(candidate).digest();
3697
+ const expectedDigest = createHash3("sha256").update(expected).digest();
3698
+ const candidateDigest = createHash3("sha256").update(candidate).digest();
3501
3699
  return timingSafeEqual(expectedDigest, candidateDigest);
3502
3700
  }
3503
3701
  __name(matchesWebhookSecret, "matchesWebhookSecret");
@@ -3842,7 +4040,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
3842
4040
  }
3843
4041
  let workspaceRegistrationStore = deps.workspaceRegistrationStore;
3844
4042
  if (workspaceRegistrationStore === void 0 && process.env["QWEN_SERVE_NO_PERSISTENT_REGISTRATION"] !== "1") {
3845
- const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-SM2PWB6L.js");
4043
+ const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-RCSPE4DU.js");
3846
4044
  workspaceRegistrationStore = new WorkspaceRegistrationStore(boundWorkspace);
3847
4045
  }
3848
4046
  if (workspaceRegistrationStore) {
@@ -4125,8 +4323,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4125
4323
  let startRuntimeAfterHealth;
4126
4324
  let startRuntimeForRequest;
4127
4325
  const deferRuntimeUntilFirstHealth = deps.resolveOnListen === true && deps.deferRuntimeUntilFirstHealth === true;
4128
- const runtimeReady = new Promise((resolve2, reject) => {
4129
- markRuntimeReady = resolve2;
4326
+ const runtimeReady = new Promise((resolve3, reject) => {
4327
+ markRuntimeReady = resolve3;
4130
4328
  markRuntimeFailed = reject;
4131
4329
  });
4132
4330
  void runtimeReady.catch(() => {
@@ -4320,6 +4518,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4320
4518
  }, "stopSafely");
4321
4519
  stopSafely("scheduled-task keepalive", locals.stopScheduledTaskKeepalive);
4322
4520
  stopSafely("workspace git state", locals.stopWorkspaceGitState);
4521
+ stopSafely("Live Host coordinator", locals.stopLiveCoordinator);
4323
4522
  stopTrustPolicyMonitor(app2);
4324
4523
  for (const stop of locals.subSessionStoppers ?? []) {
4325
4524
  stopSafely("sub-session launcher", stop);
@@ -4379,7 +4578,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4379
4578
  loadCoreRuntime(),
4380
4579
  loadSettingsRuntimeModules(),
4381
4580
  cliVersionPromise,
4382
- import("./daemon-trust-policy-B3EPDJDR.js")
4581
+ import("./daemon-trust-policy-ZHDD5VYQ.js")
4383
4582
  ]);
4384
4583
  cliVersion = resolvedCliVersion;
4385
4584
  settingsRuntime.environment.preResolveHomeEnvOverrides();
@@ -4402,6 +4601,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4402
4601
  `qwen serve: managed scratch workspaces are unavailable: ${err instanceof Error ? err.message : String(err)}`
4403
4602
  );
4404
4603
  }
4604
+ const liveConversationWorkspace = deps.liveConversationWorkspace ?? new LiveConversationWorkspace();
4405
4605
  let runtimeBootSettings;
4406
4606
  try {
4407
4607
  runtimeBootSettings = settingsRuntime.settings.loadSettings(
@@ -4744,7 +4944,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4744
4944
  resolveSkillSettings,
4745
4945
  skillSettingStrings,
4746
4946
  updateWorkspaceSkillSettingLists
4747
- } = await import("./skill-settings-T3JZ33T2.js");
4947
+ } = await import("./skill-settings-6BFQWMW4.js");
4748
4948
  const fresh = loadSettingsForPersistence(workspace);
4749
4949
  const normalizedName = skillName.trim().toLowerCase();
4750
4950
  const resolved = resolveSkillSettings(fresh);
@@ -4843,7 +5043,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4843
5043
  );
4844
5044
  }
4845
5045
  }), "persistSettingsFn");
4846
- const { createSubSessionLauncher } = await import("./create-sub-session-MWUWNBM6.js");
5046
+ const { createSubSessionLauncher } = await import("./create-sub-session-QZNQY332.js");
4847
5047
  const subSessionLauncher = createSubSessionLauncher({
4848
5048
  getBridge: /* @__PURE__ */ __name(() => bridgeRef, "getBridge"),
4849
5049
  boundWorkspace,
@@ -5434,9 +5634,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5434
5634
  "Managed scratch runtime must use an accepted direct child directory"
5435
5635
  );
5436
5636
  }
5637
+ if (provenance === "live-conversation") {
5638
+ await liveConversationWorkspace.assertExactRoot(cwd);
5639
+ }
5437
5640
  const snapshot = buildOptions?.snapshot ?? await trustPolicy.readDaemonTrustPolicySnapshot();
5438
5641
  const decision = buildOptions?.decision ?? trustPolicy.evaluateDaemonWorkspaceTrust(snapshot, cwd);
5439
- const trusted = provenance === "managed-scratch" ? true : buildOptions?.trusted ?? decision.targetTrusted;
5642
+ const trusted = provenance === "managed-scratch" || provenance === "live-conversation" ? true : buildOptions?.trusted ?? decision.targetTrusted;
5440
5643
  let wsSettings;
5441
5644
  try {
5442
5645
  wsSettings = settingsRuntime.settings.loadSettings(cwd, {
@@ -5491,6 +5694,17 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5491
5694
  const wsSubSessionLauncher = createSubSessionLauncher({
5492
5695
  getBridge: /* @__PURE__ */ __name(() => wsBridgeRef, "getBridge"),
5493
5696
  boundWorkspace: cwd,
5697
+ ...provenance === "live-conversation" ? {
5698
+ notifySentCompletion: true,
5699
+ isolatedWorkspace: {
5700
+ materializeDirectory: /* @__PURE__ */ __name((sessionId) => liveConversationWorkspace.materializeConversationDirectory(
5701
+ sessionId
5702
+ ), "materializeDirectory"),
5703
+ discardEmptyDirectory: /* @__PURE__ */ __name((sessionId) => liveConversationWorkspace.discardEmptyConversationDirectory(
5704
+ sessionId
5705
+ ), "discardEmptyDirectory")
5706
+ }
5707
+ } : {},
5494
5708
  ...subSessionConcurrencyCapsFromSettings(
5495
5709
  wsSettings?.merged.serve ?? {}
5496
5710
  )
@@ -5668,11 +5882,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5668
5882
  workspaceId: wsHash,
5669
5883
  workspaceCwd: cwd,
5670
5884
  sessionRuntimeBaseDir: wsEnv.sessionRuntimeBaseDir,
5671
- ...buildOptions?.displayName !== void 0 ? { displayName: buildOptions.displayName } : {},
5885
+ ...buildOptions?.displayName !== void 0 ? { displayName: buildOptions.displayName } : provenance === "live-conversation" ? { displayName: "Conversations" } : {},
5672
5886
  primary: buildOptions?.primary ?? false,
5673
5887
  trusted,
5674
5888
  provenance,
5675
- removable: buildOptions?.removable ?? true,
5889
+ removable: buildOptions?.removable ?? provenance !== "live-conversation",
5676
5890
  registrationIds: [...buildOptions?.registrationIds ?? []],
5677
5891
  env: wsEnv.metadata,
5678
5892
  bridge: wsBridge,
@@ -5686,7 +5900,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5686
5900
  })
5687
5901
  };
5688
5902
  subSessionStoppersByRuntime.set(wsRuntime, wsSubSessionLauncher.stop);
5689
- if (provenance !== "managed-scratch" && !buildOptions?.snapshot) {
5903
+ if (provenance === "existing" && !buildOptions?.snapshot) {
5690
5904
  const latest = await trustPolicy.readDaemonTrustPolicySnapshot();
5691
5905
  if (latest.revision !== snapshot.revision) {
5692
5906
  generationGuard.close();
@@ -5718,6 +5932,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5718
5932
  const serveAppForRuntimeLifecycle = { current: void 0 };
5719
5933
  const workspaceRuntimeRemoval = {
5720
5934
  async runtimeAdded(runtimeAdded) {
5935
+ if (runtimeAdded.provenance === "live-conversation") return;
5721
5936
  channelWebhookEnvByWorkspace.set(
5722
5937
  runtimeAdded.workspaceCwd,
5723
5938
  workspaceRuntimeEffectiveEnv(runtimeAdded, daemonRuntimeBaseEnv)
@@ -5750,7 +5965,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5750
5965
  invalidatePrimaryServeFeaturesCache();
5751
5966
  }
5752
5967
  totalSessionAdmission.beginWorkspaceDrain(runtimeToDrain.workspaceCwd);
5753
- channelWorkerManager?.beginWorkspaceDrain(runtimeToDrain.workspaceCwd);
5968
+ if (runtimeToDrain.provenance !== "live-conversation") {
5969
+ channelWorkerManager?.beginWorkspaceDrain(
5970
+ runtimeToDrain.workspaceCwd
5971
+ );
5972
+ }
5754
5973
  workspaceVoiceCoordinator.beginWorkspaceDrain(runtimeToDrain);
5755
5974
  channelWebhookEnvByWorkspace.delete(runtimeToDrain.workspaceCwd);
5756
5975
  channelWebhookConfigVersion += 1;
@@ -5771,15 +5990,21 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5771
5990
  bridgeRef = runtimeToDrain.bridge;
5772
5991
  invalidatePrimaryServeFeaturesCache();
5773
5992
  }
5774
- channelWorkerManager?.cancelWorkspaceDrain(runtimeToDrain.workspaceCwd);
5993
+ if (runtimeToDrain.provenance !== "live-conversation") {
5994
+ channelWorkerManager?.cancelWorkspaceDrain(
5995
+ runtimeToDrain.workspaceCwd
5996
+ );
5997
+ }
5775
5998
  totalSessionAdmission.cancelWorkspaceDrain(runtimeToDrain.workspaceCwd);
5776
5999
  workspaceVoiceCoordinator.cancelWorkspaceDrain(runtimeToDrain);
5777
- channelWebhookEnvByWorkspace.set(
5778
- runtimeToDrain.workspaceCwd,
5779
- workspaceRuntimeEffectiveEnv(runtimeToDrain, daemonRuntimeBaseEnv)
5780
- );
5781
- channelWebhookConfigVersion += 1;
5782
- refreshChannelWebhookConfigs?.();
6000
+ if (runtimeToDrain.provenance !== "live-conversation") {
6001
+ channelWebhookEnvByWorkspace.set(
6002
+ runtimeToDrain.workspaceCwd,
6003
+ workspaceRuntimeEffectiveEnv(runtimeToDrain, daemonRuntimeBaseEnv)
6004
+ );
6005
+ channelWebhookConfigVersion += 1;
6006
+ refreshChannelWebhookConfigs?.();
6007
+ }
5783
6008
  const app3 = serveAppForRuntimeLifecycle.current ?? runtimeApp ?? runtimeAppForCleanup;
5784
6009
  const startScheduledTaskKeepaliveForWorkspace = app3?.locals?.["startScheduledTaskKeepaliveForWorkspace"];
5785
6010
  try {
@@ -5802,7 +6027,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5802
6027
  pendingSessionStarts: totalSessionAdmission.snapshotForWorkspace(
5803
6028
  runtimeToDrain.workspaceCwd
5804
6029
  ).inFlight,
5805
- channelWorkers: channelWorkerManager?.workspaceActivity(
6030
+ channelWorkers: runtimeToDrain.provenance === "live-conversation" ? 0 : channelWorkerManager?.workspaceActivity(
5806
6031
  runtimeToDrain.workspaceCwd
5807
6032
  ) ?? 0,
5808
6033
  voiceSessions: workspaceVoiceCoordinator.getWorkspaceActivity(runtimeToDrain)
@@ -5834,7 +6059,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5834
6059
  stopSubSessions?.();
5835
6060
  } catch {
5836
6061
  }
5837
- if (reason !== "daemon_shutdown" && channelWorkerManager) {
6062
+ if (reason !== "daemon_shutdown" && channelWorkerManager && runtimeToDrain.provenance !== "live-conversation") {
5838
6063
  await channelWorkerManager.removeWorkspace(runtimeToDrain.workspaceCwd).catch((err) => {
5839
6064
  daemonLog.error(
5840
6065
  "workspace channel worker cleanup error",
@@ -5956,8 +6181,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5956
6181
  { createChannelManagementService },
5957
6182
  { WorkspaceChannelSettingsStore }
5958
6183
  ] = await Promise.all([
5959
- import("./channel-management-service-5XPPTWUQ.js"),
5960
- import("./channel-settings-store-B4HNMNQV.js")
6184
+ import("./channel-management-service-IGEUOVRT.js"),
6185
+ import("./channel-settings-store-ON64MF7G.js")
5961
6186
  ]);
5962
6187
  return createChannelManagementService({
5963
6188
  workspaceCwd: targetRuntime.workspaceCwd,
@@ -6019,6 +6244,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6019
6244
  getWorkspaceTrustPolicySnapshot: /* @__PURE__ */ __name(() => latestTrustPolicySnapshot, "getWorkspaceTrustPolicySnapshot")
6020
6245
  } : {},
6021
6246
  managedScratchRoot,
6247
+ liveConversationWorkspace,
6022
6248
  workspaceRegistrationStore,
6023
6249
  workspaceRuntimeRemoval,
6024
6250
  workspaceTrustHotReloadAvailable,
@@ -6036,6 +6262,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6036
6262
  primaryWorkspaceTrusted: trustedWorkspace,
6037
6263
  primaryRuntimeEnv,
6038
6264
  daemonEnv: daemonRuntimeBaseEnv,
6265
+ runtimePlatform: deps.runtimePlatform,
6039
6266
  daemonLog,
6040
6267
  getChannelWorkerSnapshot,
6041
6268
  getChannelWorkerSnapshots,
@@ -6153,8 +6380,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6153
6380
  { createWorkspaceTrustReconciler },
6154
6381
  { createDaemonTrustPolicyMonitor }
6155
6382
  ] = await Promise.all([
6156
- import("./workspace-trust-reconciler-6V25LMCN.js"),
6157
- import("./daemon-trust-policy-monitor-MFM5X26G.js")
6383
+ import("./workspace-trust-reconciler-CZPZZCZC.js"),
6384
+ import("./daemon-trust-policy-monitor-5SHYBDGA.js")
6158
6385
  ]);
6159
6386
  const materializationFor = /* @__PURE__ */ __name((entry, snapshot, decision) => {
6160
6387
  const boundWorkspaces2 = entry.primary && decision.targetTrusted ? runtime.resolveBoundWorkspacesFromIdeEnv(
@@ -6249,7 +6476,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6249
6476
  handle?.disposeWorkspace(runtimeToDispose.workspaceId);
6250
6477
  const deadline = Date.now() + 1e3;
6251
6478
  while ((handle?.getWorkspaceActivity(runtimeToDispose.workspaceId).memoryTasks ?? 0) > 0 && Date.now() < deadline) {
6252
- await new Promise((resolve2) => setTimeout(resolve2, 25));
6479
+ await new Promise((resolve3) => setTimeout(resolve3, 25));
6253
6480
  }
6254
6481
  if ((handle?.getWorkspaceActivity(runtimeToDispose.workspaceId).memoryTasks ?? 0) > 0) {
6255
6482
  throw new Error(
@@ -6361,7 +6588,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6361
6588
  );
6362
6589
  }
6363
6590
  const channelValidationSettingsRuntime = opts.channelSelection ? await loadSettingsRuntimeModules() : void 0;
6364
- const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-B3EPDJDR.js") : void 0;
6591
+ const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-ZHDD5VYQ.js") : void 0;
6365
6592
  const channelValidationTrustSnapshot = channelValidationTrustPolicy ? await channelValidationTrustPolicy.readDaemonTrustPolicySnapshot() : void 0;
6366
6593
  const resolveChannelWorkspaceGroupsAtListen = /* @__PURE__ */ __name(() => {
6367
6594
  if (!opts.channelSelection || !channelValidationSettingsRuntime || !channelRuntime) {
@@ -6467,7 +6694,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6467
6694
  if (opts.channelSelection) {
6468
6695
  reserveChannelServicePidfile(opts.channelSelection);
6469
6696
  }
6470
- return await new Promise((resolve2, reject) => {
6697
+ return await new Promise((resolve3, reject) => {
6471
6698
  const onListening = /* @__PURE__ */ __name((error) => {
6472
6699
  if (error) return;
6473
6700
  startup.listenerReadyAt = (/* @__PURE__ */ new Date()).toISOString();
@@ -6485,6 +6712,168 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6485
6712
  actualPort = typeof addr === "object" && addr ? addr.port : opts.port;
6486
6713
  const scheme = tlsOptions ? "https" : "http";
6487
6714
  const url = `${scheme}://${formatHostForUrl(opts.hostname)}:${actualPort}`;
6715
+ const liveRuntimeBaseDir = path.dirname(daemonLogBaseDir);
6716
+ const liveDiscoveryOwners = [];
6717
+ let liveDiscoveryPublish;
6718
+ let liveDiscoveryRetryTimer;
6719
+ let liveDiscoveryRetryTask;
6720
+ let liveDiscoveryEnabled = false;
6721
+ let liveDiscoveryShuttingDown = false;
6722
+ let liveDiscoveryToggle = Promise.resolve();
6723
+ let attemptPendingLiveDiscovery;
6724
+ const pendingLiveDiscoveryBaseDirs = /* @__PURE__ */ new Set();
6725
+ const warnedLiveDiscoveryOwners = /* @__PURE__ */ new Set();
6726
+ const liveDiscoveryRetryDelayMs = deps.liveDiscoveryRetryDelayMs !== void 0 && Number.isFinite(deps.liveDiscoveryRetryDelayMs) && deps.liveDiscoveryRetryDelayMs >= 10 ? Math.min(deps.liveDiscoveryRetryDelayMs, 6e4) : DEFAULT_LIVE_DISCOVERY_RETRY_MS;
6727
+ const scheduleLiveDiscoveryRetry = /* @__PURE__ */ __name(() => {
6728
+ if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled || liveDiscoveryRetryTimer || liveDiscoveryRetryTask || pendingLiveDiscoveryBaseDirs.size === 0 || !attemptPendingLiveDiscovery) {
6729
+ return;
6730
+ }
6731
+ liveDiscoveryRetryTimer = setTimeout(() => {
6732
+ liveDiscoveryRetryTimer = void 0;
6733
+ if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled || !attemptPendingLiveDiscovery) {
6734
+ return;
6735
+ }
6736
+ const retry = attemptPendingLiveDiscovery().finally(() => {
6737
+ if (liveDiscoveryRetryTask === retry) {
6738
+ liveDiscoveryRetryTask = void 0;
6739
+ }
6740
+ scheduleLiveDiscoveryRetry();
6741
+ });
6742
+ liveDiscoveryRetryTask = retry;
6743
+ }, liveDiscoveryRetryDelayMs);
6744
+ liveDiscoveryRetryTimer.unref();
6745
+ }, "scheduleLiveDiscoveryRetry");
6746
+ const cancelLiveDiscoveryRetry = /* @__PURE__ */ __name(() => {
6747
+ if (!liveDiscoveryRetryTimer) return;
6748
+ clearTimeout(liveDiscoveryRetryTimer);
6749
+ liveDiscoveryRetryTimer = void 0;
6750
+ }, "cancelLiveDiscoveryRetry");
6751
+ const publishLiveDiscovery = /* @__PURE__ */ __name((candidateApp) => {
6752
+ if (liveDiscoveryShuttingDown) return Promise.resolve();
6753
+ if (!resolveAcpHttpEnabled()) return Promise.resolve();
6754
+ if (candidateApp.locals?.["liveVoiceEnabled"] !== true)
6755
+ return Promise.resolve();
6756
+ liveDiscoveryEnabled = true;
6757
+ if (liveDiscoveryPublish) return liveDiscoveryPublish;
6758
+ const coordinator = candidateApp.locals?.["liveCoordinator"];
6759
+ const instanceNonce = coordinator?.daemonInstanceNonce;
6760
+ if (typeof instanceNonce !== "string") return Promise.resolve();
6761
+ liveDiscoveryPublish = loadLiveDiscoveryRuntime().then(
6762
+ async ({
6763
+ getStableLiveDiscoveryBaseDir,
6764
+ LiveDiscoveryOwnerActiveError,
6765
+ writeLiveDiscoveryFile
6766
+ }) => {
6767
+ if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled) return;
6768
+ const stableBaseDir = path.resolve(
6769
+ deps.liveDiscoveryStableBaseDir ?? getStableLiveDiscoveryBaseDir()
6770
+ );
6771
+ const runtimeBaseDir = path.resolve(liveRuntimeBaseDir);
6772
+ const targetBaseDirs = /* @__PURE__ */ new Set();
6773
+ if (runtimeBaseDir !== stableBaseDir) {
6774
+ targetBaseDirs.add(runtimeBaseDir);
6775
+ }
6776
+ targetBaseDirs.add(stableBaseDir);
6777
+ for (const baseDir of targetBaseDirs) {
6778
+ pendingLiveDiscoveryBaseDirs.add(baseDir);
6779
+ }
6780
+ const record = {
6781
+ url,
6782
+ ...token ? { token } : {},
6783
+ protocolVersion: LIVE_HOST_PROTOCOL_VERSION,
6784
+ pid: process.pid,
6785
+ instanceNonce
6786
+ };
6787
+ attemptPendingLiveDiscovery = /* @__PURE__ */ __name(async () => {
6788
+ for (const runtimeBaseDir2 of [
6789
+ ...pendingLiveDiscoveryBaseDirs
6790
+ ]) {
6791
+ if (liveDiscoveryShuttingDown || !liveDiscoveryEnabled)
6792
+ return;
6793
+ try {
6794
+ await writeLiveDiscoveryFile(runtimeBaseDir2, record);
6795
+ pendingLiveDiscoveryBaseDirs.delete(runtimeBaseDir2);
6796
+ warnedLiveDiscoveryOwners.delete(runtimeBaseDir2);
6797
+ liveDiscoveryOwners.push({
6798
+ runtimeBaseDir: runtimeBaseDir2,
6799
+ instanceNonce,
6800
+ pid: process.pid
6801
+ });
6802
+ } catch (err) {
6803
+ if (err instanceof LiveDiscoveryOwnerActiveError) {
6804
+ if (!warnedLiveDiscoveryOwners.has(runtimeBaseDir2)) {
6805
+ warnedLiveDiscoveryOwners.add(runtimeBaseDir2);
6806
+ daemonLog.warn(
6807
+ `failed to publish Live Host discovery at ${runtimeBaseDir2}: ${err.message}`
6808
+ );
6809
+ }
6810
+ continue;
6811
+ }
6812
+ pendingLiveDiscoveryBaseDirs.delete(runtimeBaseDir2);
6813
+ daemonLog.warn(
6814
+ `failed to publish Live Host discovery at ${runtimeBaseDir2}: ${err instanceof Error ? err.message : String(err)}`
6815
+ );
6816
+ }
6817
+ }
6818
+ }, "attemptPendingLiveDiscovery");
6819
+ await attemptPendingLiveDiscovery();
6820
+ scheduleLiveDiscoveryRetry();
6821
+ }
6822
+ ).catch((err) => {
6823
+ daemonLog.warn(
6824
+ `failed to publish Live Host discovery: ${err instanceof Error ? err.message : String(err)}`
6825
+ );
6826
+ });
6827
+ return liveDiscoveryPublish;
6828
+ }, "publishLiveDiscovery");
6829
+ const removeLiveDiscoveryOwners = /* @__PURE__ */ __name(async () => {
6830
+ const owners = liveDiscoveryOwners.splice(0);
6831
+ if (owners.length === 0) return;
6832
+ let removeLiveDiscoveryFile;
6833
+ try {
6834
+ ({ removeLiveDiscoveryFile } = await loadLiveDiscoveryRuntime());
6835
+ } catch (err) {
6836
+ daemonLog.warn(
6837
+ `failed to load Live discovery runtime for cleanup: ${err instanceof Error ? err.message : String(err)}`
6838
+ );
6839
+ return;
6840
+ }
6841
+ for (const owner of owners) {
6842
+ try {
6843
+ await removeLiveDiscoveryFile(owner.runtimeBaseDir, owner);
6844
+ } catch (err) {
6845
+ daemonLog.warn(
6846
+ `failed to remove Live Host discovery at ${owner.runtimeBaseDir}: ${err instanceof Error ? err.message : String(err)}`
6847
+ );
6848
+ }
6849
+ }
6850
+ }, "removeLiveDiscoveryOwners");
6851
+ const unpublishLiveDiscovery = /* @__PURE__ */ __name(async () => {
6852
+ liveDiscoveryEnabled = false;
6853
+ cancelLiveDiscoveryRetry();
6854
+ pendingLiveDiscoveryBaseDirs.clear();
6855
+ attemptPendingLiveDiscovery = void 0;
6856
+ await liveDiscoveryPublish;
6857
+ await liveDiscoveryRetryTask;
6858
+ liveDiscoveryPublish = void 0;
6859
+ liveDiscoveryRetryTask = void 0;
6860
+ await removeLiveDiscoveryOwners();
6861
+ }, "unpublishLiveDiscovery");
6862
+ const attachLiveDiscoveryControl = /* @__PURE__ */ __name((candidateApp) => {
6863
+ candidateApp.locals.setLiveDiscoveryEnabled = (enabled) => {
6864
+ const operation = liveDiscoveryToggle.then(
6865
+ () => enabled ? publishLiveDiscovery(candidateApp) : unpublishLiveDiscovery()
6866
+ );
6867
+ liveDiscoveryToggle = operation.catch(() => void 0);
6868
+ return operation;
6869
+ };
6870
+ }, "attachLiveDiscoveryControl");
6871
+ const cleanupLiveDiscovery = /* @__PURE__ */ __name(async () => {
6872
+ liveDiscoveryShuttingDown = true;
6873
+ cancelLiveDiscoveryRetry();
6874
+ await liveDiscoveryToggle;
6875
+ await unpublishLiveDiscovery();
6876
+ }, "cleanupLiveDiscovery");
6488
6877
  try {
6489
6878
  channelWorkspaceGroups = resolveChannelWorkspaceGroupsAtListen();
6490
6879
  } catch (err) {
@@ -6622,7 +7011,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6622
7011
  daemonLog.error("runtime startup failed", error2);
6623
7012
  markRuntimeFailed(error2);
6624
7013
  if (closeServerAfterChannelWorkerStartupFailure && server.listening) {
6625
- runtimeFailureListenerClose = new Promise((resolve3) => {
7014
+ runtimeFailureListenerClose = new Promise((resolve4) => {
6626
7015
  server.close((closeErr) => {
6627
7016
  if (closeErr) {
6628
7017
  daemonLog.error(
@@ -6630,7 +7019,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6630
7019
  closeErr
6631
7020
  );
6632
7021
  }
6633
- resolve3();
7022
+ resolve4();
6634
7023
  });
6635
7024
  });
6636
7025
  server.closeAllConnections();
@@ -6661,7 +7050,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6661
7050
  "Workspace registry is not available for channel workers."
6662
7051
  );
6663
7052
  }
6664
- const runtimes = registry.list();
7053
+ const runtimes = registry.list().filter((runtime) => runtime.provenance !== "live-conversation");
6665
7054
  if (runtimes.length <= 1 && operation === "initial") {
6666
7055
  const primary = registry.primary;
6667
7056
  if (!primary.trusted) {
@@ -6696,7 +7085,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6696
7085
  return {
6697
7086
  workspaceCwd: runtime.workspaceCwd,
6698
7087
  primary: runtime.primary,
6699
- trusted: runtime.trusted
7088
+ trusted: runtime.trusted,
7089
+ provenance: runtime.provenance
6700
7090
  };
6701
7091
  }),
6702
7092
  selection: channelSelection,
@@ -6808,6 +7198,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6808
7198
  const completeRuntimeStartup = /* @__PURE__ */ __name(async (candidateApp) => {
6809
7199
  if (runtimeStartupSettled) return;
6810
7200
  runtimeApp = candidateApp;
7201
+ attachLiveDiscoveryControl(candidateApp);
6811
7202
  const acpHandle = candidateApp.locals?.["acpHandle"];
6812
7203
  acpHandle?.attachServer?.(server);
6813
7204
  if (opts.channelSelection) {
@@ -6817,6 +7208,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6817
7208
  if (runtimeStartupSettled) return;
6818
7209
  }
6819
7210
  if (runtimeStartupSettled) return;
7211
+ await publishLiveDiscovery(candidateApp);
6820
7212
  runtimeStartupSettled = true;
6821
7213
  clearRuntimeStartupTimer();
6822
7214
  markRuntimeReady();
@@ -6960,11 +7352,15 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6960
7352
  if (closePromise) return closePromise;
6961
7353
  closePromise = new Promise((res, rej) => {
6962
7354
  shuttingDown = true;
7355
+ liveDiscoveryShuttingDown = true;
7356
+ cancelLiveDiscoveryRetry();
6963
7357
  channelControlDraining = true;
6964
7358
  const initiallyMountedApp = runtimeApp ?? runtimeAppForCleanup;
6965
7359
  const initiallyMountedManagement = initiallyMountedApp?.locals?.["workspaceManagementHandle"];
6966
7360
  const initiallyMountedSessionMaintenance = initiallyMountedApp?.locals?.["sessionArchiveCoordinator"];
6967
7361
  const initialManagementWait = initiallyMountedManagement?.sealAndWait?.();
7362
+ const initiallyMountedLive = initiallyMountedApp?.locals;
7363
+ const initialLiveWait = initiallyMountedLive?.sealAndWaitLiveCoordinator?.();
6968
7364
  const initialSessionMaintenanceWait = initiallyMountedSessionMaintenance?.sealMaintenanceAndWait?.();
6969
7365
  let processRegistryShutdown;
6970
7366
  const startProcessRegistryShutdown = /* @__PURE__ */ __name(() => {
@@ -7014,6 +7410,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7014
7410
  rej(retryableError);
7015
7411
  return;
7016
7412
  }
7413
+ await cleanupLiveDiscovery();
7017
7414
  if (loggerPublished || loggerSignalOwned) {
7018
7415
  writeDaemonLifecycleBestEffort(() => {
7019
7416
  if (finalErr) {
@@ -7045,6 +7442,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7045
7442
  if (workspaceManagementHandle !== initiallyMountedManagement) {
7046
7443
  await workspaceManagementHandle?.sealAndWait?.();
7047
7444
  }
7445
+ const liveLifecycleHandle = appForCleanup?.locals;
7446
+ await initialLiveWait;
7447
+ if (liveLifecycleHandle !== initiallyMountedLive) {
7448
+ await liveLifecycleHandle?.sealAndWaitLiveCoordinator?.();
7449
+ }
7048
7450
  await initialSessionMaintenanceWait;
7049
7451
  if (sessionMaintenance !== initiallyMountedSessionMaintenance) {
7050
7452
  await sessionMaintenance?.sealMaintenanceAndWait?.();
@@ -7158,6 +7560,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7158
7560
  });
7159
7561
  const preparedRuntimeApp = runtimeApp ?? runtimeAppForCleanup;
7160
7562
  if (preparedRuntimeApp && bridgeRef && deps.bridge) {
7563
+ attachLiveDiscoveryControl(preparedRuntimeApp);
7161
7564
  if (shouldPreheat) {
7162
7565
  startBridgePreheat(bridgeRef);
7163
7566
  }
@@ -7169,6 +7572,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7169
7572
  } else {
7170
7573
  const acpHandle = preparedRuntimeApp.locals?.["acpHandle"];
7171
7574
  acpHandle?.attachServer?.(server);
7575
+ void publishLiveDiscovery(preparedRuntimeApp);
7172
7576
  }
7173
7577
  } else if (deferRuntimeUntilFirstHealth) {
7174
7578
  scheduleRuntimeStartFallback();
@@ -7178,13 +7582,16 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7178
7582
  if (deps.resolveOnListen) {
7179
7583
  loggerPublished = true;
7180
7584
  loggerLifecycle.published();
7181
- resolve2(handle);
7585
+ void (liveDiscoveryPublish ?? Promise.resolve()).then(
7586
+ () => resolve3(handle)
7587
+ );
7182
7588
  } else {
7183
7589
  void runtimeReady.then(
7184
- () => {
7590
+ async () => {
7591
+ await liveDiscoveryPublish;
7185
7592
  loggerPublished = true;
7186
7593
  loggerLifecycle.published();
7187
- resolve2(handle);
7594
+ resolve3(handle);
7188
7595
  },
7189
7596
  (err) => {
7190
7597
  void handle.close().then(