@qwen-code/qwen-code 0.23.2-preview.0 → 0.23.3-nightly.20260910.c46cb85cf2

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 (409) hide show
  1. package/README.md +35 -15
  2. package/bundled/computer-use/SKILL.md +1 -1
  3. package/bundled/goal-draft/SKILL.md +2 -2
  4. package/bundled/qc-helper/docs/configuration/auth.md +1 -1
  5. package/bundled/qc-helper/docs/configuration/model-providers.md +76 -34
  6. package/bundled/qc-helper/docs/configuration/settings.md +5 -3
  7. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  8. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -21
  9. package/bundled/qc-helper/docs/features/channels/dws.md +7 -1
  10. package/bundled/qc-helper/docs/features/channels/github.md +1 -9
  11. package/bundled/qc-helper/docs/features/channels/overview.md +30 -56
  12. package/bundled/qc-helper/docs/features/channels/qqbot.md +1 -2
  13. package/bundled/qc-helper/docs/features/commands.md +105 -18
  14. package/bundled/qc-helper/docs/features/computer-use.md +1 -1
  15. package/bundled/qc-helper/docs/features/cross-session-protocol.md +320 -0
  16. package/bundled/qc-helper/docs/features/goals.md +5 -3
  17. package/bundled/qc-helper/docs/features/hooks.md +14 -13
  18. package/bundled/qc-helper/docs/features/sub-agents.md +8 -0
  19. package/bundled/qc-helper/docs/qwen-serve.md +84 -53
  20. package/bundled/review/SKILL.md +82 -79
  21. package/bundled/review/references/posting.md +31 -14
  22. package/chunks/{MaxSizedBox-ZZJT3PJF.js → MaxSizedBox-UZW24XUX.js} +63 -55
  23. package/chunks/{StandaloneSessionPicker-DIOSZTMX.js → StandaloneSessionPicker-IDK7NAZL.js} +85 -77
  24. package/chunks/{acp-startup-profiler-KEU6VAYR.js → acp-startup-profiler-ARO4II44.js} +2 -2
  25. package/chunks/acp-subagent-executor-7TLJGISS.js +919 -0
  26. package/chunks/{acpAgent-62JUP5A7.js → acpAgent-YRCNNIIU.js} +939 -306
  27. package/chunks/{agent-NLPEQQDZ.js → agent-SGU5EE7U.js} +47 -41
  28. package/chunks/{agent-headless-Y2GR5F2Q.js → agent-headless-JVYBLNLT.js} +47 -41
  29. package/chunks/{anthropicContentGenerator-I7LQZH26.js → anthropicContentGenerator-SGIR5IKF.js} +68 -36
  30. package/chunks/{artifact-tool-P52OKKEF.js → artifact-tool-PMYZCYNH.js} +2 -2
  31. package/chunks/{askUserQuestion-I5W5S3D6.js → askUserQuestion-4M4YYIB4.js} +2 -2
  32. package/chunks/{bridge-Q66BD62H.js → bridge-YF6NYRPZ.js} +68 -60
  33. package/chunks/{ca-KC2AISNS.js → ca-MX3WCEEG.js} +1 -1
  34. package/chunks/{channel-management-service-TRTLQTSV.js → channel-management-service-E4HTMU7T.js} +9 -9
  35. package/chunks/{channel-settings-store-R5STFWUW.js → channel-settings-store-FZ5VKHQD.js} +74 -66
  36. package/chunks/{channel-worker-group-PIYPVCTF.js → channel-worker-group-X6WH4XWF.js} +9 -9
  37. package/chunks/{channel-worker-manager-FQHEDTD2.js → channel-worker-manager-SICFJDPJ.js} +19 -10
  38. package/chunks/{channel-worker-supervisor-XJPZZ3VK.js → channel-worker-supervisor-HSFAKML6.js} +6 -6
  39. package/chunks/{chunk-CLKE4IY3.js → chunk-2SZH22YO.js} +1 -1
  40. package/chunks/{chunk-OIPUQE3S.js → chunk-34ZYDM3F.js} +27 -12
  41. package/chunks/{chunk-HIXUUCGY.js → chunk-36HCNKDS.js} +1 -1
  42. package/chunks/{chunk-6YEOCHSE.js → chunk-3FPYT6QC.js} +101 -31
  43. package/chunks/{chunk-NFIDVZND.js → chunk-3I7W2POO.js} +3 -22
  44. package/chunks/{chunk-W3ONSAYO.js → chunk-3VPFA6L2.js} +3 -3
  45. package/chunks/chunk-532WHF4F.js +127 -0
  46. package/chunks/{chunk-J3TJH52D.js → chunk-5FFAUU4T.js} +1 -1
  47. package/chunks/{chunk-G5QLLD53.js → chunk-5FKZ7KFQ.js} +1864 -35
  48. package/chunks/{chunk-B44JBZBB.js → chunk-5GLDOLNQ.js} +132 -27
  49. package/chunks/{chunk-ORREXWOM.js → chunk-5ZJ3KK5J.js} +5 -5
  50. package/chunks/{chunk-2OR32P5M.js → chunk-6EDWSKN4.js} +125 -10
  51. package/chunks/{chunk-EA4NFWVG.js → chunk-6EOMQPTS.js} +4 -4
  52. package/chunks/{chunk-45ROPFQY.js → chunk-6NONRGYX.js} +1 -1
  53. package/chunks/{chunk-EHTKOO6W.js → chunk-6UK77U7D.js} +46 -3
  54. package/chunks/{chunk-QXXBW2G4.js → chunk-72BGC7RT.js} +4 -4
  55. package/chunks/{chunk-CRZBDVP2.js → chunk-74JEYK2C.js} +10 -10
  56. package/chunks/{chunk-B54PFQS5.js → chunk-7CLLH5TI.js} +1 -1
  57. package/chunks/{chunk-CG2PDIGD.js → chunk-7XM6KEVW.js} +1 -1
  58. package/chunks/{chunk-CALNF3Z3.js → chunk-7XVQNDFB.js} +1 -1
  59. package/chunks/{chunk-TK4XHPKW.js → chunk-7ZKDPTYO.js} +2 -2
  60. package/chunks/{chunk-ZIPYCXQP.js → chunk-7ZVIGDZF.js} +1 -1
  61. package/chunks/chunk-AEY27Z35.js +1411 -0
  62. package/chunks/{chunk-WIRYFL2L.js → chunk-ATH66AEU.js} +64 -59
  63. package/chunks/{chunk-33MLFMCL.js → chunk-AW2SIT3B.js} +3 -3
  64. package/chunks/{chunk-4BLTSTF6.js → chunk-AWMJRE5N.js} +4 -4
  65. package/chunks/chunk-AYEJOTIU.js +43 -0
  66. package/chunks/{chunk-M73KHGNR.js → chunk-B2TGBZXY.js} +420 -227
  67. package/chunks/{chunk-XDNFODER.js → chunk-B6BDT4RX.js} +1 -1
  68. package/chunks/{chunk-WZ4YULVF.js → chunk-BHR6IN2X.js} +3251 -974
  69. package/chunks/{chunk-GXIHBIHC.js → chunk-BI3WSRQE.js} +61 -72
  70. package/chunks/{chunk-NVS4Z6GT.js → chunk-BQOP3K76.js} +1 -1
  71. package/chunks/{chunk-R2266LQ5.js → chunk-BTWGOKHU.js} +2 -2
  72. package/chunks/{process-registry-OAEG6WGC.js → chunk-BYUAT5OC.js} +1 -0
  73. package/chunks/{chunk-XVTCSVBK.js → chunk-C4NLHK7X.js} +227 -298
  74. package/chunks/{chunk-NOO4QFXM.js → chunk-C75BXMPM.js} +1 -3
  75. package/chunks/chunk-CAAMI77K.js +937 -0
  76. package/chunks/chunk-CF5KXZZX.js +150 -0
  77. package/chunks/{chunk-SOA4HKRJ.js → chunk-CGKEUUYG.js} +2 -2
  78. package/chunks/{chunk-BF3RUIVP.js → chunk-CH2YDT6X.js} +36 -38
  79. package/chunks/{chunk-5HBA2Z7V.js → chunk-CJ3DHN5I.js} +3 -3
  80. package/chunks/{chunk-3BTHHXXE.js → chunk-CSHX5ZC4.js} +1 -1
  81. package/chunks/{chunk-UYDQYDW2.js → chunk-CUK6F5UF.js} +1 -1
  82. package/chunks/{chunk-RPFJJ33Z.js → chunk-DLH7YIX6.js} +3 -3
  83. package/chunks/{chunk-L6ZME3W7.js → chunk-DMX7RF6E.js} +1 -1
  84. package/chunks/{chunk-TRWQQBVH.js → chunk-DTNV6UZY.js} +1 -1
  85. package/chunks/{chunk-FDOGGKAA.js → chunk-E4UEO3XM.js} +5 -2
  86. package/chunks/{chunk-RN6V5HKE.js → chunk-E5GQNSJY.js} +3 -3
  87. package/chunks/chunk-ELRMZTPF.js +374 -0
  88. package/chunks/chunk-ERU3SDXT.js +27 -0
  89. package/chunks/{chunk-O2FEO2CB.js → chunk-EUURTIV6.js} +18 -2
  90. package/chunks/{chunk-4HOEU2OR.js → chunk-EWJTAP3Y.js} +1 -19
  91. package/chunks/{chunk-ZELCTN6Y.js → chunk-F23YN37B.js} +10 -0
  92. package/chunks/{chunk-BL6B2QS2.js → chunk-F2RKL5I2.js} +809 -1195
  93. package/chunks/{chunk-J4ECGDA3.js → chunk-F45SKYIQ.js} +3 -3
  94. package/chunks/{chunk-5WC2ECUK.js → chunk-FCQJLMA2.js} +114 -8
  95. package/chunks/{chunk-4JKLPTV6.js → chunk-FGRDUDCI.js} +13 -6
  96. package/chunks/{chunk-ZUNWKOAP.js → chunk-FGV2QEAO.js} +5 -27
  97. package/chunks/{chunk-4VY3ITHR.js → chunk-FN3JNDRU.js} +3 -3
  98. package/chunks/{chunk-XI7RST4D.js → chunk-FRVV5SSD.js} +2 -2
  99. package/chunks/{chunk-UXDVUFKU.js → chunk-FYZ5NZ3V.js} +2 -20
  100. package/chunks/{chunk-ALMR3E6Q.js → chunk-GDWE23OR.js} +3 -3
  101. package/chunks/{chunk-W7PXLIZJ.js → chunk-GP47UR3M.js} +6 -6
  102. package/chunks/{chunk-LNYV4GXX.js → chunk-GSKX53AN.js} +0 -139
  103. package/chunks/{chunk-MA5OUNN6.js → chunk-HG46TTAG.js} +1 -1
  104. package/chunks/{chunk-FETY36NQ.js → chunk-HGEUHUEV.js} +1 -1
  105. package/chunks/{chunk-UULHYZ4W.js → chunk-HL2DQG3Y.js} +148 -23
  106. package/chunks/{chunk-E6TI726I.js → chunk-HUXPEUFL.js} +1 -1
  107. package/chunks/{chunk-5DQ4YTIZ.js → chunk-HZTXKVSV.js} +1 -1
  108. package/chunks/{chunk-LYT2OU7D.js → chunk-IAEXTMED.js} +1 -1
  109. package/chunks/{chunk-CPJRFFPH.js → chunk-IFHJIEMN.js} +576 -169
  110. package/chunks/{chunk-IW6RQPQB.js → chunk-IJOS26LH.js} +1 -3
  111. package/chunks/{chunk-ORFIYTI2.js → chunk-IK2MWJP5.js} +1 -1
  112. package/chunks/{chunk-MWEF5MUK.js → chunk-IOUBOANU.js} +42 -13
  113. package/chunks/{chunk-KA5HR3G2.js → chunk-IUVIBDKU.js} +2 -2
  114. package/chunks/{chunk-PQWM4SX2.js → chunk-J2RNOJRV.js} +2 -2
  115. package/chunks/{chunk-VHPG7BH6.js → chunk-J5PYQVD2.js} +2 -2
  116. package/chunks/{chunk-JDPBJIKI.js → chunk-JDEW3V5B.js} +1 -1
  117. package/chunks/{chunk-RX3FYFCN.js → chunk-JEMDIKGQ.js} +7 -7
  118. package/chunks/chunk-JL6APGBX.js +43 -0
  119. package/chunks/{chunk-UHUT4IDM.js → chunk-JOMCZWX7.js} +9 -15
  120. package/chunks/{chunk-43CI6YWJ.js → chunk-JV5YASQA.js} +2777 -2151
  121. package/chunks/{chunk-N6S3NUYJ.js → chunk-JXNIF2O5.js} +1 -1
  122. package/chunks/chunk-K2OJUPOE.js +78 -0
  123. package/chunks/{chunk-QLM7D7W3.js → chunk-KFGPNCCY.js} +8 -8
  124. package/chunks/{chunk-7RXOEUFF.js → chunk-KHIBLKNK.js} +1 -1
  125. package/chunks/{chunk-5GD7LYOH.js → chunk-KVBNJ4K2.js} +5 -5
  126. package/chunks/{chunk-QJAFSFYA.js → chunk-KZ2CU2LH.js} +1 -1
  127. package/chunks/{chunk-DCPRCDSR.js → chunk-L2KF7HUE.js} +6 -6
  128. package/chunks/{chunk-4ALNJDHL.js → chunk-L3DTX6U4.js} +3 -1
  129. package/chunks/{chunk-3SH53ANB.js → chunk-LAP7X6EC.js} +12 -0
  130. package/chunks/{chunk-GM44O6F7.js → chunk-LEGNDA46.js} +1 -1
  131. package/chunks/{chunk-WXFCI3O5.js → chunk-LG5Y4OWO.js} +2 -2
  132. package/chunks/{chunk-3LPJ776W.js → chunk-LILGKQ4B.js} +10 -7
  133. package/chunks/{chunk-LBKYQ33T.js → chunk-LIR7YS2O.js} +18 -12
  134. package/chunks/{chunk-5Z4FCEPY.js → chunk-LK2WUCDQ.js} +625 -119
  135. package/chunks/{chunk-W673V2H3.js → chunk-LY2GK2PR.js} +4 -4
  136. package/chunks/{chunk-PQSCGZT2.js → chunk-MOS5OAOG.js} +36 -10
  137. package/chunks/chunk-MXOALJIL.js +691 -0
  138. package/chunks/chunk-NFXXBWSE.js +463 -0
  139. package/chunks/chunk-NUQ4GK5I.js +315 -0
  140. package/chunks/{chunk-J3VZF2AL.js → chunk-NUQVB25K.js} +2 -2
  141. package/chunks/{chunk-GNY7B3CA.js → chunk-NVIBH7WS.js} +1 -1
  142. package/chunks/{chunk-M6YLOETP.js → chunk-O3MKRN2I.js} +4 -4
  143. package/chunks/{chunk-ISPBBKJN.js → chunk-ONGZNOIP.js} +7 -2
  144. package/chunks/{chunk-Q2F43WTJ.js → chunk-OOLSYRZ7.js} +36 -19
  145. package/chunks/{chunk-63ACHB2H.js → chunk-PIGUW2U2.js} +197 -28
  146. package/chunks/{chunk-QAZ2MGYT.js → chunk-PLLIWEM3.js} +2 -2
  147. package/chunks/{chunk-ULY4ISY2.js → chunk-PMS4FVLY.js} +23 -8
  148. package/chunks/{chunk-NB3NDQQK.js → chunk-Q2XLNLAV.js} +1 -1
  149. package/chunks/{chunk-6GRDHIVI.js → chunk-Q6HXLBZF.js} +12 -12
  150. package/chunks/{chunk-EUXF6URV.js → chunk-QPWZX4ZV.js} +32 -34
  151. package/chunks/{chunk-DTB5BXRG.js → chunk-RJZTX2OF.js} +30 -17
  152. package/chunks/{chunk-PQEISIKS.js → chunk-SAH4BD2J.js} +0 -67
  153. package/chunks/{chunk-LUVXLLMS.js → chunk-SAWPURIU.js} +2 -2
  154. package/chunks/{chunk-WZS3X663.js → chunk-SNZWDV67.js} +43 -18
  155. package/chunks/{chunk-IRKQ4YYX.js → chunk-SVWWF5TZ.js} +29 -1
  156. package/chunks/{chunk-5VZFJTL2.js → chunk-SXEE6PND.js} +2 -2
  157. package/chunks/{chunk-743XE7N7.js → chunk-T4JVQR7Z.js} +2 -2
  158. package/chunks/{chunk-6RZX2HIH.js → chunk-TBEXLLAO.js} +2 -2
  159. package/chunks/{chunk-LN3WBOKU.js → chunk-TP2DUOB6.js} +8 -8
  160. package/chunks/{chunk-MWIO7MF6.js → chunk-TP6FYVQT.js} +2 -0
  161. package/chunks/{chunk-HRPFBHW7.js → chunk-TPKQIA7G.js} +1 -0
  162. package/chunks/{chunk-VH764G6B.js → chunk-TWC3FHUI.js} +4 -4
  163. package/chunks/{chunk-H3Q3RSKZ.js → chunk-U7O65WKL.js} +1 -1
  164. package/chunks/{chunk-IUJLW6ZI.js → chunk-UBEYS536.js} +7 -7
  165. package/chunks/{chunk-VEQBVJYH.js → chunk-UGS62IR2.js} +3 -3
  166. package/chunks/{chunk-VF6D6EGV.js → chunk-UKMWZ5NS.js} +109 -842
  167. package/chunks/{chunk-7GZCCHJL.js → chunk-VHKOULAI.js} +6 -5
  168. package/chunks/{chunk-ODBNTMZW.js → chunk-VID4BW52.js} +97 -86
  169. package/chunks/{chunk-7L35FKPF.js → chunk-VLZOU6UH.js} +7 -7
  170. package/chunks/{chunk-XBLG564H.js → chunk-VTBPMLRO.js} +12 -12
  171. package/chunks/{chunk-QTNCGZHQ.js → chunk-VX63RJXE.js} +9 -0
  172. package/chunks/{chunk-7VEYUF3N.js → chunk-W5ZQMAEM.js} +1 -1
  173. package/chunks/{chunk-XQ4RDO5B.js → chunk-WBCPROWX.js} +1 -1
  174. package/chunks/{chunk-RDV4NLI3.js → chunk-WS7MOFK6.js} +3 -3
  175. package/chunks/{chunk-FV4DM2M4.js → chunk-WXFK4MH7.js} +32 -12
  176. package/chunks/{chunk-XAXTQURR.js → chunk-WY4N6KS7.js} +4 -4
  177. package/chunks/{chunk-CABDNUJ4.js → chunk-XDQUDARC.js} +11 -14
  178. package/chunks/{chunk-YHDGABDC.js → chunk-XKBFYTCD.js} +1 -1
  179. package/chunks/{chunk-2EKVPSIJ.js → chunk-Y2MYW47X.js} +1 -1
  180. package/chunks/{chunk-Y6ZWXM44.js → chunk-YIU5PEAT.js} +2 -2
  181. package/chunks/{chunk-PSPAM24S.js → chunk-YKK2XXHF.js} +4 -0
  182. package/chunks/{chunk-HZ2HUXX7.js → chunk-YS2ZJSOA.js} +29 -12
  183. package/chunks/{chunk-OFVAS4AR.js → chunk-ZGQIIGNQ.js} +2 -2
  184. package/chunks/{chunk-HNLMYDQE.js → chunk-ZHECLGA6.js} +2 -4
  185. package/chunks/{chunk-XBVNNDPK.js → chunk-ZHKTKHMO.js} +8 -1
  186. package/chunks/{chunk-OWCFKIFQ.js → chunk-ZKYR7QS4.js} +1 -1
  187. package/chunks/{chunk-YZTGGCEE.js → chunk-ZKZHSB5W.js} +1 -1
  188. package/chunks/{chunk-ERXNTINK.js → chunk-ZT6EPPBY.js} +1 -1
  189. package/chunks/{chunk-565U2ANU.js → chunk-ZTTC7T4X.js} +1 -1
  190. package/chunks/{chunk-MMMA36MN.js → chunk-ZUQVZTWG.js} +3 -3
  191. package/chunks/{chunk-7OCIQNKX.js → chunk-ZW2EUO2A.js} +1 -1
  192. package/chunks/{config-utils-37FHWPTP.js → config-utils-S5LFS4RN.js} +67 -59
  193. package/chunks/{contextCommand-R4JUBV5N.js → contextCommand-XXKZMMSQ.js} +64 -56
  194. package/chunks/{core-runtime-6U4OXU5C.js → core-runtime-YGUA42AZ.js} +68 -59
  195. package/chunks/{create-sub-session-LLUYAGZN.js → create-sub-session-SEK6KCYR.js} +64 -56
  196. package/chunks/{create-sub-session-TGIX63YU.js → create-sub-session-TIGCFGCS.js} +2 -2
  197. package/chunks/{cron-create-GTPVMJCF.js → cron-create-AKWX67FO.js} +1 -1
  198. package/chunks/{cron-delete-ZBK27Z4K.js → cron-delete-XPB6IYZJ.js} +1 -1
  199. package/chunks/{cron-list-KTFKFDKC.js → cron-list-XBKO4WU5.js} +1 -1
  200. package/chunks/{daemon-UI6SQSBV.js → daemon-G5TYKZD6.js} +2 -2
  201. package/chunks/{daemon-git-worktree-guard-O2UTNFJC.js → daemon-git-worktree-guard-3AWINPPX.js} +65 -57
  202. package/chunks/{daemon-status-provider-7GMAKSTX.js → daemon-status-provider-RTKHKUFJ.js} +73 -65
  203. package/chunks/{daemon-trust-policy-VNP76VMO.js → daemon-trust-policy-6YQOC7B6.js} +69 -61
  204. package/chunks/{daemon-trust-policy-monitor-TD5O3BZA.js → daemon-trust-policy-monitor-EN5L23GS.js} +69 -61
  205. package/chunks/{de-UU2YTO37.js → de-OOLZAU2U.js} +1 -1
  206. package/chunks/{deferred-core-runtime-NJM63YJS.js → deferred-core-runtime-JPLQRVZO.js} +62 -54
  207. package/chunks/{display-image-CTNHJRZC.js → display-image-NAH3AZ63.js} +3 -3
  208. package/chunks/{dist-STAGIFNB.js → dist-3BJVSJ7D.js} +389 -724
  209. package/chunks/{dist-OR2ZQTXZ.js → dist-65Q3TRLH.js} +16 -36
  210. package/chunks/{dist-24TCWK5H.js → dist-HX2LG76F.js} +233 -35
  211. package/chunks/{dist-XJ25G6OH.js → dist-J7PDFK53.js} +13 -38
  212. package/chunks/{dist-WZTUKIDR.js → dist-JCXKXRH6.js} +3 -6
  213. package/chunks/{dist-M4CBX53H.js → dist-LHGMHIDK.js} +2 -6
  214. package/chunks/{dist-5I4HLUTO.js → dist-QPTIRE3U.js} +4 -13
  215. package/chunks/{dist-FDISN4AK.js → dist-SBK33YLC.js} +5 -40
  216. package/chunks/{dist-NQ2636VT.js → dist-WMFHZG3R.js} +2 -5
  217. package/chunks/{edit-GL7OA6RV.js → edit-QXJZIWRQ.js} +50 -44
  218. package/chunks/{en-YJNRUQG4.js → en-7BZ2OZKH.js} +2 -1
  219. package/chunks/{enter-worktree-YFTKHXHZ.js → enter-worktree-54L5QJ3N.js} +4 -4
  220. package/chunks/{enterPlanMode-VC4BCSZE.js → enterPlanMode-2ITCVQ5N.js} +47 -41
  221. package/chunks/{environment-BI6IBAZJ.js → environment-URPO5ORZ.js} +65 -57
  222. package/chunks/{errors-D6G2ZM2R.js → errors-TDUYLEKI.js} +64 -56
  223. package/chunks/{exit-worktree-NF2XEMES.js → exit-worktree-EORJDKDS.js} +4 -4
  224. package/chunks/{exitPlanMode-DX446CA6.js → exitPlanMode-RA7KMUEW.js} +47 -41
  225. package/chunks/{fast-path-MAYDLJIP.js → fast-path-Q2JYP64P.js} +7 -7
  226. package/chunks/{fast-path-settings-SATXY3PD.js → fast-path-settings-GTHZLVSS.js} +2 -2
  227. package/chunks/{fr-HKNWVXRJ.js → fr-JJWM2HUS.js} +1 -1
  228. package/chunks/{glob-TVKRFY36.js → glob-VHSV4BKE.js} +50 -44
  229. package/chunks/{goal-tools-CA6YANRN.js → goal-tools-5FIE56CK.js} +53 -43
  230. package/chunks/{grep-BLHF2S5D.js → grep-3PKFKLCA.js} +2 -2
  231. package/chunks/{handleAutoUpdate-AW4ZAHON.js → handleAutoUpdate-7FZFLKNZ.js} +65 -57
  232. package/chunks/{i18n-IH5CRAY7.js → i18n-NTFQDWKR.js} +63 -55
  233. package/chunks/{image-gen-XP4NNIYG.js → image-gen-TF3IQWSH.js} +7 -6
  234. package/chunks/{initializer-UBR37ZNM.js → initializer-LB3T635H.js} +69 -61
  235. package/chunks/{installationInfo-Y52756EC.js → installationInfo-KRO433ZG.js} +62 -54
  236. package/chunks/{ja-GJS5RZGU.js → ja-L67TXFDJ.js} +1 -1
  237. package/chunks/{list-7V5JDZPO.js → list-NEP3WPZ7.js} +72 -64
  238. package/chunks/{list-agents-I5TRH3J7.js → list-agents-QLDXS5OD.js} +18 -8
  239. package/chunks/{llm-QDB6JVF5.js → llm-AZEJEIAD.js} +141 -128
  240. package/chunks/{llm-content-generator-EO6MZCEO.js → llm-content-generator-KWXFHBR3.js} +6 -5
  241. package/chunks/{loadedSettingsAdapter-I3YQKMC4.js → loadedSettingsAdapter-NZORJLSD.js} +69 -61
  242. package/chunks/{loggingContentGenerator-MNXYUGDG.js → loggingContentGenerator-NGHVU6AK.js} +69 -62
  243. package/chunks/{loop-wakeup-HL6XOWI4.js → loop-wakeup-HHMYIC7Z.js} +2 -2
  244. package/chunks/{ls-YV7RKLKY.js → ls-N7ABR6HI.js} +4 -4
  245. package/chunks/{lsp-NO3AMRZT.js → lsp-LTOFWG5P.js} +1 -1
  246. package/chunks/{managed-npm-update-EA3EXPTO.js → managed-npm-update-3LHNBEAG.js} +62 -54
  247. package/chunks/{mcp-QTAJ544Y.js → mcp-4SWJKDX7.js} +69 -61
  248. package/chunks/{monitor-6FQKQOTP.js → monitor-V5EFBZC7.js} +49 -43
  249. package/chunks/{nonInteractiveCli-MRCTZL5X.js → nonInteractiveCli-5UFUBUAT.js} +117 -109
  250. package/chunks/{notebook-edit-BQQCKI7K.js → notebook-edit-ATV46KWD.js} +48 -42
  251. package/chunks/{open-with-auth-D6JD6LDS.js → open-with-auth-6MVIHMXB.js} +1 -1
  252. package/chunks/openai-WX26N5OJ.js +47 -0
  253. package/chunks/{openaiContentGenerator-TTSKXNVH.js → openaiContentGenerator-BKTO5QJK.js} +31 -25
  254. package/chunks/openaiResponsesContentGenerator-RTCAJ5V5.js +1658 -0
  255. package/chunks/{pidfile-KPIS6RIT.js → pidfile-JAIOWPI3.js} +65 -55
  256. package/chunks/process-registry-X6ZCASEN.js +10 -0
  257. package/chunks/{processUtils-ZCASPKK4.js → processUtils-TCQH3LVD.js} +2 -2
  258. package/chunks/{prompt-terminal-ledger-D6HM6TV7.js → prompt-terminal-ledger-BYXHEUHX.js} +63 -55
  259. package/chunks/{pt-FXMYXEUV.js → pt-77SBDL4B.js} +1 -1
  260. package/chunks/{qwenContentGenerator-GGZEFLBD.js → qwenContentGenerator-K5TJK75P.js} +60 -52
  261. package/chunks/{qwenOAuth2-KX6LVYQ3.js → qwenOAuth2-NOXRK323.js} +6 -5
  262. package/chunks/{read-file-VE5GDFLP.js → read-file-DL7GNZD5.js} +11 -9
  263. package/chunks/{read-mcp-resource-D3N75DGF.js → read-mcp-resource-B37WANAQ.js} +1 -1
  264. package/chunks/{record-artifact-Q5CRGJTP.js → record-artifact-OAXWXZ5D.js} +2 -2
  265. package/chunks/record-source-D7R7X3GT.js +22 -0
  266. package/chunks/{report-findings-TJ34R7QK.js → report-findings-AR3VC6EQ.js} +3 -3
  267. package/chunks/{request-shutdown-LRKMTBAD.js → request-shutdown-IKNWTX5M.js} +5 -5
  268. package/chunks/{resumeHistoryUtils-HSSGMYDC.js → resumeHistoryUtils-OYKXZ4YO.js} +68 -60
  269. package/chunks/{ripGrep-SEJE7AA6.js → ripGrep-EOUMIU4K.js} +15 -13
  270. package/chunks/{ru-RMHURE5U.js → ru-UYWHKWF2.js} +1 -1
  271. package/chunks/{run-qwen-serve-OJYVH7N6.js → run-qwen-serve-PPTGWC5B.js} +471 -152
  272. package/chunks/{runtime-KGMQQFJD.js → runtime-5RO22P2N.js} +77 -67
  273. package/chunks/{scheduled-tasks-7H5HWHYD.js → scheduled-tasks-YGERFWLZ.js} +70 -62
  274. package/chunks/{scheduler-BE42AKDG.js → scheduler-S6WU6M3C.js} +64 -56
  275. package/chunks/{sdk-exporters-grpc-MXTVSE3C.js → sdk-exporters-grpc-Y2ZUQDUQ.js} +2 -2
  276. package/chunks/{sdk-exporters-http-7R2ARBPV.js → sdk-exporters-http-VWTF4W6K.js} +3 -3
  277. package/chunks/{sdk-impl-YOLO7LV4.js → sdk-impl-G6FVTBQZ.js} +9 -9
  278. package/chunks/{send-message-AWKUDJBH.js → send-message-TWOGWCBG.js} +13 -10
  279. package/chunks/{serve-KZVKYMSL.js → serve-HT4WOCWS.js} +70 -62
  280. package/chunks/{server-PJRALPJQ.js → server-SWXVPRCS.js} +2977 -617
  281. package/chunks/{session-IHITXU2S.js → session-6DSFUOMO.js} +154 -119
  282. package/chunks/{session-attachments-root-GQ2TUI3Y.js → session-attachments-root-SOZCTQWW.js} +62 -54
  283. package/chunks/{session-pr-refresh-H43LULTE.js → session-pr-refresh-F7XUBQBH.js} +70 -62
  284. package/chunks/{settings-RKEQQDFC.js → settings-SWQH36PO.js} +74 -66
  285. package/chunks/{shell-6PJ444U5.js → shell-XUQL6EYV.js} +47 -41
  286. package/chunks/{skill-Q3UP7B5V.js → skill-HNRDD54C.js} +33 -23
  287. package/chunks/{skill-settings-LZR5YRRW.js → skill-settings-JU72PCII.js} +68 -60
  288. package/chunks/{spawnChannel-WM3DT2BF.js → spawnChannel-7ZVM3GBU.js} +65 -57
  289. package/chunks/{standalone-update-E5474IBI.js → standalone-update-64JQY2LX.js} +64 -56
  290. package/chunks/{start-opentui-ui-WLWZNQ2I.js → start-opentui-ui-RSLBXESU.js} +554 -297
  291. package/chunks/{startInteractiveUI-FBQSGWGO.js → startInteractiveUI-ZDPHD7XE.js} +1282 -1915
  292. package/chunks/{syntheticOutput-D2P5V6RG.js → syntheticOutput-F6F27JMK.js} +2 -2
  293. package/chunks/{task-create-PMAFST2T.js → task-create-Y623TBHB.js} +10 -10
  294. package/chunks/{task-list-R2HSY2NC.js → task-list-FCPEEGWL.js} +3 -3
  295. package/chunks/{task-stop-BFSKRTGV.js → task-stop-QTKZXLPH.js} +1 -1
  296. package/chunks/{task-update-JYC57USF.js → task-update-YLSXF25N.js} +10 -10
  297. package/chunks/{team-create-VIGUFUT4.js → team-create-U52VYSNO.js} +49 -43
  298. package/chunks/{team-delete-CBHVBTPB.js → team-delete-S7TLHZCF.js} +3 -3
  299. package/chunks/{team-plan-approval-HQVZA3MD.js → team-plan-approval-IQ4ADQIK.js} +47 -41
  300. package/chunks/{terminal-image-renderer-LUKNCOVM.js → terminal-image-renderer-ZEMF7LB2.js} +64 -56
  301. package/chunks/{theme-manager-LOENKYLY.js → theme-manager-DK2S2SOX.js} +62 -54
  302. package/chunks/{todoWrite-5ERKFWAK.js → todoWrite-5QI2H2FW.js} +4 -4
  303. package/chunks/{tool-search-ZIFAQCE2.js → tool-search-6U4OQG7K.js} +21 -15
  304. package/chunks/{total-session-admission-FUUJH3QH.js → total-session-admission-BOARHBZU.js} +68 -60
  305. package/chunks/{trustedFolders-C76KYROP.js → trustedFolders-GKQZXZSV.js} +63 -55
  306. package/chunks/{update-relaunch-4G2SRXKX.js → update-relaunch-GLACF7PX.js} +5 -5
  307. package/chunks/{updateCheck-EIZIO7HI.js → updateCheck-NLBSZB4Q.js} +64 -56
  308. package/chunks/{useAutoAcceptIndicator-EAA6KSY4.js → useAutoAcceptIndicator-3X3BYU7H.js} +72 -64
  309. package/chunks/{validateNonInterActiveAuth-BRX22QCN.js → validateNonInterActiveAuth-NE3JLOIR.js} +114 -106
  310. package/chunks/{version-E56RU7PR.js → version-6H5YAT4N.js} +3 -1
  311. package/chunks/{web-fetch-AAUCD7RM.js → web-fetch-RWSO7TTN.js} +15 -13
  312. package/chunks/{web-search-HFUQF44Q.js → web-search-DADI3LV5.js} +560 -322
  313. package/chunks/{web-shell-static-POZHGGXE.js → web-shell-static-CCN4JZEE.js} +5 -4
  314. package/chunks/workflow-LPGCZCIT.js +1224 -0
  315. package/chunks/workspace-providers-status-QBRBEFTO.js +127 -0
  316. package/chunks/{workspace-registration-store-YL7HLYYI.js → workspace-registration-store-WUKTMJPW.js} +3 -2
  317. package/chunks/{workspace-registry-BNRP2ELW.js → workspace-registry-CJV7KVGF.js} +68 -60
  318. package/chunks/{workspace-runtime-coordinator-WKGF7VHS.js → workspace-runtime-coordinator-7LYMFMFF.js} +71 -61
  319. package/chunks/{workspace-service-4MYO72MM.js → workspace-service-HWXZSA4J.js} +75 -67
  320. package/chunks/{workspace-skills-status-SU66TJLZ.js → workspace-skills-status-D6QXUWCC.js} +70 -62
  321. package/chunks/{workspace-trust-reconciler-D5QT7WQB.js → workspace-trust-reconciler-VZX7G7CZ.js} +75 -67
  322. package/chunks/{write-file-NVPQE2AZ.js → write-file-KKHV26YV.js} +49 -43
  323. package/chunks/{zh-VBFCRQBL.js → zh-J2GLI64H.js} +2 -1
  324. package/chunks/{zh-TW-N2TBF2F2.js → zh-TW-TBAICUJQ.js} +2 -1
  325. package/chunks/{zoom-image-RJHC66WG.js → zoom-image-OG7X7KAA.js} +12 -10
  326. package/cli.js +14 -14
  327. package/export-transcript-document.css +1 -0
  328. package/export-transcript-document.js +164 -165
  329. package/locales/ca.js +2 -2
  330. package/locales/de.js +2 -2
  331. package/locales/en.js +3 -2
  332. package/locales/fr.js +2 -2
  333. package/locales/ja.js +2 -2
  334. package/locales/pt.js +2 -2
  335. package/locales/ru.js +2 -2
  336. package/locales/zh-TW.js +3 -2
  337. package/locales/zh.js +3 -2
  338. package/package.json +6 -5
  339. package/web-shell/assets/{abnfDiagram-VCTEODGH-DHc6plZn.js → abnfDiagram-VCTEODGH-NT0lTLRG.js} +1 -1
  340. package/web-shell/assets/{arc-BQ9m8TDV.js → arc-DDqnIMMx.js} +1 -1
  341. package/web-shell/assets/{architectureDiagram-5GKGNRK7-D5ap3oVB.js → architectureDiagram-5GKGNRK7-DfYghE3W.js} +1 -1
  342. package/web-shell/assets/{blockDiagram-NRAW4CY4-BIbnyNph.js → blockDiagram-NRAW4CY4-DlqJIx5c.js} +1 -1
  343. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BRsdx_iG.js → c4Diagram-UCG6FXSJ-CinqLGU4.js} +1 -1
  344. package/web-shell/assets/channel-BHGoSkEv.js +1 -0
  345. package/web-shell/assets/{chunk-2Q5K7J3B-3lf1fNlx.js → chunk-2Q5K7J3B-CsjJX5M7.js} +1 -1
  346. package/web-shell/assets/{chunk-5VM5RSS4-DP8VNRc4.js → chunk-5VM5RSS4-CaVb2tdH.js} +1 -1
  347. package/web-shell/assets/{chunk-F27PBJKO-DrohDmZ6.js → chunk-F27PBJKO-CRyErlzW.js} +1 -1
  348. package/web-shell/assets/{chunk-G27WJ6UU-UZ2QhSx6.js → chunk-G27WJ6UU-7I79DZCf.js} +1 -1
  349. package/web-shell/assets/{chunk-JWPE2WC7-BIMHVcZK.js → chunk-JWPE2WC7-Dz4cac5F.js} +1 -1
  350. package/web-shell/assets/{chunk-LCL6LL3I-izRxdSDd.js → chunk-LCL6LL3I-Ls24Derb.js} +1 -1
  351. package/web-shell/assets/{chunk-POPQ4Y6H-CXADD4PP.js → chunk-POPQ4Y6H-JzYe4qx7.js} +1 -1
  352. package/web-shell/assets/{chunk-SVP7TREG-B96d8Y_1.js → chunk-SVP7TREG-BxDwesA-.js} +1 -1
  353. package/web-shell/assets/{chunk-XXDRQBXY-CF2sVQpv.js → chunk-XXDRQBXY-CW4hjgWc.js} +1 -1
  354. package/web-shell/assets/classDiagram-DTDB5LWJ-E47Xnn15.js +1 -0
  355. package/web-shell/assets/classDiagram-v2-JRS7N3AN-E47Xnn15.js +1 -0
  356. package/web-shell/assets/{cose-bilkent-JH36ORCC-CT6tXVAS.js → cose-bilkent-JH36ORCC-DxikE9iF.js} +1 -1
  357. package/web-shell/assets/{cynefin-OW5HDTMX-X1NS4vtV.js → cynefin-OW5HDTMX-CvVsIkVN.js} +1 -1
  358. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DNsKNOT4.js → cynefinDiagram-5FMLGOSQ-CDHkk3wq.js} +1 -1
  359. package/web-shell/assets/{dagre-3AP2YEHR-9-AHKqsb.js → dagre-3AP2YEHR-BgLdkVLT.js} +1 -1
  360. package/web-shell/assets/{diagram-S7CK7UJ4-Bjgms7j6.js → diagram-S7CK7UJ4-DP43cGhe.js} +1 -1
  361. package/web-shell/assets/{diagram-UQ7AKVKN-h6bCprbE.js → diagram-UQ7AKVKN-BWrZYhoT.js} +1 -1
  362. package/web-shell/assets/{diagram-VSXAHHWV-4SbQXVLt.js → diagram-VSXAHHWV-B80wjH_n.js} +1 -1
  363. package/web-shell/assets/{diagram-VX7I27RA-B5gPCzzB.js → diagram-VX7I27RA-DPpKmDsY.js} +1 -1
  364. package/web-shell/assets/{diagram-Z3DM3KII-DFJXIA3A.js → diagram-Z3DM3KII-kaEBNbNU.js} +1 -1
  365. package/web-shell/assets/{ebnfDiagram-PWID7BFC-FwyaU7VY.js → ebnfDiagram-PWID7BFC-1-qbEZvk.js} +1 -1
  366. package/web-shell/assets/{erDiagram-SSCWMZ5O-8vJQh2te.js → erDiagram-SSCWMZ5O-CrK2gMkV.js} +1 -1
  367. package/web-shell/assets/{flowDiagram-A5DVABFB-BzA_1gMN.js → flowDiagram-A5DVABFB-Dic2xofW.js} +1 -1
  368. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-Co-ABbVX.js → ganttDiagram-EL5Y4UJY-DJko8vT7.js} +1 -1
  369. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DW_FcyrX.js → gitGraphDiagram-WWUBYQGX-DxsQ-bHT.js} +1 -1
  370. package/web-shell/assets/index-DY8CxdBr.js +2173 -0
  371. package/web-shell/assets/index-eBxK3rs2.css +36 -0
  372. package/web-shell/assets/{index-BbMXfhNG.js → index-t7VBrUeD.js} +1 -1
  373. package/web-shell/assets/{infoDiagram-RXCK75RN-BEgfhUFN.js → infoDiagram-RXCK75RN-DcRUJbNi.js} +1 -1
  374. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-DCsMxQmc.js → ishikawaDiagram-5VMMS53U-CUPw-2_e.js} +1 -1
  375. package/web-shell/assets/{journeyDiagram-EYS64GPL-DyIEYoHz.js → journeyDiagram-EYS64GPL-yOHhZxkW.js} +1 -1
  376. package/web-shell/assets/{kanban-definition-3QL26DDD-CkxjqCNr.js → kanban-definition-3QL26DDD-CFUGBbqz.js} +1 -1
  377. package/web-shell/assets/{layout-BEWc0Al9.js → layout-BoilNfBU.js} +1 -1
  378. package/web-shell/assets/{linear-CNuNxirL.js → linear-DOuHaPrl.js} +1 -1
  379. package/web-shell/assets/{mermaid.core-DZBre674.js → mermaid.core-1G1fXWda.js} +6 -6
  380. package/web-shell/assets/{mindmap-definition-FBJOCRG2-CpafFz_F.js → mindmap-definition-FBJOCRG2-B8BhkrOX.js} +1 -1
  381. package/web-shell/assets/{pegDiagram-XKGWAZYB-DfZqk_dq.js → pegDiagram-XKGWAZYB-CipC5K1D.js} +1 -1
  382. package/web-shell/assets/{pieDiagram-E7YTZNPT-S0UWXlgC.js → pieDiagram-E7YTZNPT-CHBDFDUJ.js} +1 -1
  383. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-dd37_Ohj.js → quadrantDiagram-AXDQQJYC-_iiBkoZO.js} +1 -1
  384. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CH8NJZ7u.js → railroadDiagram-O6MQD6OU-Cx1peHDi.js} +1 -1
  385. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CFdqWYih.js → requirementDiagram-EFPCY7ZU-CBRiPbdQ.js} +1 -1
  386. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CsddcEGD.js → sankeyDiagram-P5KCCOFB-TT6GcHaZ.js} +1 -1
  387. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BZ270mGw.js → sequenceDiagram-WJ2MYXX4-CWP42PNb.js} +1 -1
  388. package/web-shell/assets/{sizeCapture-X5ZJPWSS-CGaS4DBV.js → sizeCapture-X5ZJPWSS-Bp94roEG.js} +1 -1
  389. package/web-shell/assets/{stateDiagram-HBIQ2CUA-COpIzMu6.js → stateDiagram-HBIQ2CUA-0ftrzTAy.js} +1 -1
  390. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-PgAST0dK.js +1 -0
  391. package/web-shell/assets/{swimlanes-XN3QIQJK-CMF889m3.js → swimlanes-XN3QIQJK-D-FsenYJ.js} +1 -1
  392. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-BcWcB5bj.js +8 -0
  393. package/web-shell/assets/{timeline-definition-24CTP7MA-BelnxYz5.js → timeline-definition-24CTP7MA-Ctvrj28y.js} +1 -1
  394. package/web-shell/assets/{vennDiagram-4TSXK5OY-CU-NRqIB.js → vennDiagram-4TSXK5OY-5DZncjOt.js} +1 -1
  395. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CDNKqWh-.js → wardleyDiagram-VM6X3IG4-jZjYwPY7.js} +1 -1
  396. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CLqguL5D.js → xychartDiagram-S5SC5T6Z-Ci6Q2C2_.js} +1 -1
  397. package/web-shell/index.html +29 -5
  398. package/chunks/chunk-V7RNNPGC.js +0 -44
  399. package/chunks/chunk-X35VIWWJ.js +0 -276
  400. package/chunks/workflow-3MABM53N.js +0 -2771
  401. package/chunks/workspace-providers-status-2FRLBZ5I.js +0 -119
  402. package/web-shell/assets/channel-uMMdTrYk.js +0 -1
  403. package/web-shell/assets/classDiagram-DTDB5LWJ-DcY-26Ig.js +0 -1
  404. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DcY-26Ig.js +0 -1
  405. package/web-shell/assets/index-Bu-rZoJ-.js +0 -2150
  406. package/web-shell/assets/index-CsPwZ1ut.css +0 -36
  407. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-D6qEVAji.js +0 -1
  408. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-mem5Jj4m.js +0 -8
  409. /package/chunks/{chunk-JA5CBKRP.js → chunk-7NXSVSFB.js} +0 -0
@@ -7,12 +7,12 @@ import {
7
7
  hostAssignsIpv6Loopback,
8
8
  isOwnInterfaceAddress
9
9
  } from "./chunk-24FVUD5P.js";
10
- import {
11
- resolveServeToken
12
- } from "./chunk-ZELCTN6Y.js";
13
10
  import {
14
11
  RUNTIME_STARTUP_CANCELLED_MESSAGE
15
12
  } from "./chunk-QUPXZXLV.js";
13
+ import {
14
+ resolveRemoteServeToken
15
+ } from "./chunk-F23YN37B.js";
16
16
  import {
17
17
  ACCESS_LOG_CONTROLLER_LOCAL,
18
18
  CAPABILITIES_SCHEMA_VERSION,
@@ -33,6 +33,7 @@ import {
33
33
  getRateLimiter,
34
34
  getServeProtocolVersions,
35
35
  hostAllowlist,
36
+ installRemoteSelfOriginMiddleware,
36
37
  installSelfOriginStripMiddleware,
37
38
  isBrowserAutomationMcpAvailable,
38
39
  isDeepHealthQuery,
@@ -40,7 +41,9 @@ import {
40
41
  isLocalTerminalAvailable,
41
42
  isManagedScratchChild,
42
43
  isNativeDirectoryPickerAvailable,
44
+ isSoftwareNetwork,
43
45
  isTrustedLoopbackMode,
46
+ listLanCandidates,
44
47
  listenerMaxConnections,
45
48
  parseAllowOriginPatterns,
46
49
  parseDaemonStatusDetail,
@@ -48,7 +51,7 @@ import {
48
51
  prepareManagedScratchRoot,
49
52
  resolveAcpHttpEnabled,
50
53
  toDaemonStatusMemoryLimits
51
- } from "./chunk-M73KHGNR.js";
54
+ } from "./chunk-B2TGBZXY.js";
52
55
  import {
53
56
  ConversationDirectoryIdentityError,
54
57
  assertExactConversationRootIdentity,
@@ -69,23 +72,28 @@ import {
69
72
  import {
70
73
  setDeferredRuntimeRequestTiming
71
74
  } from "./chunk-LAUEEBDL.js";
75
+ import {
76
+ normalizeSessionIdForLookup
77
+ } from "./chunk-ZEZKIS2K.js";
72
78
  import {
73
79
  require_express
74
- } from "./chunk-IRKQ4YYX.js";
80
+ } from "./chunk-SVWWF5TZ.js";
75
81
  import {
76
82
  resolveWebShellDir
77
83
  } from "./chunk-FBX2SDQ4.js";
78
84
  import {
85
+ formatHostForAuthority,
79
86
  isLoopbackAddress,
80
87
  isLoopbackBind
81
88
  } from "./chunk-DMEUXLSS.js";
82
- import {
83
- normalizeSessionIdForLookup
84
- } from "./chunk-ZEZKIS2K.js";
85
89
  import "./chunk-NYWWQ437.js";
86
90
  import {
87
91
  resolveSessionRestoreTimeoutMs
88
92
  } from "./chunk-4JRM2BSM.js";
93
+ import {
94
+ ConversationRuntimeOwnershipError,
95
+ LIVE_HOST_PROTOCOL_VERSION
96
+ } from "./chunk-2Z3T52OC.js";
89
97
  import {
90
98
  DEFAULT_RING_SIZE
91
99
  } from "./chunk-7U5G6JXI.js";
@@ -98,39 +106,21 @@ import {
98
106
  normalizeMaxJournalBytes,
99
107
  normalizeMaxJournalEvents
100
108
  } from "./chunk-WCCLLK7X.js";
101
- import {
102
- resolveChannelCwd
103
- } from "./chunk-3BTHHXXE.js";
104
- import {
105
- ConversationRuntimeOwnershipError,
106
- LIVE_HOST_PROTOCOL_VERSION
107
- } from "./chunk-2Z3T52OC.js";
108
109
  import "./chunk-ZL4HFSL6.js";
109
- import "./chunk-K6KS3LTN.js";
110
- import "./chunk-OSHQMOBS.js";
111
110
  import {
112
- consumeServeFastPathRejectedLoaderKeys,
113
- loadServeFastPathSettings,
114
- preResolveServeFastPathHomeEnvOverrides
115
- } from "./chunk-FV4DM2M4.js";
111
+ resolveChannelCwd
112
+ } from "./chunk-CSHX5ZC4.js";
116
113
  import {
117
- MAX_REGISTERED_WORKSPACES,
118
- resolveWorkspaceInputs,
119
- workspaceRegistrationId
120
- } from "./chunk-WZS3X663.js";
121
- import "./chunk-EHTKOO6W.js";
114
+ assertChannelControlWorkspaceCapacity
115
+ } from "./chunk-6UK77U7D.js";
122
116
  import {
123
117
  LOAD_REPLAY_META_KEY
124
- } from "./chunk-PSPAM24S.js";
118
+ } from "./chunk-YKK2XXHF.js";
125
119
  import "./chunk-FAWTMDX7.js";
126
- import {
127
- canonicalizeWorkspace,
128
- translateAndCheckAbsoluteWorkspacePath
129
- } from "./chunk-6PLDPT2C.js";
130
120
  import {
131
121
  ExtraCaInspectionError,
132
122
  loadableCertificates
133
- } from "./chunk-CABDNUJ4.js";
123
+ } from "./chunk-XDQUDARC.js";
134
124
  import "./chunk-FYJ7W2PI.js";
135
125
  import "./chunk-Z7B6SRPM.js";
136
126
  import {
@@ -139,19 +129,25 @@ import {
139
129
  import {
140
130
  normalizeWorkerDiagnostic,
141
131
  sanitizeWorkerDiagnostic
142
- } from "./chunk-GM44O6F7.js";
132
+ } from "./chunk-LEGNDA46.js";
133
+ import {
134
+ channelSelectionNames,
135
+ normalizeServeChannelSelection
136
+ } from "./chunk-GDWE23OR.js";
143
137
  import {
144
138
  QWEN_SERVER_TOKEN_ENV
145
139
  } from "./chunk-GYTKQYDB.js";
146
- import {
147
- channelSelectionNames
148
- } from "./chunk-ALMR3E6Q.js";
149
140
  import {
150
141
  ChannelDeliveryError,
151
142
  isChannelDeliveryError
152
143
  } from "./chunk-RKFGE7JH.js";
144
+ import {
145
+ MAX_CHANNEL_CONTROL_WORKSPACES
146
+ } from "./chunk-CJ3DHN5I.js";
153
147
  import "./chunk-UDG5EZJI.js";
154
- import "./chunk-M5GB774H.js";
148
+ import {
149
+ redactLogCredentials
150
+ } from "./chunk-M5GB774H.js";
155
151
  import {
156
152
  EXTERNAL_TOOL_GUARD_PROVIDER_ATTACHED_VALUE,
157
153
  EXTERNAL_TOOL_GUARD_REQUIRED_VALUE,
@@ -159,27 +155,40 @@ import {
159
155
  PRIVATE_EXTERNAL_TOOL_GUARD_ENV,
160
156
  PRIVATE_EXTERNAL_TOOL_GUARD_PROVIDER_ENV
161
157
  } from "./chunk-3VUENPWF.js";
158
+ import "./chunk-K6KS3LTN.js";
159
+ import "./chunk-OSHQMOBS.js";
162
160
  import {
163
161
  sanitizeLogText
164
- } from "./chunk-XVTCSVBK.js";
165
- import "./chunk-IW6RQPQB.js";
162
+ } from "./chunk-C4NLHK7X.js";
163
+ import "./chunk-IJOS26LH.js";
166
164
  import {
167
- MAX_DAEMON_WORKSPACES
168
- } from "./chunk-5HBA2Z7V.js";
165
+ consumeServeFastPathRejectedLoaderKeys,
166
+ loadServeFastPathSettings,
167
+ preResolveServeFastPathHomeEnvOverrides
168
+ } from "./chunk-WXFK4MH7.js";
169
169
  import "./chunk-BW4333PP.js";
170
- import {
171
- getGlobalQwenDirLite,
172
- resolveConfigPathLite
173
- } from "./chunk-IDS7MSUP.js";
174
170
  import {
175
171
  acquireInheritedLoaderEnvScrub,
176
172
  clearLoaderKeyRejectionReporterIfCurrent,
177
173
  scrubInheritedLoaderEnv,
178
174
  setLoaderKeyRejectionReporter
179
- } from "./chunk-QTNCGZHQ.js";
175
+ } from "./chunk-VX63RJXE.js";
176
+ import {
177
+ resolveMaxRegisteredWorkspaces,
178
+ resolveWorkspaceInputs,
179
+ workspaceRegistrationId
180
+ } from "./chunk-SNZWDV67.js";
181
+ import {
182
+ canonicalizeWorkspace,
183
+ translateAndCheckAbsoluteWorkspacePath
184
+ } from "./chunk-6PLDPT2C.js";
185
+ import {
186
+ getGlobalQwenDirLite,
187
+ resolveConfigPathLite
188
+ } from "./chunk-IDS7MSUP.js";
180
189
  import {
181
190
  getCliVersion
182
- } from "./chunk-ISPBBKJN.js";
191
+ } from "./chunk-ONGZNOIP.js";
183
192
  import "./chunk-W3N5XAZ6.js";
184
193
  import "./chunk-NPQ5ZKRP.js";
185
194
  import {
@@ -192,10 +201,10 @@ import {
192
201
  } from "./chunk-32CM56LO.js";
193
202
  import "./chunk-LJZSMWOH.js";
194
203
  import "./chunk-GOFAQQZA.js";
195
- import "./chunk-65I7S4Z3.js";
196
- import "./chunk-6HUXPLB5.js";
197
204
  import "./chunk-TWPJO254.js";
198
205
  import "./chunk-CQ35AJ4Z.js";
206
+ import "./chunk-65I7S4Z3.js";
207
+ import "./chunk-6HUXPLB5.js";
199
208
  import {
200
209
  require_proper_lockfile
201
210
  } from "./chunk-MLXTMF7H.js";
@@ -204,6 +213,12 @@ import "./chunk-5ETULJLP.js";
204
213
  import {
205
214
  MEMORY_PROJECT_SCOPES
206
215
  } from "./chunk-HD7O6WLV.js";
216
+ import {
217
+ TraceFlags,
218
+ init_esm,
219
+ isSpanContextValid,
220
+ trace
221
+ } from "./chunk-TBWQLLFO.js";
207
222
  import {
208
223
  finalizeStartupProfile,
209
224
  profileCheckpoint
@@ -211,16 +226,11 @@ import {
211
226
  import "./chunk-JVEGA3MM.js";
212
227
  import {
213
228
  writeStderrLine,
214
- writeStdoutLine
229
+ writeStdoutLine,
230
+ writeStdoutLineSafe
215
231
  } from "./chunk-7FA2II6K.js";
216
232
  import "./chunk-DMTGGOSA.js";
217
233
  import "./chunk-YQ3U5MUC.js";
218
- import {
219
- TraceFlags,
220
- init_esm,
221
- isSpanContextValid,
222
- trace
223
- } from "./chunk-TBWQLLFO.js";
224
234
  import {
225
235
  init_esbuild_shims
226
236
  } from "./chunk-5O2XNYP6.js";
@@ -251,10 +261,11 @@ init_esbuild_shims();
251
261
  var MIN_CHILD_HEAP_MB = 512;
252
262
 
253
263
  // packages/acp-bridge/dist/child-heap-policy.js
264
+ var MAX_MODELED_ACP_CHILDREN = 25;
254
265
  function createChildHeapPolicy(options) {
255
266
  const { budget, mode } = options;
256
267
  let refusals = 0;
257
- const admissible = Math.min(Math.floor(budget.childPoolMb / MIN_CHILD_HEAP_MB), MAX_DAEMON_WORKSPACES);
268
+ const admissible = Math.min(Math.floor(budget.childPoolMb / MIN_CHILD_HEAP_MB), MAX_MODELED_ACP_CHILDREN);
258
269
  const rawCeilingMb = admissible > 0 ? Math.min(Math.floor(budget.childPoolMb / admissible), budget.legacyChildCeilingMb) : null;
259
270
  const modelable = rawCeilingMb !== null && rawCeilingMb >= MIN_CHILD_HEAP_MB;
260
271
  const maxConcurrentChildren = modelable ? admissible : 0;
@@ -283,6 +294,125 @@ function createChildHeapPolicy(options) {
283
294
  }
284
295
  __name(createChildHeapPolicy, "createChildHeapPolicy");
285
296
 
297
+ // packages/cli/src/serve/remote-quickstart.ts
298
+ init_esbuild_shims();
299
+ import { networkInterfaces } from "node:os";
300
+ function isUlaIpv6(address) {
301
+ return /^(?:fc|fd)/iu.test(address);
302
+ }
303
+ __name(isUlaIpv6, "isUlaIpv6");
304
+ function isLinkLocalIpv4(address) {
305
+ return address.startsWith("169.254.");
306
+ }
307
+ __name(isLinkLocalIpv4, "isLinkLocalIpv4");
308
+ function quickstartPrintMode(boundAddress, generated) {
309
+ if (!isLoopbackAddress(boundAddress)) return "full";
310
+ return generated ? "token-only" : "silent";
311
+ }
312
+ __name(quickstartPrintMode, "quickstartPrintMode");
313
+ function remoteQuickstartEntries(bind, boundAddress, port, tls, interfaces) {
314
+ const scheme = tls ? "https" : "http";
315
+ const url = /* @__PURE__ */ __name((host) => `${scheme}://${formatHostForAuthority(host)}:${port}`, "url");
316
+ const bound = boundAddress.trim().toLowerCase();
317
+ const ipv4Wildcard = bound === "0.0.0.0" || bound === "::ffff:0.0.0.0";
318
+ if (!ipv4Wildcard && bound !== "::") {
319
+ if (bind.trim().includes("%")) return [];
320
+ return [{ label: "Address", url: url(bind), address: bind }];
321
+ }
322
+ const localAddress = !ipv4Wildcard && hostAssignsIpv6Loopback(interfaces) ? "::1" : "127.0.0.1";
323
+ const addresses = [
324
+ { label: "Local", url: url(localAddress), address: localAddress }
325
+ ];
326
+ for (const candidate of listLanCandidates(interfaces)) {
327
+ addresses.push({
328
+ label: `Network (${candidate.interfaceName})`,
329
+ url: url(candidate.address),
330
+ address: candidate.address
331
+ });
332
+ }
333
+ if (!ipv4Wildcard) {
334
+ for (const [name, entries] of Object.entries(interfaces).sort()) {
335
+ if (isSoftwareNetwork(name)) continue;
336
+ for (const entry of entries ?? []) {
337
+ if (entry.internal || entry.family !== "IPv6") continue;
338
+ if (entry.address.includes("%") || !isUlaIpv6(entry.address)) continue;
339
+ addresses.push({
340
+ label: `Network (${name})`,
341
+ url: url(entry.address),
342
+ address: entry.address
343
+ });
344
+ }
345
+ }
346
+ }
347
+ return addresses;
348
+ }
349
+ __name(remoteQuickstartEntries, "remoteQuickstartEntries");
350
+ async function printRemoteQuickstart(input) {
351
+ try {
352
+ const mode = quickstartPrintMode(input.boundAddress, input.generated);
353
+ if (mode === "silent") return;
354
+ if (mode === "token-only") {
355
+ writeStdoutLineSafe(
356
+ `Generated bearer token (secret; changes on restart): ${input.token}`
357
+ );
358
+ writeStdoutLineSafe(
359
+ "The listener bound loopback, so no network address or QR is printed; local clients must present this bearer."
360
+ );
361
+ return;
362
+ }
363
+ const addresses = remoteQuickstartEntries(
364
+ input.bind,
365
+ input.boundAddress,
366
+ input.port,
367
+ input.tls,
368
+ input.interfaces ?? networkInterfaces()
369
+ );
370
+ for (const address of addresses)
371
+ writeStdoutLineSafe(`${address.label}: ${address.url}`);
372
+ if (input.generated) {
373
+ writeStdoutLineSafe(
374
+ `Generated bearer token (secret; changes on restart): ${input.token}`
375
+ );
376
+ }
377
+ if (!input.tls)
378
+ writeStdoutLineSafe(
379
+ "HTTP is unencrypted. Use the existing TLS options for encrypted remote access."
380
+ );
381
+ if (!input.web) return;
382
+ const candidate = addresses.find(
383
+ (address) => address.label !== "Local" && !isLinkLocalIpv4(address.address)
384
+ ) ?? addresses.find((address) => address.label !== "Local");
385
+ if (!candidate) {
386
+ writeStdoutLineSafe(
387
+ "QR unavailable; enter the bearer token at the daemon address."
388
+ );
389
+ return;
390
+ }
391
+ if (!input.generated && !process.stdout.isTTY) return;
392
+ try {
393
+ const { default: qrcode } = await import("./main-PXAUXNF2.js");
394
+ qrcode.setErrorLevel("Q");
395
+ qrcode.generate(
396
+ `${candidate.url}/#token=${encodeURIComponent(input.token)}`,
397
+ { small: true },
398
+ (code) => {
399
+ writeStdoutLineSafe(
400
+ `Scan to open Web Shell: ${candidate.url} (${candidate.label})`
401
+ );
402
+ writeStdoutLineSafe("SECRET QR: grants daemon access. Do not share.");
403
+ writeStdoutLineSafe(code.trimEnd());
404
+ }
405
+ );
406
+ } catch {
407
+ writeStdoutLineSafe(
408
+ "QR unavailable; enter the bearer token at the daemon address."
409
+ );
410
+ }
411
+ } catch {
412
+ }
413
+ }
414
+ __name(printRemoteQuickstart, "printRemoteQuickstart");
415
+
286
416
  // packages/cli/src/serve/permission-audit.ts
287
417
  init_esbuild_shims();
288
418
  var DEFAULT_PERMISSION_AUDIT_RING_SIZE = 512;
@@ -2975,6 +3105,16 @@ var QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS_ENV = "QWEN_SERVE_WRITER_IDLE_TIMEOUT_MS";
2975
3105
  var SHUTDOWN_FORCE_CLOSE_MS = 5e3;
2976
3106
  var DAEMON_LOG_FORCED_FLUSH_BUDGET_MS = 250;
2977
3107
  var DEFAULT_LIVE_DISCOVERY_RETRY_MS = 5e3;
3108
+ var ENSURE_KEEP_ALIVE_MS = 10 * 6e4;
3109
+ function deepestErrorMessage(err) {
3110
+ if (!(err instanceof Error)) return String(err);
3111
+ let deepest = err;
3112
+ while (deepest.cause instanceof Error) {
3113
+ deepest = deepest.cause;
3114
+ }
3115
+ return deepest.message;
3116
+ }
3117
+ __name(deepestErrorMessage, "deepestErrorMessage");
2978
3118
  function channelDeliveryPublicError(code) {
2979
3119
  switch (code) {
2980
3120
  case "channel_worker_unavailable":
@@ -3123,7 +3263,8 @@ function isNonNegativeIntegerOrInfinity(value) {
3123
3263
  return value === Number.POSITIVE_INFINITY || Number.isFinite(value) && Number.isInteger(value) && value >= 0;
3124
3264
  }
3125
3265
  __name(isNonNegativeIntegerOrInfinity, "isNonNegativeIntegerOrInfinity");
3126
- function deriveDefaultMaxTotalSessions(maxSessionsPerWorkspace, workspaceCount) {
3266
+ function deriveDefaultMaxTotalSessions(maxSessionsPerWorkspace, workspaceCount, maxRegisteredWorkspaces) {
3267
+ if (maxRegisteredWorkspaces > 25) return 800;
3127
3268
  if (workspaceCount <= 1) return void 0;
3128
3269
  const perWorkspace = maxSessionsPerWorkspace ?? DEFAULT_MAX_SESSIONS;
3129
3270
  if (perWorkspace === 0 || perWorkspace === Number.POSITIVE_INFINITY) {
@@ -3260,14 +3401,11 @@ function canonicalIpLiteral(host) {
3260
3401
  }
3261
3402
  }
3262
3403
  __name(canonicalIpLiteral, "canonicalIpLiteral");
3263
- function formatChannelWorkerDaemonUrl(host, port, tls = false, boundFamily, ipv6LoopbackAssigned = hostAssignsIpv6Loopback()) {
3404
+ function formatChannelWorkerDaemonUrl(host, port, tls = false, ipv6LoopbackAssigned = hostAssignsIpv6Loopback()) {
3264
3405
  const scheme = tls ? "https" : "http";
3265
3406
  const normalized = host.trim().toLowerCase();
3266
3407
  const canonicalIp = canonicalIpLiteral(normalized);
3267
3408
  const v6Loopback = ipv6LoopbackAssigned ? `${scheme}://[::1]:${port}` : `${scheme}://127.0.0.1:${port}`;
3268
- if (normalized === "") {
3269
- return boundFamily === "IPv4" ? `${scheme}://127.0.0.1:${port}` : v6Loopback;
3270
- }
3271
3409
  if (canonicalIp === "::") {
3272
3410
  return v6Loopback;
3273
3411
  }
@@ -3804,12 +3942,12 @@ __name(hasRetryableChannelWorkerShutdownError, "hasRetryableChannelWorkerShutdow
3804
3942
  var channelWorkerRuntimePromise;
3805
3943
  async function loadChannelWorkerRuntime() {
3806
3944
  channelWorkerRuntimePromise ??= Promise.all([
3807
- import("./channel-worker-supervisor-XJPZZ3VK.js"),
3808
- import("./pidfile-KPIS6RIT.js"),
3809
- import("./runtime-KGMQQFJD.js"),
3945
+ import("./channel-worker-supervisor-HSFAKML6.js"),
3946
+ import("./pidfile-JAIOWPI3.js"),
3947
+ import("./runtime-5RO22P2N.js"),
3810
3948
  import("./cli-entry-path-4VJ3Y6T2.js"),
3811
- import("./channel-worker-group-PIYPVCTF.js"),
3812
- import("./channel-worker-manager-FQHEDTD2.js")
3949
+ import("./channel-worker-group-X6WH4XWF.js"),
3950
+ import("./channel-worker-manager-SICFJDPJ.js")
3813
3951
  ]).then(
3814
3952
  ([
3815
3953
  supervisor,
@@ -3915,7 +4053,7 @@ function shouldPreheatBridge(deps) {
3915
4053
  __name(shouldPreheatBridge, "shouldPreheatBridge");
3916
4054
  var coreRuntimePromise;
3917
4055
  function loadCoreRuntime() {
3918
- coreRuntimePromise ??= import("./core-runtime-6U4OXU5C.js");
4056
+ coreRuntimePromise ??= import("./core-runtime-YGUA42AZ.js");
3919
4057
  return coreRuntimePromise;
3920
4058
  }
3921
4059
  __name(loadCoreRuntime, "loadCoreRuntime");
@@ -3951,10 +4089,10 @@ __name(resolveDaemonLogBaseDirForRun, "resolveDaemonLogBaseDirForRun");
3951
4089
  var settingsRuntimePromise;
3952
4090
  function loadSettingsRuntimeModules() {
3953
4091
  settingsRuntimePromise ??= Promise.all([
3954
- import("./settings-RKEQQDFC.js"),
3955
- import("./environment-BI6IBAZJ.js"),
3956
- import("./loadedSettingsAdapter-I3YQKMC4.js"),
3957
- import("./trustedFolders-C76KYROP.js")
4092
+ import("./settings-SWQH36PO.js"),
4093
+ import("./environment-URPO5ORZ.js"),
4094
+ import("./loadedSettingsAdapter-NZORJLSD.js"),
4095
+ import("./trustedFolders-GKQZXZSV.js")
3958
4096
  ]).then(([settings, environment, loadedSettingsAdapter, trustedFolders]) => ({
3959
4097
  settings,
3960
4098
  environment,
@@ -3967,8 +4105,8 @@ __name(loadSettingsRuntimeModules, "loadSettingsRuntimeModules");
3967
4105
  var channelWebhookConfigRuntimePromise;
3968
4106
  function loadChannelWebhookConfigRuntime() {
3969
4107
  channelWebhookConfigRuntimePromise ??= Promise.all([
3970
- import("./runtime-KGMQQFJD.js"),
3971
- import("./config-utils-37FHWPTP.js")
4108
+ import("./runtime-5RO22P2N.js"),
4109
+ import("./config-utils-S5LFS4RN.js")
3972
4110
  ]).then(([channelRuntime, configUtils]) => ({
3973
4111
  loadChannelsConfig: channelRuntime.loadChannelsConfig,
3974
4112
  parseChannelWebhookConfig: configUtils.parseChannelWebhookConfig
@@ -3995,19 +4133,19 @@ async function loadServeRuntimeModules() {
3995
4133
  workspaceRuntimeCoordinatorModule,
3996
4134
  promptLedgerModule
3997
4135
  ] = await Promise.all([
3998
- import("./server-PJRALPJQ.js"),
3999
- import("./bridge-Q66BD62H.js"),
4000
- import("./spawnChannel-WM3DT2BF.js"),
4001
- import("./process-registry-OAEG6WGC.js"),
4002
- import("./workspace-service-4MYO72MM.js"),
4136
+ import("./server-SWXVPRCS.js"),
4137
+ import("./bridge-YF6NYRPZ.js"),
4138
+ import("./spawnChannel-7ZVM3GBU.js"),
4139
+ import("./process-registry-X6ZCASEN.js"),
4140
+ import("./workspace-service-HWXZSA4J.js"),
4003
4141
  import("./types-HKLPXZB3.js"),
4004
- import("./daemon-status-provider-7GMAKSTX.js"),
4005
- import("./workspace-providers-status-2FRLBZ5I.js"),
4006
- import("./workspace-skills-status-SU66TJLZ.js"),
4007
- import("./total-session-admission-FUUJH3QH.js"),
4008
- import("./workspace-registry-BNRP2ELW.js"),
4009
- import("./workspace-runtime-coordinator-WKGF7VHS.js"),
4010
- import("./prompt-terminal-ledger-D6HM6TV7.js")
4142
+ import("./daemon-status-provider-RTKHKUFJ.js"),
4143
+ import("./workspace-providers-status-QBRBEFTO.js"),
4144
+ import("./workspace-skills-status-D6QXUWCC.js"),
4145
+ import("./total-session-admission-BOARHBZU.js"),
4146
+ import("./workspace-registry-CJV7KVGF.js"),
4147
+ import("./workspace-runtime-coordinator-7LYMFMFF.js"),
4148
+ import("./prompt-terminal-ledger-BYXHEUHX.js")
4011
4149
  ]);
4012
4150
  return {
4013
4151
  createServeApp: serverModule.createServeApp,
@@ -4120,6 +4258,14 @@ function createBootstrapCapabilities(input) {
4120
4258
  transports: ["rest"],
4121
4259
  policy: { permission: input.permissionPolicy ?? "first-responder" },
4122
4260
  limits: {
4261
+ maxRegisteredWorkspaces: input.opts.maxRegisteredWorkspaces,
4262
+ maxChannelControlWorkspaces: MAX_CHANNEL_CONTROL_WORKSPACES,
4263
+ ...input.opts.maxTotalSessions !== void 0 ? {
4264
+ maxSessionsPerWorkspace: advertisedMaxSessions(
4265
+ input.opts.maxSessions
4266
+ ),
4267
+ maxTotalSessions: positiveFiniteOrNull(input.opts.maxTotalSessions)
4268
+ } : {},
4123
4269
  maxPendingPromptsPerSession: advertisedMaxPendingPromptsPerSession(
4124
4270
  input.opts.maxPendingPromptsPerSession
4125
4271
  ),
@@ -4247,12 +4393,13 @@ function createBootstrapServeApp(input) {
4247
4393
  const localPathOpenAvailable = isLocalPathOpenAvailable();
4248
4394
  const localTerminalOpenAvailable = isLocalTerminalAvailable();
4249
4395
  installSelfOriginStripMiddleware(app, getPort, opts.hostname);
4396
+ app.use(hostAllowlist(opts.hostname, getPort));
4397
+ installRemoteSelfOriginMiddleware(app, opts.hostname, opts.token);
4250
4398
  if (opts.allowOrigins && opts.allowOrigins.length > 0) {
4251
4399
  app.use(allowOriginCors(parseAllowOriginPatterns(opts.allowOrigins)));
4252
4400
  } else {
4253
4401
  app.use(denyBrowserOriginCors);
4254
4402
  }
4255
- app.use(hostAllowlist(opts.hostname, getPort));
4256
4403
  const healthHandler = /* @__PURE__ */ __name((req, res) => {
4257
4404
  const runtimeError = getRuntimeError();
4258
4405
  if (runtimeError !== void 0) {
@@ -4379,6 +4526,8 @@ function createBootstrapServeApp(input) {
4379
4526
  sessionShellCommandEnabled
4380
4527
  },
4381
4528
  limits: {
4529
+ maxRegisteredWorkspaces: opts.maxRegisteredWorkspaces,
4530
+ maxChannelControlWorkspaces: MAX_CHANNEL_CONTROL_WORKSPACES,
4382
4531
  maxSessions: advertisedMaxSessions(opts.maxSessions),
4383
4532
  maxTotalSessions: positiveFiniteOrNull(opts.maxTotalSessions),
4384
4533
  maxPendingPromptsPerSession: advertisedMaxPendingPromptsPerSession(
@@ -4723,7 +4872,19 @@ async function runQwenServe(optsIn, deps = {}) {
4723
4872
  }
4724
4873
  }
4725
4874
  __name(runQwenServe, "runQwenServe");
4875
+ var brokenPipeGuardInstalled = false;
4876
+ function installServeBrokenPipeGuard() {
4877
+ if (brokenPipeGuardInstalled) return;
4878
+ brokenPipeGuardInstalled = true;
4879
+ const ignoreEpipe = /* @__PURE__ */ __name((err) => {
4880
+ if (err.code !== "EPIPE") throw err;
4881
+ }, "ignoreEpipe");
4882
+ process.stdout.on("error", ignoreEpipe);
4883
+ process.stderr.on("error", ignoreEpipe);
4884
+ }
4885
+ __name(installServeBrokenPipeGuard, "installServeBrokenPipeGuard");
4726
4886
  async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4887
+ installServeBrokenPipeGuard();
4727
4888
  const runStartedAt = performance2.now();
4728
4889
  delete process.env[EXTERNAL_TOOL_GUARD_TOKEN_ENV];
4729
4890
  const channelDeliveryAuthorizations = new ChannelDeliveryAuthorizationStore();
@@ -4765,8 +4926,16 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4765
4926
  loaderEnvScrub.release();
4766
4927
  }, "restoreScrubbedLoaderEnv");
4767
4928
  loggerLifecycle.scrubApplied(restoreScrubbedLoaderEnv);
4768
- const token = resolveServeToken(optsIn.token);
4929
+ if (!optsIn.hostname.trim()) {
4930
+ throw new Error(
4931
+ "Invalid --hostname: empty value binds every interface. Pass an explicit address (e.g. --hostname 0.0.0.0) or omit the flag."
4932
+ );
4933
+ }
4769
4934
  const bindHostname = optsIn.hostname.toLowerCase() === "localhost" ? (await (deps.bindHostnameLookup ?? lookup)(optsIn.hostname)).address : optsIn.hostname;
4935
+ const { token, generated: generatedToken } = resolveRemoteServeToken(
4936
+ optsIn.token,
4937
+ isLoopbackBind(optsIn.hostname)
4938
+ );
4770
4939
  const trustedLoopbackMode = isTrustedLoopbackMode({
4771
4940
  loopbackBind: isLoopbackAddress(bindHostname),
4772
4941
  tokenConfigured: token !== void 0,
@@ -4800,6 +4969,10 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4800
4969
  const opts = {
4801
4970
  ...optsIn,
4802
4971
  hostname: bindHostname,
4972
+ maxRegisteredWorkspaces: resolveMaxRegisteredWorkspaces(
4973
+ optsIn.maxRegisteredWorkspaces,
4974
+ daemonRuntimeBaseEnv
4975
+ ),
4803
4976
  token,
4804
4977
  promptDeadlineMs,
4805
4978
  writerIdleTimeoutMs,
@@ -4931,7 +5104,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4931
5104
  }
4932
5105
  if (!isLoopbackBind(opts.hostname) && !token) {
4933
5106
  throw new Error(
4934
- `Refusing to bind ${opts.hostname}:${opts.port} without a bearer token. Set ${QWEN_SERVER_TOKEN_ENV} or pass --token, or rebind to loopback (127.0.0.0/8, localhost, ::1, or [::1]).`
5107
+ `Refusing to bind ${opts.hostname}:${opts.port} without a bearer token (an explicitly empty --token or ${QWEN_SERVER_TOKEN_ENV} counts as none, since a blank source never generates one). Set ${QWEN_SERVER_TOKEN_ENV} or pass --token, or rebind to loopback (127.0.0.0/8, localhost, ::1, or [::1]).`
4935
5108
  );
4936
5109
  }
4937
5110
  if (opts.requireAuth && !token) {
@@ -5022,9 +5195,9 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5022
5195
  }
5023
5196
  }
5024
5197
  }
5025
- if (workspaceInputs.length > MAX_REGISTERED_WORKSPACES) {
5198
+ if (workspaceInputs.length > opts.maxRegisteredWorkspaces) {
5026
5199
  throw new Error(
5027
- `At most ${MAX_REGISTERED_WORKSPACES} --workspace values may be registered.`
5200
+ `At most ${opts.maxRegisteredWorkspaces} --workspace values may be registered.`
5028
5201
  );
5029
5202
  }
5030
5203
  opts.daemonMemoryBudget = resolveDaemonMemoryBudget({
@@ -5064,8 +5237,9 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5064
5237
  );
5065
5238
  }
5066
5239
  let workspaceRegistrationStore = deps.workspaceRegistrationStore;
5240
+ const explicitWorkspaceCount = workspaceInputs.length;
5067
5241
  if (workspaceRegistrationStore === void 0 && process.env["QWEN_SERVE_NO_PERSISTENT_REGISTRATION"] !== "1") {
5068
- const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-YL7HLYYI.js");
5242
+ const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-WUKTMJPW.js");
5069
5243
  workspaceRegistrationStore = new WorkspaceRegistrationStore(boundWorkspace);
5070
5244
  }
5071
5245
  if (workspaceRegistrationStore) {
@@ -5120,14 +5294,6 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5120
5294
  );
5121
5295
  continue;
5122
5296
  }
5123
- if (workspaceInputs.length >= MAX_REGISTERED_WORKSPACES) {
5124
- writeStderrLine(
5125
- `qwen serve: skipping persisted workspace registration ${JSON.stringify(
5126
- storedWorkspace
5127
- )}: workspace limit reached`
5128
- );
5129
- continue;
5130
- }
5131
5297
  workspaceInputs.push({
5132
5298
  raw: storedWorkspace,
5133
5299
  cwd,
@@ -5142,6 +5308,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5142
5308
  );
5143
5309
  }
5144
5310
  }
5311
+ if (workspaceInputs.length > opts.maxRegisteredWorkspaces) {
5312
+ throw new Error(
5313
+ `${explicitWorkspaceCount} explicit + ${workspaceInputs.length - explicitWorkspaceCount} restored workspaces exceed the configured limit of ${opts.maxRegisteredWorkspaces}. Restart with the previous capacity, forget registrations and reduce explicit --workspace values before lowering the limit. The registration store was not changed.`
5314
+ );
5315
+ }
5145
5316
  if (workspaceInputs.length > 1 && deps.bridge) {
5146
5317
  throw new Error(
5147
5318
  "Injected bridge dependencies are only supported with a single workspace; multiple --workspace values require runQwenServe to construct one bridge per workspace."
@@ -5167,7 +5338,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5167
5338
  throw err;
5168
5339
  }
5169
5340
  writeStderrLine(
5170
- `qwen serve: could not read settings for context.fileName / policy.* (${err instanceof Error ? err.message : String(err)}); falling back to defaults. Restart with a valid settings.json to apply context.fileName / policy.* overrides.`
5341
+ `qwen serve: could not read settings for context.fileName / policy.* / serve.channels (${err instanceof Error ? err.message : String(err)}); falling back to defaults. Restart with a valid settings.json to apply context.fileName / policy.* / serve.channels overrides.`
5171
5342
  );
5172
5343
  }
5173
5344
  const daemonLogBaseDir = await resolveDaemonLogBaseDirForRun({
@@ -5180,6 +5351,54 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5180
5351
  baseDir: daemonLogBaseDir
5181
5352
  });
5182
5353
  loggerLifecycle.initialized(daemonLog);
5354
+ let channelSelectionFromSettings = false;
5355
+ const reportConfiguredChannelStartupFailure = /* @__PURE__ */ __name((error) => {
5356
+ const message = sanitizeLogText(
5357
+ redactLogCredentials(
5358
+ error instanceof Error ? error.message : String(error)
5359
+ ),
5360
+ 512
5361
+ );
5362
+ const detail = /[.!?]$/.test(message) ? message : `${message}.`;
5363
+ writeStderrLine(
5364
+ `qwen serve: workspace serve.channels was not restored: ${detail} Continuing without channels.`
5365
+ );
5366
+ daemonLog.warn(
5367
+ `workspace serve.channels was not restored: ${detail} Continuing without channels`
5368
+ );
5369
+ }, "reportConfiguredChannelStartupFailure");
5370
+ if (!opts.channelSelection && bootSettings?.serve?.channels !== void 0) {
5371
+ try {
5372
+ const rawChannels = bootSettings.serve.channels;
5373
+ if (!Array.isArray(rawChannels) || !rawChannels.every((name) => typeof name === "string")) {
5374
+ throw new Error("serve.channels must be a string array.");
5375
+ }
5376
+ const configuredChannels = rawChannels.filter((name, index) => {
5377
+ if (!name || name !== name.trim() || sanitizeLogText(name, name.length) !== name) {
5378
+ daemonLog.warn(
5379
+ `ignored invalid workspace serve.channels entry at index ${index}`
5380
+ );
5381
+ return false;
5382
+ }
5383
+ return true;
5384
+ });
5385
+ opts.channelSelection = normalizeServeChannelSelection(
5386
+ configuredChannels,
5387
+ "serve.channels"
5388
+ );
5389
+ if (opts.channelSelection) {
5390
+ channelSelectionFromSettings = true;
5391
+ channelRuntime = await ensureChannelRuntime();
5392
+ daemonLog.info("restoring channels from workspace serve.channels", {
5393
+ channels: channelSelectionNames(opts.channelSelection),
5394
+ workspaceCwd: boundWorkspace
5395
+ });
5396
+ }
5397
+ } catch (error) {
5398
+ opts.channelSelection = void 0;
5399
+ reportConfiguredChannelStartupFailure(error);
5400
+ }
5401
+ }
5183
5402
  daemonLog.info("project memory scope resolved", {
5184
5403
  projectMemoryScope: resolvedMemoryProjectScope,
5185
5404
  projectMemoryScopeSource: memoryProjectScopeSource,
@@ -5331,7 +5550,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5331
5550
  }
5332
5551
  opts.maxTotalSessions ??= deriveDefaultMaxTotalSessions(
5333
5552
  opts.maxSessions,
5334
- workspaceInputs.length
5553
+ workspaceInputs.length,
5554
+ opts.maxRegisteredWorkspaces
5335
5555
  );
5336
5556
  const inheritedNoPool = process.env["QWEN_SERVE_NO_MCP_POOL"] === "1";
5337
5557
  if (opts.mcpPoolActive === void 0 && inheritedNoPool) {
@@ -5356,7 +5576,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5356
5576
  "qwen serve: required external tool guard handshake succeeded."
5357
5577
  );
5358
5578
  }
5359
- const { createDaemonToolGuard } = await import("./daemon-git-worktree-guard-O2UTNFJC.js");
5579
+ const { createDaemonToolGuard } = await import("./daemon-git-worktree-guard-3AWINPPX.js");
5360
5580
  const daemonToolGuardHandler = createDaemonToolGuard(
5361
5581
  externalToolGuardHandler
5362
5582
  );
@@ -5392,7 +5612,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5392
5612
  );
5393
5613
  if (!opts.allowOrigins || opts.allowOrigins.length === 0) {
5394
5614
  writeStderrLine(
5395
- "qwen serve: without --allow-origin the Web Shell is read-only on a non-loopback bind \u2014 same-origin POSTs are blocked by CORS (403). Pass --allow-origin <origin> or front it with a same-origin proxy."
5615
+ "qwen serve: same-origin Web Shell HTTP requests work without --allow-origin, but WebSocket-backed features (terminal, voice) and browsers reaching the daemon through a TLS-terminating proxy still need --allow-origin <origin>. A plain-HTTP intermediary that rewrites the Host header (nginx default proxy_set_header, k8s Ingress) needs --allow-origin <origin> for the origin the browser sees, unless it forwards Host verbatim; port translation alone (ssh -L, docker -p) is fine."
5396
5616
  );
5397
5617
  }
5398
5618
  }
@@ -5707,7 +5927,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5707
5927
  loadCoreRuntime(),
5708
5928
  loadSettingsRuntimeModules(),
5709
5929
  cliVersionPromise,
5710
- import("./daemon-trust-policy-VNP76VMO.js")
5930
+ import("./daemon-trust-policy-6YQOC7B6.js")
5711
5931
  ]);
5712
5932
  getWorkspaceRuntimeCoordinatorIfSupported = runtime.getWorkspaceRuntimeCoordinatorIfSupported;
5713
5933
  cliVersion = resolvedCliVersion;
@@ -6115,7 +6335,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6115
6335
  }), "persistDisabledToolsFn");
6116
6336
  const persistDisabledSkillsFn = /* @__PURE__ */ __name((workspace, skillName, enabled, assertGenerationOpen) => withSettingsLock(workspace, async () => {
6117
6337
  assertGenerationOpen?.();
6118
- const { skillSettingStrings, updateWorkspaceSkillSettingLists } = await import("./skill-settings-LZR5YRRW.js");
6338
+ const { skillSettingStrings, updateWorkspaceSkillSettingLists } = await import("./skill-settings-JU72PCII.js");
6119
6339
  const fresh = loadSettingsForPersistence(workspace);
6120
6340
  const workspaceDisabled = skillSettingStrings(
6121
6341
  fresh,
@@ -6165,7 +6385,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6165
6385
  }), "persistDisabledSkillsFn");
6166
6386
  const persistDisabledSkillsBatchFn = /* @__PURE__ */ __name((workspace, skillNames, enabled, assertGenerationOpen) => withSettingsLock(workspace, async () => {
6167
6387
  assertGenerationOpen?.();
6168
- const { skillSettingStrings, updateWorkspaceSkillSettingLists } = await import("./skill-settings-LZR5YRRW.js");
6388
+ const { skillSettingStrings, updateWorkspaceSkillSettingLists } = await import("./skill-settings-JU72PCII.js");
6169
6389
  const fresh = loadSettingsForPersistence(workspace);
6170
6390
  const initialDisabled = skillSettingStrings(
6171
6391
  fresh,
@@ -6256,10 +6476,10 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6256
6476
  }
6257
6477
  }), "persistSettingsFn");
6258
6478
  const [{ createSubSessionLauncher }, scheduledTaskRoutes] = await Promise.all([
6259
- import("./create-sub-session-LLUYAGZN.js"),
6260
- import("./scheduled-tasks-7H5HWHYD.js")
6479
+ import("./create-sub-session-SEK6KCYR.js"),
6480
+ import("./scheduled-tasks-YGERFWLZ.js")
6261
6481
  ]);
6262
- const { sessionAttachmentsRoots } = await import("./session-attachments-root-GQ2TUI3Y.js");
6482
+ const { sessionAttachmentsRoots } = await import("./session-attachments-root-SOZCTQWW.js");
6263
6483
  const createCurrentSessionScheduledTaskHandler = /* @__PURE__ */ __name((workspaceCwd, runtimeBaseDir, getBridge, assertGenerationOpen) => async ({
6264
6484
  callerSessionId,
6265
6485
  cron,
@@ -7100,7 +7320,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7100
7320
  };
7101
7321
  sessionPrRefreshTimer?.dispose();
7102
7322
  const refreshGeneration = ++sessionPrRefreshGeneration;
7103
- void import("./session-pr-refresh-H43LULTE.js").then((mod) => {
7323
+ void import("./session-pr-refresh-F7XUBQBH.js").then((mod) => {
7104
7324
  if (refreshGeneration !== sessionPrRefreshGeneration) return;
7105
7325
  sessionPrRefreshTimer = mod.startSessionPrRefreshTimer({
7106
7326
  workspaceRegistry,
@@ -7770,8 +7990,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7770
7990
  { createChannelManagementService },
7771
7991
  { WorkspaceChannelSettingsStore }
7772
7992
  ] = await Promise.all([
7773
- import("./channel-management-service-TRTLQTSV.js"),
7774
- import("./channel-settings-store-R5STFWUW.js")
7993
+ import("./channel-management-service-E4HTMU7T.js"),
7994
+ import("./channel-settings-store-FZ5VKHQD.js")
7775
7995
  ]);
7776
7996
  return createChannelManagementService({
7777
7997
  workspaceCwd: targetRuntime.workspaceCwd,
@@ -7825,6 +8045,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7825
8045
  throw new Error("Workspace runtime publication validation failed.");
7826
8046
  }, "validateWorkspaceRuntimeForPublication");
7827
8047
  const app2 = runtime.createServeApp(opts, () => actualPort, {
8048
+ maxChannelControlWorkspaces: MAX_CHANNEL_CONTROL_WORKSPACES,
7828
8049
  serveAppLifecycle,
7829
8050
  liveDiscoveryStableBaseDir,
7830
8051
  workspaceRegistry,
@@ -7976,8 +8197,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7976
8197
  { createWorkspaceTrustReconciler },
7977
8198
  { createDaemonTrustPolicyMonitor }
7978
8199
  ] = await Promise.all([
7979
- import("./workspace-trust-reconciler-D5QT7WQB.js"),
7980
- import("./daemon-trust-policy-monitor-TD5O3BZA.js")
8200
+ import("./workspace-trust-reconciler-VZX7G7CZ.js"),
8201
+ import("./daemon-trust-policy-monitor-EN5L23GS.js")
7981
8202
  ]);
7982
8203
  const materializationFor = /* @__PURE__ */ __name((entry, snapshot, decision) => {
7983
8204
  const boundWorkspaces2 = entry.primary && decision.targetTrusted ? runtime.resolveBoundWorkspacesFromIdeEnv(
@@ -8174,7 +8395,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8174
8395
  // through (and start the runtime) exactly like the warm app would.
8175
8396
  // Dynamic import keeps web-shell-static out of the serve fast-path
8176
8397
  // static closure (see the import-boundary guards in fast-path.test.ts).
8177
- isPreAuthRequest: webShellMounted ? (req) => import("./web-shell-static-POZHGGXE.js").then(
8398
+ isPreAuthRequest: webShellMounted ? (req) => import("./web-shell-static-CCN4JZEE.js").then(
8178
8399
  (webShellStatic) => webShellStatic.isPreAuthWebShellRequest(req)
8179
8400
  ) : void 0
8180
8401
  });
@@ -8193,11 +8414,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8193
8414
  `Invalid maxConnections: ${opts.maxConnections}. Must be >= 0 (0 / Infinity = unlimited).`
8194
8415
  );
8195
8416
  }
8196
- const channelValidationSettingsRuntime = opts.channelSelection ? await loadSettingsRuntimeModules() : void 0;
8197
- const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-VNP76VMO.js") : void 0;
8198
- const channelValidationTrustSnapshot = channelValidationTrustPolicy ? await channelValidationTrustPolicy.readDaemonTrustPolicySnapshot() : void 0;
8417
+ let channelValidationSettingsRuntime;
8418
+ let channelValidationTrustPolicy;
8419
+ let channelValidationTrustSnapshot;
8199
8420
  const resolveChannelWorkspaceGroupsAtListen = /* @__PURE__ */ __name(() => {
8200
- if (!opts.channelSelection || !channelValidationSettingsRuntime || !channelRuntime) {
8421
+ const validationSettingsRuntime = channelValidationSettingsRuntime;
8422
+ if (!opts.channelSelection || !validationSettingsRuntime || !channelRuntime) {
8201
8423
  return void 0;
8202
8424
  }
8203
8425
  const registry = (runtimeApp ?? runtimeAppForCleanup)?.locals?.["workspaceRegistry"];
@@ -8237,15 +8459,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8237
8459
  { code: "untrusted_workspace" }
8238
8460
  );
8239
8461
  }
8240
- const effectiveEnv = runtime ? workspaceRuntimeEffectiveEnv(runtime, daemonRuntimeBaseEnv) : channelValidationSettingsRuntime.environment.buildRuntimeEnvironment(
8241
- channelValidationSettingsRuntime.settings.loadSettings(
8242
- workspace.cwd,
8243
- {
8244
- skipLoadEnvironment: true,
8245
- skipWorkspaceSettings: false,
8246
- workspaceTrusted: true
8247
- }
8248
- ).merged,
8462
+ const effectiveEnv = runtime ? workspaceRuntimeEffectiveEnv(runtime, daemonRuntimeBaseEnv) : validationSettingsRuntime.environment.buildRuntimeEnvironment(
8463
+ validationSettingsRuntime.settings.loadSettings(workspace.cwd, {
8464
+ skipLoadEnvironment: true,
8465
+ skipWorkspaceSettings: false,
8466
+ workspaceTrusted: true
8467
+ }).merged,
8249
8468
  workspace.cwd,
8250
8469
  daemonRuntimeBaseEnv,
8251
8470
  trusted
@@ -8256,7 +8475,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8256
8475
  const workspaces = workspaceInputs.map((workspace, index) => {
8257
8476
  const runtime = resolveRuntime(workspace.cwd);
8258
8477
  const trusted = resolveTrusted(workspace.cwd, index === 0, runtime);
8259
- const settings = channelValidationSettingsRuntime.settings.loadSettings(
8478
+ const settings = validationSettingsRuntime.settings.loadSettings(
8260
8479
  workspace.cwd,
8261
8480
  {
8262
8481
  skipLoadEnvironment: true,
@@ -8267,7 +8486,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8267
8486
  settingsByWorkspace.set(workspace.cwd, settings);
8268
8487
  channelWebhookEnvByWorkspace.set(
8269
8488
  workspace.cwd,
8270
- runtime ? workspaceRuntimeEffectiveEnv(runtime, daemonRuntimeBaseEnv) : channelValidationSettingsRuntime.environment.buildRuntimeEnvironment(
8489
+ runtime ? workspaceRuntimeEffectiveEnv(runtime, daemonRuntimeBaseEnv) : validationSettingsRuntime.environment.buildRuntimeEnvironment(
8271
8490
  settings.merged,
8272
8491
  workspace.cwd,
8273
8492
  daemonRuntimeBaseEnv,
@@ -8298,7 +8517,23 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8298
8517
  return grouping.groups;
8299
8518
  }, "resolveChannelWorkspaceGroupsAtListen");
8300
8519
  if (opts.channelSelection) {
8301
- reserveChannelServicePidfile(opts.channelSelection);
8520
+ try {
8521
+ channelValidationSettingsRuntime = await loadSettingsRuntimeModules();
8522
+ channelValidationTrustPolicy = await import("./daemon-trust-policy-6YQOC7B6.js");
8523
+ channelValidationTrustSnapshot = await channelValidationTrustPolicy.readDaemonTrustPolicySnapshot();
8524
+ if (opts.channelSelection.mode === "names" && workspaceInputs.length > MAX_CHANNEL_CONTROL_WORKSPACES) {
8525
+ const groups = resolveChannelWorkspaceGroupsAtListen();
8526
+ assertChannelControlWorkspaceCapacity(
8527
+ groups?.map((group) => group.workspaceCwd) ?? []
8528
+ );
8529
+ }
8530
+ reserveChannelServicePidfile(opts.channelSelection);
8531
+ } catch (error) {
8532
+ if (!channelSelectionFromSettings) throw error;
8533
+ removeCurrentServePidfile();
8534
+ opts.channelSelection = void 0;
8535
+ reportConfiguredChannelStartupFailure(error);
8536
+ }
8302
8537
  }
8303
8538
  return await new Promise((resolve3, reject) => {
8304
8539
  let closeHost;
@@ -8665,11 +8900,10 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8665
8900
  const armRuntimeStartupTimer = /* @__PURE__ */ __name(() => {
8666
8901
  if (runtimeStartupTimeoutMs <= 0 || runtimeStartupTimer) return;
8667
8902
  runtimeStartupTimer = setTimeout(() => {
8668
- void failRuntimeStartup(
8669
- new Error(
8670
- `Daemon runtime startup timed out after ${runtimeStartupTimeoutMs}ms.`
8671
- )
8903
+ const timeoutError = new Error(
8904
+ `Daemon runtime startup timed out after ${runtimeStartupTimeoutMs}ms.`
8672
8905
  );
8906
+ void failRuntimeStartup(timeoutError);
8673
8907
  }, runtimeStartupTimeoutMs);
8674
8908
  runtimeStartupTimer.unref();
8675
8909
  }, "armRuntimeStartupTimer");
@@ -8749,8 +8983,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8749
8983
  const workerDaemonUrl = formatChannelWorkerDaemonUrl(
8750
8984
  workerHostname,
8751
8985
  actualPort,
8752
- tlsOptions !== void 0,
8753
- typeof addr === "object" && addr && (addr.family === "IPv4" || addr.family === "IPv6") ? addr.family : void 0
8986
+ tlsOptions !== void 0
8754
8987
  );
8755
8988
  (deps.channelWorkerUrlCertifier ?? assertChannelWorkerDaemonUrlIsLocal)(workerDaemonUrl, workerHostname);
8756
8989
  if (tlsOptions && tlsCertPath && process.env["NODE_TLS_REJECT_UNAUTHORIZED"] === "0") {
@@ -8897,8 +9130,32 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8897
9130
  acpHandle?.attachServer?.(server);
8898
9131
  if (opts.channelSelection) {
8899
9132
  closeServerAfterChannelWorkerStartupFailure = true;
8900
- const manager = await ensureChannelWorkerManager();
8901
- await manager.startInitial(opts.channelSelection);
9133
+ let manager;
9134
+ try {
9135
+ manager = await ensureChannelWorkerManager();
9136
+ await manager.startInitial(opts.channelSelection);
9137
+ } catch (error2) {
9138
+ if (!channelSelectionFromSettings || runtimeStartupSettled) {
9139
+ throw error2;
9140
+ }
9141
+ closeServerAfterChannelWorkerStartupFailure = false;
9142
+ opts.channelSelection = void 0;
9143
+ reportConfiguredChannelStartupFailure(error2);
9144
+ try {
9145
+ if (manager) {
9146
+ await manager.stopSelection();
9147
+ } else {
9148
+ removeCurrentServePidfile();
9149
+ if (channelPidfileReserved) {
9150
+ throw new Error(
9151
+ "Failed to release the channel service lease."
9152
+ );
9153
+ }
9154
+ }
9155
+ } catch (cleanupError) {
9156
+ reportConfiguredChannelStartupFailure(cleanupError);
9157
+ }
9158
+ }
8902
9159
  if (runtimeStartupSettled) return;
8903
9160
  }
8904
9161
  if (runtimeStartupSettled) return;
@@ -8908,7 +9165,45 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8908
9165
  clearRuntimeStartupTimer();
8909
9166
  markRuntimeReady();
8910
9167
  }, "completeRuntimeStartup");
8911
- const startBridgePreheat = /* @__PURE__ */ __name((bridge) => {
9168
+ const scheduleWorkspaceMcpDiscoveryAfterPreheat = /* @__PURE__ */ __name((app2) => {
9169
+ if (runtimeStartupError !== void 0) {
9170
+ daemonLog.info(
9171
+ "workspace runtime ensure after preheat skipped: runtime startup failed"
9172
+ );
9173
+ return;
9174
+ }
9175
+ if (shuttingDown) {
9176
+ daemonLog.info(
9177
+ "workspace runtime ensure after preheat skipped: shutting down"
9178
+ );
9179
+ return;
9180
+ }
9181
+ const registry = app2.locals?.["workspaceRegistry"];
9182
+ const primaryEntry = registry?.primaryEntry;
9183
+ const runtime = primaryEntry?.state === "active" ? primaryEntry.current?.runtime : void 0;
9184
+ if (!runtime) {
9185
+ daemonLog.info(
9186
+ "workspace runtime ensure after preheat skipped: no primary runtime"
9187
+ );
9188
+ return;
9189
+ }
9190
+ const coordinator = getWorkspaceRuntimeCoordinatorIfSupported?.(runtime);
9191
+ if (!coordinator) {
9192
+ daemonLog.info(
9193
+ "workspace runtime ensure after preheat skipped: workspace runtime lifecycle is not supported"
9194
+ );
9195
+ return;
9196
+ }
9197
+ void coordinator.ensure({ keepAliveMs: ENSURE_KEEP_ALIVE_MS }).catch((err) => {
9198
+ if (shuttingDown || runtimeStartupError !== void 0) {
9199
+ return;
9200
+ }
9201
+ daemonLog.warn(
9202
+ `workspace runtime ensure after preheat failed: ${deepestErrorMessage(err)}`
9203
+ );
9204
+ });
9205
+ }, "scheduleWorkspaceMcpDiscoveryAfterPreheat");
9206
+ const startBridgePreheat = /* @__PURE__ */ __name((bridge, app2) => {
8912
9207
  startup.preheat.status = "running";
8913
9208
  const preheatStartedAt = performance2.now();
8914
9209
  bridge.preheat().then(() => {
@@ -8916,6 +9211,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8916
9211
  startup.preheat.durationMs = Math.round(
8917
9212
  performance2.now() - preheatStartedAt
8918
9213
  );
9214
+ scheduleWorkspaceMcpDiscoveryAfterPreheat(app2);
8919
9215
  }).catch((err) => {
8920
9216
  const message = err instanceof Error ? err.message : String(err);
8921
9217
  startup.preheat.status = "failed";
@@ -8949,7 +9245,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8949
9245
  return;
8950
9246
  }
8951
9247
  if (shouldPreheat && runtime.bridge) {
8952
- startBridgePreheat(runtime.bridge);
9248
+ startBridgePreheat(runtime.bridge, runtime.app);
8953
9249
  }
8954
9250
  await completeRuntimeStartup(runtime.app);
8955
9251
  }).catch((err) => failRuntimeStartup(err));
@@ -9266,14 +9562,19 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
9266
9562
  } catch (err) {
9267
9563
  removeCurrentServePidfile();
9268
9564
  const error2 = err instanceof Error ? err : new Error(String(err));
9269
- markServeAppStartupFailed(error2);
9270
- void serveAppLifecycle.close().then(
9271
- () => reject(error2),
9272
- (closeError) => reject(
9273
- closeError instanceof Error ? new AggregateError([error2, closeError], error2.message) : error2
9274
- )
9275
- );
9276
- return;
9565
+ if (channelSelectionFromSettings) {
9566
+ opts.channelSelection = void 0;
9567
+ reportConfiguredChannelStartupFailure(error2);
9568
+ } else {
9569
+ markServeAppStartupFailed(error2);
9570
+ void serveAppLifecycle.close().then(
9571
+ () => reject(error2),
9572
+ (closeError) => reject(
9573
+ closeError instanceof Error ? new AggregateError([error2, closeError], error2.message) : error2
9574
+ )
9575
+ );
9576
+ return;
9577
+ }
9277
9578
  }
9278
9579
  if (channelWorkspaceGroups) {
9279
9580
  for (const group of channelWorkspaceGroups) {
@@ -9284,13 +9585,25 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
9284
9585
  }
9285
9586
  if (opts.channelSelection?.mode === "all") {
9286
9587
  writeStderrLine(
9287
- "qwen serve: --channel all is primary-workspace only; non-primary workspace channels are not hosted."
9588
+ channelSelectionFromSettings ? 'qwen serve: workspace serve.channels selection "all" is primary-workspace only; non-primary workspace channels are not hosted.' : "qwen serve: --channel all is primary-workspace only; non-primary workspace channels are not hosted."
9288
9589
  );
9289
9590
  }
9290
9591
  }
9291
9592
  writeStdoutLine(
9292
9593
  `qwen serve listening on ${url} (mode=${opts.mode}, workspace=${boundWorkspace})`
9293
9594
  );
9595
+ const boundAddress = typeof addr === "object" && addr ? addr.address : opts.hostname;
9596
+ if (token) {
9597
+ void printRemoteQuickstart({
9598
+ bind: opts.hostname,
9599
+ boundAddress,
9600
+ port: actualPort,
9601
+ tls: Boolean(tlsOptions),
9602
+ token,
9603
+ generated: generatedToken,
9604
+ web: webShellMounted
9605
+ });
9606
+ }
9294
9607
  writeStderrLine(
9295
9608
  `qwen serve: bound to workspace ${JSON.stringify(boundWorkspace)}`
9296
9609
  );
@@ -9320,9 +9633,10 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
9320
9633
  });
9321
9634
  const preparedRuntimeApp = runtimeApp ?? runtimeAppForCleanup;
9322
9635
  if (preparedRuntimeApp && bridgeRef && deps.bridge) {
9636
+ runtimeApp ??= preparedRuntimeApp;
9323
9637
  attachLiveDiscoveryControl(preparedRuntimeApp);
9324
9638
  if (shouldPreheat) {
9325
- startBridgePreheat(bridgeRef);
9639
+ startBridgePreheat(bridgeRef, preparedRuntimeApp);
9326
9640
  }
9327
9641
  if (opts.channelSelection && !runtimeStartupSettled) {
9328
9642
  armRuntimeStartupTimer();
@@ -9334,6 +9648,11 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
9334
9648
  acpHandle?.attachServer?.(server);
9335
9649
  markServeAppStartupReady();
9336
9650
  void publishLiveDiscovery(preparedRuntimeApp);
9651
+ if (!runtimeStartupSettled) {
9652
+ runtimeStartupSettled = true;
9653
+ clearRuntimeStartupTimer();
9654
+ markRuntimeReady();
9655
+ }
9337
9656
  }
9338
9657
  } else if (deferRuntimeUntilFirstHealth) {
9339
9658
  scheduleRuntimeStartFallback();