@qwen-code/qwen-code 0.22.0 → 0.22.2-nightly.20260828.7357136dd1

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 (483) hide show
  1. package/bundled/computer-use/SKILL.md +229 -0
  2. package/bundled/computer-use/agents/openai.yaml +4 -0
  3. package/bundled/coordinate/SKILL.md +5 -5
  4. package/bundled/goal-draft/SKILL.md +109 -0
  5. package/bundled/qc-helper/docs/configuration/auth.md +7 -7
  6. package/bundled/qc-helper/docs/configuration/model-providers.md +70 -9
  7. package/bundled/qc-helper/docs/configuration/settings.md +48 -48
  8. package/bundled/qc-helper/docs/extension/introduction.md +3 -1
  9. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  10. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  11. package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -0
  12. package/bundled/qc-helper/docs/features/channels/dws.md +120 -0
  13. package/bundled/qc-helper/docs/features/channels/overview.md +37 -6
  14. package/bundled/qc-helper/docs/features/code-review.md +27 -23
  15. package/bundled/qc-helper/docs/features/commands.md +4 -3
  16. package/bundled/qc-helper/docs/features/computer-use.md +57 -51
  17. package/bundled/qc-helper/docs/features/goals.md +58 -0
  18. package/bundled/qc-helper/docs/features/headless.md +13 -11
  19. package/bundled/qc-helper/docs/features/mcp.md +35 -12
  20. package/bundled/qc-helper/docs/features/status-line.md +3 -3
  21. package/bundled/qc-helper/docs/features/sub-agents.md +1 -1
  22. package/bundled/qc-helper/docs/features/worktree.md +1 -1
  23. package/bundled/qc-helper/docs/overview.md +1 -1
  24. package/bundled/qc-helper/docs/quickstart.md +1 -1
  25. package/bundled/qc-helper/docs/qwen-serve.md +29 -6
  26. package/bundled/review/SKILL.md +185 -435
  27. package/bundled/review/references/aone.md +18 -0
  28. package/bundled/review/references/persistence.md +109 -0
  29. package/bundled/review/references/posting.md +272 -0
  30. package/chunks/MaxSizedBox-LMWXCLDV.js +110 -0
  31. package/chunks/{StandaloneSessionPicker-KTHPCSR6.js → StandaloneSessionPicker-W3F7U3JL.js} +87 -88
  32. package/chunks/{acp-startup-profiler-T4GEAPLX.js → acp-startup-profiler-GNYAL6LI.js} +2 -2
  33. package/chunks/{acpAgent-CRY3JZ5O.js → acpAgent-EYZ6EEHD.js} +3223 -2145
  34. package/chunks/agent-RBLGBY65.js +95 -0
  35. package/chunks/agent-headless-L5T4Y4OZ.js +85 -0
  36. package/chunks/{anthropicContentGenerator-Y2OX6LS4.js → anthropicContentGenerator-GMHML35Q.js} +128 -59
  37. package/chunks/{artifact-tool-SBXMTVCB.js → artifact-tool-XSMPHZBT.js} +11 -3
  38. package/chunks/{askUserQuestion-KEQJRFD6.js → askUserQuestion-4SWJY65V.js} +2 -2
  39. package/chunks/bridge-5LR2F2ND.js +119 -0
  40. package/chunks/{ca-D3F4S6NG.js → ca-7HPYOYSZ.js} +3 -0
  41. package/chunks/{channel-management-service-IRTT7RNE.js → channel-management-service-KHR3N6CH.js} +6 -6
  42. package/chunks/channel-settings-store-4FOAZW72.js +120 -0
  43. package/chunks/{channel-worker-group-BJNMR2MP.js → channel-worker-group-6NA6BBZV.js} +9 -7
  44. package/chunks/{channel-worker-manager-EMA7CQDJ.js → channel-worker-manager-NEZ2J6RK.js} +11 -8
  45. package/chunks/{channel-worker-supervisor-F6I6WSWW.js → channel-worker-supervisor-FKU7DIHJ.js} +12 -6
  46. package/chunks/{chunk-HDKCKCYO.js → chunk-23RFD54N.js} +1 -1
  47. package/chunks/{read-package-up-UXSW3YPB.js → chunk-2EAZ43JQ.js} +1 -0
  48. package/chunks/{chunk-KM73TBQ4.js → chunk-2LD5U7Q3.js} +31 -0
  49. package/chunks/{chunk-GIWB5QLV.js → chunk-2SXSLSQE.js} +4 -4
  50. package/chunks/chunk-2TNL5KPM.js +49 -0
  51. package/chunks/chunk-335CJSNF.js +2320 -0
  52. package/chunks/chunk-36LGBEM6.js +130 -0
  53. package/chunks/{chunk-O5BDEWBC.js → chunk-3JXM2CVW.js} +3 -3
  54. package/chunks/{chunk-2E3V7G6Y.js → chunk-3K6TUZHS.js} +55 -50
  55. package/chunks/{chunk-WWUSHZ7M.js → chunk-3OOXT6CR.js} +5 -5
  56. package/chunks/{chunk-2UZJWSVD.js → chunk-3WK3QDNV.js} +2 -2
  57. package/chunks/{chunk-4J7OPYNS.js → chunk-3XOKEVII.js} +6 -6
  58. package/chunks/chunk-3Y34Q3JV.js +1584 -0
  59. package/chunks/{chunk-YMVFIYHV.js → chunk-42IDLQWS.js} +26 -20
  60. package/chunks/{chunk-7HFULI45.js → chunk-454XFGH4.js} +3 -3
  61. package/chunks/chunk-4CMJKUND.js +95 -0
  62. package/chunks/{chunk-XLDFW44M.js → chunk-4K7KNVWH.js} +3 -3
  63. package/chunks/{chunk-YDJRMQU4.js → chunk-4QHPPXK2.js} +16 -8
  64. package/chunks/{chunk-7KOFLDEP.js → chunk-5JTIYALA.js} +1 -1
  65. package/chunks/{chunk-CXJHQVEK.js → chunk-5PA6UEYA.js} +4 -0
  66. package/chunks/{chunk-7NBVNAJJ.js → chunk-62GQFYID.js} +3 -3
  67. package/chunks/{chunk-JGUBDRBC.js → chunk-6DIGWMGT.js} +3 -3
  68. package/chunks/{chunk-X7V3N6YH.js → chunk-6JCGO55P.js} +885 -3380
  69. package/chunks/{chunk-HIK2OF33.js → chunk-6PJOTWAN.js} +1 -1
  70. package/chunks/{chunk-VUMLT7E5.js → chunk-6W2IK5KC.js} +956 -17
  71. package/chunks/{chunk-S4C4JJKE.js → chunk-6ZZBRRKQ.js} +5 -5
  72. package/chunks/{chunk-W4CRPSC5.js → chunk-7EQQR46F.js} +1 -1
  73. package/chunks/{chunk-PHJJ3RVO.js → chunk-7GWQW5ID.js} +7 -15
  74. package/chunks/chunk-7J6OTNGO.js +424 -0
  75. package/chunks/{chunk-URN2JIAQ.js → chunk-7TUBJBBJ.js} +5 -1
  76. package/chunks/{chunk-A5F63FEW.js → chunk-7VD6IPQM.js} +1 -1
  77. package/chunks/{chunk-36OF5PRW.js → chunk-ABS25QER.js} +7 -3
  78. package/chunks/{chunk-UU4WC7DK.js → chunk-AJGR6E6Z.js} +117 -30
  79. package/chunks/{chunk-MQP3MHWN.js → chunk-AU3MMVJF.js} +43 -20
  80. package/chunks/{chunk-ZS5BHEPD.js → chunk-AXC26UCQ.js} +1 -1
  81. package/chunks/{chunk-PDL6LKB5.js → chunk-AY3BNYEQ.js} +1 -1
  82. package/chunks/{chunk-O5Z7EB6Y.js → chunk-AYHQZBJ4.js} +170 -207
  83. package/chunks/{chunk-WRT324N6.js → chunk-B466ZSHZ.js} +3 -3
  84. package/chunks/{chunk-5XHAOUWD.js → chunk-B5OUL5EL.js} +3 -3
  85. package/chunks/{chunk-GAHYKJPV.js → chunk-B5PHIJGI.js} +186 -60
  86. package/chunks/{chunk-IBJ5S45N.js → chunk-B7CDU2SL.js} +2 -2
  87. package/chunks/{chunk-UZPYR3EV.js → chunk-BFPESSTR.js} +1 -1
  88. package/chunks/{chunk-43T5WDQ7.js → chunk-BFSFJR3D.js} +1 -1
  89. package/chunks/{chunk-IWOWEENB.js → chunk-BKWNKLZB.js} +404 -44
  90. package/chunks/{chunk-3CLIDIVQ.js → chunk-BOWFGCEU.js} +3 -3
  91. package/chunks/{chunk-BB5IMQCV.js → chunk-BPAKYXQ3.js} +2 -2
  92. package/chunks/{chunk-ZRYQMWEP.js → chunk-BWORX6FA.js} +2 -2
  93. package/chunks/{chunk-AP3B7LKD.js → chunk-BXDAPVQU.js} +2 -2
  94. package/chunks/{chunk-NUGZAFR2.js → chunk-C2X7KY45.js} +147 -6
  95. package/chunks/{chunk-MZKWFWVG.js → chunk-C3KURPP7.js} +6 -6
  96. package/chunks/{chunk-WZDM44SB.js → chunk-CAJTKR6W.js} +7 -7
  97. package/chunks/{chunk-DB2OKNTU.js → chunk-CFJY4DGX.js} +2 -2
  98. package/chunks/{chunk-QKBYFU2Q.js → chunk-CFKIH3D3.js} +21 -1
  99. package/chunks/{chunk-I432KXWD.js → chunk-CMHFCLBU.js} +1 -1
  100. package/chunks/{create-sub-session-XBCVGNFU.js → chunk-CQH5KTKC.js} +4 -6
  101. package/chunks/{chunk-5HJUPACR.js → chunk-CRKKHXTI.js} +185 -174
  102. package/chunks/{chunk-L4HVF7LM.js → chunk-CYAUBK46.js} +3 -3
  103. package/chunks/{chunk-AZF6SME3.js → chunk-D5LUXLUH.js} +3 -3
  104. package/chunks/{chunk-RPJQ3O4M.js → chunk-DFDWJE6Z.js} +60 -53
  105. package/chunks/{chunk-KSPRQSB4.js → chunk-DIMEPKCW.js} +52 -12
  106. package/chunks/chunk-DJBQCO2E.js +842 -0
  107. package/chunks/{chunk-OVH5Y7KS.js → chunk-DP4MWIM3.js} +19 -3
  108. package/chunks/{chunk-LI4YHTQK.js → chunk-DYXFD5RO.js} +182 -3
  109. package/chunks/{chunk-NW35NVFN.js → chunk-E3XVSVKK.js} +26 -4
  110. package/chunks/{chunk-VSNPOSDN.js → chunk-EB6QRGHM.js} +108 -13
  111. package/chunks/{chunk-FVBVJEBG.js → chunk-EKNBU2X7.js} +10 -8
  112. package/chunks/{chunk-DJEHYM4H.js → chunk-EKSCLBBF.js} +3 -3
  113. package/chunks/{chunk-624NHDGB.js → chunk-ERFDKH32.js} +11 -0
  114. package/chunks/chunk-EW5VVLJT.js +3525 -0
  115. package/chunks/{chunk-T6XLJRQY.js → chunk-EWIQ3NAE.js} +38774 -6955
  116. package/chunks/{chunk-4XPSVIED.js → chunk-FALBWZF4.js} +6 -6
  117. package/chunks/chunk-FBX2SDQ4.js +48 -0
  118. package/chunks/{chunk-VMJL7RH6.js → chunk-FEHMA4RO.js} +539 -651
  119. package/chunks/{chunk-PXOJLJ5W.js → chunk-FMFBLTLY.js} +606 -223
  120. package/chunks/{chunk-ZLCT4C5A.js → chunk-FTF2YIZ5.js} +1 -1
  121. package/chunks/{chunk-IOSEW6KP.js → chunk-G6FECKTJ.js} +9 -6
  122. package/chunks/{chunk-RDG44S5I.js → chunk-GGNE3JAW.js} +2 -2
  123. package/chunks/chunk-GYTKQYDB.js +23 -0
  124. package/chunks/{chunk-B6UBOIFE.js → chunk-H33EQVMG.js} +14 -11
  125. package/chunks/chunk-H72BQNM3.js +645 -0
  126. package/chunks/{chunk-YZBDKFRQ.js → chunk-HGIMWQVT.js} +995 -892
  127. package/chunks/chunk-HOCJDUFY.js +20 -0
  128. package/chunks/{chunk-6UQSU7CQ.js → chunk-HPXV655A.js} +60 -107
  129. package/chunks/{chunk-45NQKMYB.js → chunk-HVC3PNVC.js} +1 -1
  130. package/chunks/{chunk-QJHPWLZC.js → chunk-HYDJDQGJ.js} +1 -1
  131. package/chunks/{chunk-7DMTAQJ6.js → chunk-IB7FQJRY.js} +163 -57
  132. package/chunks/{chunk-AW27A43Y.js → chunk-ICURCKIU.js} +1428 -120
  133. package/chunks/{chunk-4F5WV4RF.js → chunk-ISKH4QX3.js} +288 -15
  134. package/chunks/{chunk-SE55HQGF.js → chunk-J6S24ZJE.js} +92 -70
  135. package/chunks/{chunk-7DYNJFES.js → chunk-JB4JIVTJ.js} +6 -1
  136. package/chunks/{chunk-OARZJFZX.js → chunk-JN4IWWMN.js} +4 -4
  137. package/chunks/{chunk-6PCOVQO2.js → chunk-JUUBLSZU.js} +8 -8
  138. package/chunks/{chunk-FEMQ6Y7W.js → chunk-JWALNCLT.js} +47 -126
  139. package/chunks/{chunk-TBVSALA3.js → chunk-K5KXUXWC.js} +3 -3
  140. package/chunks/{chunk-XYQHT3AW.js → chunk-KTJFDCX4.js} +2 -2
  141. package/chunks/{chunk-6FRJEE2S.js → chunk-LEFCFTEX.js} +6 -6
  142. package/chunks/{chunk-BUGYW6FB.js → chunk-LEGTMYAE.js} +1 -1
  143. package/chunks/{chunk-MPHLIJYL.js → chunk-LLZA2IK3.js} +20 -8
  144. package/chunks/{chunk-BEGIBJAZ.js → chunk-LNETQKBE.js} +4 -4
  145. package/chunks/{chunk-KVGR4MCF.js → chunk-LUEHOUHM.js} +3 -3
  146. package/chunks/{chunk-2A4C2MEG.js → chunk-LVPZO674.js} +35 -12
  147. package/chunks/{chunk-25NESM4G.js → chunk-M4ORUPYI.js} +29 -5
  148. package/chunks/{chunk-VFACN2CE.js → chunk-M6FOJXW3.js} +1 -1
  149. package/chunks/{chunk-FYZMB6DB.js → chunk-MAYHGRP4.js} +12 -12
  150. package/chunks/{chunk-K3LPAED5.js → chunk-MQM5PJML.js} +24 -4
  151. package/chunks/{chunk-ZRFUT5VV.js → chunk-MTJN7FOT.js} +7 -7
  152. package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
  153. package/chunks/{chunk-2TRNCJK4.js → chunk-NIFYWDYN.js} +1 -1
  154. package/chunks/{chunk-SQS55KR4.js → chunk-NU7RKEZR.js} +2 -2
  155. package/chunks/{chunk-U2UYQMM6.js → chunk-NXMBRVMQ.js} +3 -3
  156. package/chunks/chunk-OI4NY7RA.js +346 -0
  157. package/chunks/{chunk-LURJYO2T.js → chunk-OZ6KS6KW.js} +4 -0
  158. package/chunks/{chunk-K52PZNU4.js → chunk-PDQGMSZK.js} +2 -2
  159. package/chunks/{chunk-PZRUV52H.js → chunk-PPKZ7JOE.js} +20 -2
  160. package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
  161. package/chunks/{chunk-AO4M6NMD.js → chunk-PWIGAMA4.js} +146 -27
  162. package/chunks/{chunk-S3G6YFQC.js → chunk-QFCDF5PL.js} +1 -1
  163. package/chunks/chunk-QHMLYMMS.js +32 -0
  164. package/chunks/{chunk-5XUTPXQU.js → chunk-QPTRRPZU.js} +47 -13
  165. package/chunks/{chunk-UUQFJILB.js → chunk-RFI4YGMR.js} +34 -267
  166. package/chunks/{chunk-A6NRNRKE.js → chunk-RFIDDFAL.js} +1 -1
  167. package/chunks/chunk-RKFGE7JH.js +93 -0
  168. package/chunks/chunk-RNVFRIOO.js +275 -0
  169. package/chunks/{chunk-WU5E4HMO.js → chunk-RU7BK6B3.js} +1 -1
  170. package/chunks/{chunk-J5ZDDUKM.js → chunk-RVXDXY6I.js} +4 -4
  171. package/chunks/{chunk-OE52YHCZ.js → chunk-RWZB422L.js} +11 -11
  172. package/chunks/chunk-RXFQM6FQ.js +42 -0
  173. package/chunks/{chunk-MHG6NDS6.js → chunk-RYNZQGXN.js} +19 -2
  174. package/chunks/{chunk-4CWDWDL6.js → chunk-SJ5ERAW3.js} +1 -1
  175. package/chunks/{chunk-Q54XG7IX.js → chunk-SMPR7SPO.js} +1 -1
  176. package/chunks/{chunk-UIRLQ3N7.js → chunk-SRZZY4IY.js} +3 -3
  177. package/chunks/{chunk-ND7NOI4P.js → chunk-STUJ7IMZ.js} +0 -92
  178. package/chunks/{chunk-VYC7XFYV.js → chunk-SUX7HDNA.js} +5 -5
  179. package/chunks/{chunk-ZZUVC6RI.js → chunk-SVNO44PF.js} +3 -3
  180. package/chunks/{chunk-FDD2IUEL.js → chunk-SZLBBZH4.js} +370 -35
  181. package/chunks/{chunk-GHY5OIYP.js → chunk-T2NKRHZZ.js} +13 -13
  182. package/chunks/chunk-T4EFG2P5.js +113 -0
  183. package/chunks/{chunk-BMCSKS37.js → chunk-TLHUNMO7.js} +6 -6
  184. package/chunks/{chunk-JOLJTKIG.js → chunk-TPI7O7HR.js} +1 -1
  185. package/chunks/{chunk-6QSA4JHL.js → chunk-TQHGJYR3.js} +4492 -1121
  186. package/chunks/{chunk-ISJMN3ML.js → chunk-TTX2JUE6.js} +1 -1
  187. package/chunks/{chunk-EFB657PR.js → chunk-TW3E6YNO.js} +3 -3
  188. package/chunks/{chunk-LD5VIJ7S.js → chunk-TWSKM647.js} +1 -1
  189. package/chunks/chunk-U54AYGEC.js +337 -0
  190. package/chunks/{chunk-A5F2YNO6.js → chunk-UHQFIS7N.js} +260 -10
  191. package/chunks/{chunk-6NFAEG54.js → chunk-UTLCH2FK.js} +24 -13
  192. package/chunks/{chunk-7JBHIQS2.js → chunk-UY3PBNY3.js} +19 -37
  193. package/chunks/{chunk-DWCKACFL.js → chunk-V2NDP3I4.js} +2 -2
  194. package/chunks/{chunk-2GXYDNXP.js → chunk-V2QDDC5J.js} +19 -9
  195. package/chunks/{chunk-VLRBJ24J.js → chunk-V5J4J5TP.js} +2 -2
  196. package/chunks/{chunk-X2UOOG5V.js → chunk-VQUGEVGR.js} +1 -1
  197. package/chunks/{chunk-RDQ7QB4Y.js → chunk-VTHREBQM.js} +2 -2
  198. package/chunks/{chunk-YLFLHKDL.js → chunk-W3N5XAZ6.js} +1 -1
  199. package/chunks/{chunk-62JOGZL5.js → chunk-W6DUQ5GA.js} +11497 -10502
  200. package/chunks/{chunk-P47E4SJC.js → chunk-WALC5VJH.js} +4 -4
  201. package/chunks/{chunk-3ZFJUBTP.js → chunk-WAOIHTJS.js} +1 -1
  202. package/chunks/{chunk-KIVGVFMM.js → chunk-WBHKK3CU.js} +16 -4
  203. package/chunks/{chunk-XZJKSETB.js → chunk-WXEA74YB.js} +3 -3
  204. package/chunks/{chunk-VEND4KA4.js → chunk-X3ZRTCJD.js} +1 -1
  205. package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
  206. package/chunks/{chunk-XL5K4SVK.js → chunk-XF63PKEN.js} +1 -1
  207. package/chunks/{chunk-LDGWX737.js → chunk-XLLQJRAH.js} +323 -510
  208. package/chunks/{chunk-2Z6LSQMF.js → chunk-XQFT3QUF.js} +1 -1
  209. package/chunks/{chunk-P3QQPMQA.js → chunk-XZA32HII.js} +4 -4
  210. package/chunks/{chunk-C72BXMJ5.js → chunk-Y3QL45LS.js} +1 -1
  211. package/chunks/{chunk-QS4ENGVF.js → chunk-Y4TPOUEV.js} +17 -8
  212. package/chunks/{chunk-AVCCKIZ6.js → chunk-YRZX2PHA.js} +1 -1
  213. package/chunks/{chunk-Z3JMO2CH.js → chunk-YTDVNSUQ.js} +1 -1
  214. package/chunks/{chunk-WS7PAXXR.js → chunk-YWQ237GX.js} +15 -199
  215. package/chunks/chunk-ZELCTN6Y.js +29 -0
  216. package/chunks/{chunk-TQOF5KBL.js → chunk-ZEZKIS2K.js} +0 -31
  217. package/chunks/{chunk-IIWGSX4L.js → chunk-ZTP35P4B.js} +1 -1
  218. package/chunks/{chunk-K623ENWT.js → chunk-ZU4UDIWX.js} +23 -1
  219. package/chunks/chunk-ZYNTSXWK.js +32 -0
  220. package/chunks/config-utils-JVGAP34H.js +113 -0
  221. package/chunks/contextCommand-XDB7OSO7.js +106 -0
  222. package/chunks/{core-runtime-CES6JSVV.js → core-runtime-XHYA2RH7.js} +66 -63
  223. package/chunks/create-sub-session-23ITIELI.js +17 -0
  224. package/chunks/{create-sub-session-UJTPMVOG.js → create-sub-session-MHYCFNCM.js} +168 -87
  225. package/chunks/{cron-create-IKA56DAF.js → cron-create-KJ4IY6PP.js} +57 -10
  226. package/chunks/{cron-delete-K5Q62EGH.js → cron-delete-MBLQCAYY.js} +4 -4
  227. package/chunks/{cron-list-QBFGAMP7.js → cron-list-DWH2PQ47.js} +4 -4
  228. package/chunks/{daemon-RZZUPGOJ.js → daemon-K5XS42ID.js} +567 -27
  229. package/chunks/{daemon-git-worktree-guard-3QY2BQYB.js → daemon-git-worktree-guard-V3P5XLHB.js} +339 -95
  230. package/chunks/daemon-status-provider-KKU7ZTLM.js +117 -0
  231. package/chunks/daemon-trust-policy-TZGK34DW.js +112 -0
  232. package/chunks/{daemon-trust-policy-monitor-TK4K7M63.js → daemon-trust-policy-monitor-F23DD2M4.js} +69 -69
  233. package/chunks/{de-RYUHH2C6.js → de-X6HLSIFE.js} +1 -0
  234. package/chunks/deferred-core-runtime-LKLGBCGZ.js +114 -0
  235. package/chunks/{display-image-OEJMJV3S.js → display-image-BE7I6ZB6.js} +5 -5
  236. package/chunks/{dist-5EV2G6MC.js → dist-4WXLCBDR.js} +1 -1
  237. package/chunks/{dist-ES6HNUW2.js → dist-5VXFRTWU.js} +525 -64
  238. package/chunks/{dist-ESS34DHC.js → dist-6BPYWHVD.js} +89 -65
  239. package/chunks/{dist-2OG3PGKO.js → dist-GFN5DCBX.js} +76 -67
  240. package/chunks/{dist-K7IQB53U.js → dist-HZNT6GQS.js} +1 -1
  241. package/chunks/{dist-J6P3C52Z.js → dist-LVZCXVPF.js} +99 -26
  242. package/chunks/{dist-LZO24N3E.js → dist-N6W6E753.js} +71 -64
  243. package/chunks/dist-QDLFKWOL.js +2512 -0
  244. package/chunks/{dist-VVQBOKDH.js → dist-SWQMYP2Q.js} +18 -16
  245. package/chunks/earlyInputCapture-NERYFYTR.js +107 -0
  246. package/chunks/{edit-A2633SLR.js → edit-ACCATIXB.js} +49 -51
  247. package/chunks/{en-3RHLPITS.js → en-YLXBXM4Z.js} +5 -1
  248. package/chunks/{enter-worktree-OIAHE2TB.js → enter-worktree-35QCAAFP.js} +7 -8
  249. package/chunks/{enterPlanMode-SUGIKLR7.js → enterPlanMode-NEN6EPVM.js} +48 -50
  250. package/chunks/environment-CKWHBC5T.js +129 -0
  251. package/chunks/errors-XTZPNQ77.js +113 -0
  252. package/chunks/{exit-worktree-3UT3SSWT.js → exit-worktree-XQD6D543.js} +7 -8
  253. package/chunks/exitPlanMode-CY344X5J.js +83 -0
  254. package/chunks/{fast-path-3AVP3G35.js → fast-path-YSOX4PAM.js} +31 -10
  255. package/chunks/{fast-path-settings-WHX3J3ZI.js → fast-path-settings-XMFBYFUH.js} +2 -2
  256. package/chunks/{fr-4PL5GHG4.js → fr-FTZWF462.js} +1 -0
  257. package/chunks/{gemini-7PVQWHTH.js → gemini-VQY2YCPH.js} +137 -129
  258. package/chunks/{geminiContentGenerator-B2FOJJDJ.js → geminiContentGenerator-PAPXNIGU.js} +16 -13
  259. package/chunks/{glob-7YGXE6OV.js → glob-GVCUSBBF.js} +48 -50
  260. package/chunks/{goal-tools-TLJCE7YZ.js → goal-tools-5STK6OXW.js} +77 -31
  261. package/chunks/{grep-6DV6LTON.js → grep-5GPICQBU.js} +6 -6
  262. package/chunks/handleAutoUpdate-ZJPJN42W.js +109 -0
  263. package/chunks/i18n-BZYKOST7.js +124 -0
  264. package/chunks/{image-gen-7CSCJ73T.js → image-gen-J6FDGUZP.js} +8 -12
  265. package/chunks/initializer-GO2C5HE3.js +113 -0
  266. package/chunks/installationInfo-WM2GXQZ6.js +107 -0
  267. package/chunks/{ja-HZ7X7PQO.js → ja-2GL5FKYJ.js} +1 -0
  268. package/chunks/{keychain-token-storage-MTFTAESK.js → keychain-token-storage-37XPR34V.js} +2 -2
  269. package/chunks/list-ERDJB7PQ.js +116 -0
  270. package/chunks/{list-agents-43XUEXJV.js → list-agents-DI3YFTDT.js} +2 -2
  271. package/chunks/loadedSettingsAdapter-7JOCVOKV.js +110 -0
  272. package/chunks/{loggingContentGenerator-RNE66CKK.js → loggingContentGenerator-3ONLU3BS.js} +327 -39
  273. package/chunks/{loop-wakeup-E54KDUXC.js → loop-wakeup-XJFONSQ7.js} +5 -5
  274. package/chunks/{ls-CGL2UC3H.js → ls-3VAT2J7A.js} +4 -4
  275. package/chunks/{lsp-5IKUO5DX.js → lsp-5W7IRUBH.js} +2 -2
  276. package/chunks/{managed-npm-update-Y3SC3GLJ.js → managed-npm-update-TLRCC2GE.js} +62 -62
  277. package/chunks/mcp-2LH3QXR2.js +110 -0
  278. package/chunks/{monitor-PXYSGSUN.js → monitor-P7LDAL4W.js} +48 -50
  279. package/chunks/nonInteractiveCli-E5T7PZ27.js +184 -0
  280. package/chunks/{notebook-edit-ISIBJVBR.js → notebook-edit-F7KSG4WQ.js} +49 -51
  281. package/chunks/open-with-auth-4UI3KHUR.js +55 -0
  282. package/chunks/{openaiContentGenerator-6TBOPEGT.js → openaiContentGenerator-2EXCZUGN.js} +29 -32
  283. package/chunks/pidfile-P25DWA5Q.js +111 -0
  284. package/chunks/process-registry-OAEG6WGC.js +662 -0
  285. package/chunks/{processUtils-YK2TDTTU.js → processUtils-PVDKBL35.js} +2 -2
  286. package/chunks/prompt-terminal-ledger-AJ7T7OIV.js +105 -0
  287. package/chunks/{pt-QT5N2Q6Q.js → pt-XN2YWJVM.js} +1 -0
  288. package/chunks/{qwenContentGenerator-CLDMA2Y4.js → qwenContentGenerator-TBBRLWIT.js} +54 -62
  289. package/chunks/{qwenOAuth2-DLDR6UC5.js → qwenOAuth2-OF5WRBQT.js} +7 -11
  290. package/chunks/read-file-6IIY4RLJ.js +32 -0
  291. package/chunks/{read-mcp-resource-XYES2B42.js → read-mcp-resource-XD257PGJ.js} +2 -2
  292. package/chunks/read-package-up-6T6ICKR7.js +13 -0
  293. package/chunks/{record-artifact-W3IBTGL7.js → record-artifact-VW23GS4F.js} +4 -5
  294. package/chunks/report-findings-XA3FJG3N.js +33 -0
  295. package/chunks/request-shutdown-BCLA3JV2.js +133 -0
  296. package/chunks/resumeHistoryUtils-44IETXDY.js +118 -0
  297. package/chunks/ripGrep-E7ESZ7SS.js +39 -0
  298. package/chunks/{ru-STMG5BPD.js → ru-OLTMFJEW.js} +1 -0
  299. package/chunks/{run-qwen-serve-XJHOW2NY.js → run-qwen-serve-DXBCYW7V.js} +924 -356
  300. package/chunks/runtime-RUSPD35D.js +148 -0
  301. package/chunks/scheduled-tasks-DVRJZO6I.js +127 -0
  302. package/chunks/scheduler-TDRB2NSY.js +122 -0
  303. package/chunks/{sdk-exporters-http-RSIOP3G2.js → sdk-exporters-http-TTU2CHBU.js} +5 -5
  304. package/chunks/{sdk-impl-CB3KARSK.js → sdk-impl-UUMVYMAL.js} +12 -6
  305. package/chunks/{send-message-J4VT46OI.js → send-message-AJ4OCUBV.js} +24 -29
  306. package/chunks/serve-KITOM7OR.js +118 -0
  307. package/chunks/{server-74ONDK62.js → server-THCOMUC2.js} +5814 -4549
  308. package/chunks/{session-BO6VBWJP.js → session-XKR5MPXE.js} +152 -142
  309. package/chunks/session-pr-refresh-KRBH7KDA.js +278 -0
  310. package/chunks/{settings-35QZNFDG.js → settings-YXZ4XBKK.js} +72 -72
  311. package/chunks/shell-5FJ2DZ3W.js +93 -0
  312. package/chunks/{skill-DKEMQSNJ.js → skill-VMMJZ6CJ.js} +161 -33
  313. package/chunks/skill-settings-7SG4YA2W.js +118 -0
  314. package/chunks/spawnChannel-BPMIXRBI.js +112 -0
  315. package/chunks/standalone-update-QN5HFRIC.js +118 -0
  316. package/chunks/{startInteractiveUI-J2QSGWPU.js → startInteractiveUI-5A7RQFRP.js} +3139 -2438
  317. package/chunks/{syntheticOutput-JAXMIMZP.js → syntheticOutput-ML43GEFN.js} +3 -3
  318. package/chunks/{task-create-I2H322E4.js → task-create-QN4LYRSE.js} +11 -11
  319. package/chunks/{task-list-3OLIWFTQ.js → task-list-JPLGK45U.js} +5 -5
  320. package/chunks/{task-stop-JAUY6MSY.js → task-stop-CXEH5L2D.js} +2 -2
  321. package/chunks/{task-update-B3XO4CPI.js → task-update-IWEOJFV2.js} +11 -11
  322. package/chunks/{team-create-W534PMGX.js → team-create-HVGVUL2L.js} +49 -51
  323. package/chunks/{team-delete-Q7GE7RRI.js → team-delete-RZVVSGCY.js} +5 -5
  324. package/chunks/{team-plan-approval-WNV6P6NG.js → team-plan-approval-S5A5FQWU.js} +48 -50
  325. package/chunks/terminal-image-renderer-SIVPPXDI.js +114 -0
  326. package/chunks/theme-manager-TA33UZZX.js +102 -0
  327. package/chunks/{todoWrite-FJJTY2TI.js → todoWrite-WDJNQEMW.js} +43 -25
  328. package/chunks/{tool-search-Y4KL3LRE.js → tool-search-NX7IPDKP.js} +19 -20
  329. package/chunks/total-session-admission-PWXZBOVX.js +114 -0
  330. package/chunks/trustedFolders-V6Y4CU3F.js +122 -0
  331. package/chunks/{update-relaunch-OHVFN6KF.js → update-relaunch-CGSX3R37.js} +6 -6
  332. package/chunks/updateCheck-T5O2WGIB.js +118 -0
  333. package/chunks/useAutoAcceptIndicator-ULBJJWPY.js +120 -0
  334. package/chunks/{validateNonInterActiveAuth-WJXH426F.js → validateNonInterActiveAuth-E5S2JSRC.js} +114 -108
  335. package/chunks/{version-QMDRADXM.js → version-LS5JPU36.js} +2 -2
  336. package/chunks/{web-fetch-ROS6P4LP.js → web-fetch-RLMFZTS3.js} +25 -244
  337. package/chunks/{web-search-JS3E76O6.js → web-search-LMCIC4N5.js} +11 -13
  338. package/chunks/{web-shell-static-3NUTRHAH.js → web-shell-static-A6QMUNNV.js} +11 -4
  339. package/chunks/webapi-Z5OM224P.js +4118 -0
  340. package/chunks/{workflow-2FCMBTBZ.js → workflow-JBXU3IGA.js} +713 -138
  341. package/chunks/workspace-providers-status-525ORQBH.js +114 -0
  342. package/chunks/{workspace-registration-store-SU4EJKSD.js → workspace-registration-store-7Y44R4LV.js} +1 -1
  343. package/chunks/workspace-registry-HS4RWUSQ.js +123 -0
  344. package/chunks/workspace-service-7PXDM6EB.js +129 -0
  345. package/chunks/workspace-skills-status-FMJGC2XI.js +113 -0
  346. package/chunks/{workspace-trust-reconciler-4Y4F7XIX.js → workspace-trust-reconciler-3YTWSQBY.js} +78 -77
  347. package/chunks/write-file-BVQRYQQO.js +88 -0
  348. package/chunks/{zh-TW-NX43Z2S2.js → zh-TW-RPTMRTHG.js} +5 -1
  349. package/chunks/{zh-3JQ75KFU.js → zh-UNY63FR3.js} +5 -1
  350. package/chunks/{zoom-image-DNBKCGGF.js → zoom-image-FGCELNS4.js} +14 -15
  351. package/cli.js +13 -13
  352. package/locales/ca.js +3 -0
  353. package/locales/de.js +1 -0
  354. package/locales/en.js +5 -0
  355. package/locales/fr.js +1 -0
  356. package/locales/ja.js +1 -0
  357. package/locales/pt.js +1 -0
  358. package/locales/ru.js +1 -0
  359. package/locales/zh-TW.js +5 -0
  360. package/locales/zh.js +5 -0
  361. package/package.json +3 -3
  362. package/web-shell/assets/{abnfDiagram-VCTEODGH-DWHXEVlf.js → abnfDiagram-VCTEODGH-2XZDeWYO.js} +1 -1
  363. package/web-shell/assets/{arc-CXKjm86V.js → arc-B6UgMh90.js} +1 -1
  364. package/web-shell/assets/{architectureDiagram-5GKGNRK7-B_ynI0cX.js → architectureDiagram-5GKGNRK7-DZgNFeN1.js} +1 -1
  365. package/web-shell/assets/{blockDiagram-NRAW4CY4-DMebd9X0.js → blockDiagram-NRAW4CY4-DQ2wvBFN.js} +1 -1
  366. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BZ5BlxS-.js → c4Diagram-UCG6FXSJ-DMmQMrc4.js} +1 -1
  367. package/web-shell/assets/channel-D_TyfiTx.js +1 -0
  368. package/web-shell/assets/{chunk-2Q5K7J3B-CluJKopE.js → chunk-2Q5K7J3B-C8Zh2e9y.js} +1 -1
  369. package/web-shell/assets/{chunk-5VM5RSS4-hzDAPFOo.js → chunk-5VM5RSS4-C3LTenP8.js} +1 -1
  370. package/web-shell/assets/{chunk-F27PBJKO-6vHioKJe.js → chunk-F27PBJKO-CxABOc8n.js} +1 -1
  371. package/web-shell/assets/{chunk-G27WJ6UU-B_5hKTGo.js → chunk-G27WJ6UU-CD_JxHDC.js} +1 -1
  372. package/web-shell/assets/{chunk-JWPE2WC7-CO9VoFCH.js → chunk-JWPE2WC7-BdmZPmce.js} +1 -1
  373. package/web-shell/assets/{chunk-LCL6LL3I-7L5JpxYu.js → chunk-LCL6LL3I-80bcHmfK.js} +1 -1
  374. package/web-shell/assets/{chunk-POPQ4Y6H-DHLJMAqj.js → chunk-POPQ4Y6H-CNpLZyQF.js} +1 -1
  375. package/web-shell/assets/{chunk-SVP7TREG-Dt-4Cqdl.js → chunk-SVP7TREG-CXlKgMv3.js} +1 -1
  376. package/web-shell/assets/{chunk-XXDRQBXY-QlSQ3ssG.js → chunk-XXDRQBXY-CivyYyvL.js} +1 -1
  377. package/web-shell/assets/classDiagram-DTDB5LWJ-Bw_H3xMd.js +1 -0
  378. package/web-shell/assets/classDiagram-v2-JRS7N3AN-Bw_H3xMd.js +1 -0
  379. package/web-shell/assets/{cose-bilkent-JH36ORCC-DMw3EOxl.js → cose-bilkent-JH36ORCC-COAjRH3w.js} +1 -1
  380. package/web-shell/assets/{cynefin-OW5HDTMX-s6vEA7RQ.js → cynefin-OW5HDTMX-DqU1JHO6.js} +1 -1
  381. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-AOKsvYLt.js → cynefinDiagram-5FMLGOSQ-BCLI1Bvj.js} +1 -1
  382. package/web-shell/assets/{dagre-3AP2YEHR-9QAZn3m7.js → dagre-3AP2YEHR-DmAz8nqF.js} +1 -1
  383. package/web-shell/assets/{diagram-S7CK7UJ4-CWpnu4FN.js → diagram-S7CK7UJ4-Ck-5QLT5.js} +1 -1
  384. package/web-shell/assets/{diagram-UQ7AKVKN-9l0jXD8q.js → diagram-UQ7AKVKN-C0ljX0mW.js} +1 -1
  385. package/web-shell/assets/{diagram-VSXAHHWV-BMUHroj4.js → diagram-VSXAHHWV-DPgvT24v.js} +1 -1
  386. package/web-shell/assets/{diagram-VX7I27RA-Co9x27vm.js → diagram-VX7I27RA-D7hWr1LR.js} +1 -1
  387. package/web-shell/assets/{diagram-Z3DM3KII-BKnTeOER.js → diagram-Z3DM3KII-D59tlOta.js} +1 -1
  388. package/web-shell/assets/{ebnfDiagram-PWID7BFC-QBZD9CKG.js → ebnfDiagram-PWID7BFC-CY2DDx00.js} +1 -1
  389. package/web-shell/assets/{erDiagram-SSCWMZ5O-dKWAEGun.js → erDiagram-SSCWMZ5O-AR4h8Q8k.js} +1 -1
  390. package/web-shell/assets/{flowDiagram-A5DVABFB-CR_UgVqj.js → flowDiagram-A5DVABFB-DbF0HqBz.js} +1 -1
  391. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DQUnjWO6.js → ganttDiagram-EL5Y4UJY-J52mrIhc.js} +1 -1
  392. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C4j59wPL.js → gitGraphDiagram-WWUBYQGX-CcgMY5EV.js} +1 -1
  393. package/web-shell/assets/index-BjUg3vPr.css +5 -0
  394. package/web-shell/assets/index-CFwYYVFU.js +1873 -0
  395. package/web-shell/assets/{index-tYXRIPz4.js → index-MQs7l15A.js} +1 -1
  396. package/web-shell/assets/{infoDiagram-RXCK75RN-mzqbt50w.js → infoDiagram-RXCK75RN-Buu3ibp2.js} +1 -1
  397. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-ChLOqhGl.js → ishikawaDiagram-5VMMS53U-CoKQxnF3.js} +1 -1
  398. package/web-shell/assets/{journeyDiagram-EYS64GPL-SifZE-R8.js → journeyDiagram-EYS64GPL-CxK35mTC.js} +1 -1
  399. package/web-shell/assets/{kanban-definition-3QL26DDD-Sft2qlbc.js → kanban-definition-3QL26DDD-tk2CHTQ1.js} +1 -1
  400. package/web-shell/assets/{layout-O2uHVkPd.js → layout-DEpMwb4u.js} +1 -1
  401. package/web-shell/assets/{linear-BVqYgjSc.js → linear-DSQsLh53.js} +1 -1
  402. package/web-shell/assets/{mermaid.core-CZ9MQaJ6.js → mermaid.core-DIZuPBQT.js} +6 -6
  403. package/web-shell/assets/{mindmap-definition-FBJOCRG2-BNQYjBqM.js → mindmap-definition-FBJOCRG2-CCAvk8r_.js} +1 -1
  404. package/web-shell/assets/{pegDiagram-XKGWAZYB-rh1J8uv6.js → pegDiagram-XKGWAZYB-CpJ28jxz.js} +1 -1
  405. package/web-shell/assets/{pieDiagram-E7YTZNPT-BQHR5mn9.js → pieDiagram-E7YTZNPT-ziJR2R32.js} +1 -1
  406. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-CLCbP7mK.js → quadrantDiagram-AXDQQJYC-B60zE3Mh.js} +1 -1
  407. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CDQhrkbm.js → railroadDiagram-O6MQD6OU-M3GqQ_g1.js} +1 -1
  408. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BdP9uswg.js → requirementDiagram-EFPCY7ZU-ntCtYqTk.js} +1 -1
  409. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CFZDFBXF.js → sankeyDiagram-P5KCCOFB-AYLoItcZ.js} +1 -1
  410. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BW9WOJXI.js → sequenceDiagram-WJ2MYXX4-DEWk4Mlj.js} +1 -1
  411. package/web-shell/assets/{sizeCapture-X5ZJPWSS-CPMia32z.js → sizeCapture-X5ZJPWSS-OOWvzPay.js} +1 -1
  412. package/web-shell/assets/{stateDiagram-HBIQ2CUA-BANp9p7F.js → stateDiagram-HBIQ2CUA-BcMmvxem.js} +1 -1
  413. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DRLLqPWO.js +1 -0
  414. package/web-shell/assets/{swimlanes-XN3QIQJK-JroXksK-.js → swimlanes-XN3QIQJK-DuZTWWvh.js} +1 -1
  415. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DOfLQQYt.js +8 -0
  416. package/web-shell/assets/{timeline-definition-24CTP7MA-DfuVIfYY.js → timeline-definition-24CTP7MA-CjqtZXEd.js} +1 -1
  417. package/web-shell/assets/{vennDiagram-4TSXK5OY-BZXoSjRB.js → vennDiagram-4TSXK5OY-knVCVkQ4.js} +1 -1
  418. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BdiY8avC.js → wardleyDiagram-VM6X3IG4-yoWhw0a2.js} +1 -1
  419. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DcXh_U4H.js → xychartDiagram-S5SC5T6Z-ue14E_gL.js} +1 -1
  420. package/web-shell/index.html +20 -5
  421. package/chunks/MaxSizedBox-3OZJCC3J.js +0 -110
  422. package/chunks/agent-BFE3DQM3.js +0 -93
  423. package/chunks/agent-headless-LLVKZZ4P.js +0 -87
  424. package/chunks/bridge-EBYO4SYM.js +0 -118
  425. package/chunks/channel-settings-store-5VP2Y2YM.js +0 -115
  426. package/chunks/chunk-2J3OJGTL.js +0 -98
  427. package/chunks/chunk-7IV52LTO.js +0 -202
  428. package/chunks/chunk-AXMWHKXA.js +0 -42
  429. package/chunks/chunk-F6WFNA7U.js +0 -22
  430. package/chunks/chunk-IO257NUD.js +0 -623
  431. package/chunks/chunk-JS73NNWF.js +0 -30
  432. package/chunks/chunk-SJ4HB27T.js +0 -945
  433. package/chunks/chunk-VGHZT6JR.js +0 -51
  434. package/chunks/chunk-YHC2EYYG.js +0 -125
  435. package/chunks/computer-use-EGPWFEX6.js +0 -2142
  436. package/chunks/config-utils-WZ43VOBS.js +0 -25
  437. package/chunks/contextCommand-5DSEQI6S.js +0 -106
  438. package/chunks/daemon-status-provider-EYMLPYJU.js +0 -116
  439. package/chunks/daemon-trust-policy-CQYKZ7VO.js +0 -112
  440. package/chunks/deferred-core-runtime-WFEPUXZR.js +0 -114
  441. package/chunks/earlyInputCapture-PN4PP7V5.js +0 -107
  442. package/chunks/environment-WUPHLPKZ.js +0 -127
  443. package/chunks/errors-WPMPVIAT.js +0 -113
  444. package/chunks/exitPlanMode-MLFHYZNB.js +0 -85
  445. package/chunks/handleAutoUpdate-F5OTWUT5.js +0 -109
  446. package/chunks/i18n-C562S6KN.js +0 -124
  447. package/chunks/initializer-7YPGOFP4.js +0 -113
  448. package/chunks/installationInfo-ARU5Q2H7.js +0 -107
  449. package/chunks/list-KTSK275C.js +0 -116
  450. package/chunks/loadedSettingsAdapter-F3T2EQ5J.js +0 -110
  451. package/chunks/mcp-6ONTVPAY.js +0 -110
  452. package/chunks/nonInteractiveCli-KZDWFAN6.js +0 -178
  453. package/chunks/pidfile-IO7ALSZF.js +0 -111
  454. package/chunks/process-registry-PMJOA5CO.js +0 -172
  455. package/chunks/prompt-terminal-ledger-TCE7PMCE.js +0 -105
  456. package/chunks/read-file-2HOD2ATO.js +0 -33
  457. package/chunks/resumeHistoryUtils-DDSBAQJS.js +0 -118
  458. package/chunks/ripGrep-E7P6K4QR.js +0 -40
  459. package/chunks/runtime-J4SPTJRQ.js +0 -148
  460. package/chunks/scheduler-VRAEZZ4E.js +0 -122
  461. package/chunks/serve-KEAWV4TI.js +0 -118
  462. package/chunks/shell-H6K63WG3.js +0 -95
  463. package/chunks/skill-settings-TCKLXIXM.js +0 -118
  464. package/chunks/spawnChannel-2K6NKWM5.js +0 -111
  465. package/chunks/standalone-update-LSCGOEFP.js +0 -118
  466. package/chunks/terminal-image-renderer-UHX3UD66.js +0 -114
  467. package/chunks/theme-manager-6B47ZPIF.js +0 -102
  468. package/chunks/total-session-admission-NSCFWGJH.js +0 -113
  469. package/chunks/trustedFolders-7XMJWGQ3.js +0 -122
  470. package/chunks/updateCheck-EOVLHD4T.js +0 -118
  471. package/chunks/useAutoAcceptIndicator-ZNMIGBTN.js +0 -120
  472. package/chunks/workspace-providers-status-GPGU5YMT.js +0 -113
  473. package/chunks/workspace-registry-BQISXT6Y.js +0 -122
  474. package/chunks/workspace-service-LLY6HCUC.js +0 -129
  475. package/chunks/workspace-skills-status-L5N2Y3ZP.js +0 -113
  476. package/chunks/write-file-EJHU2Z3E.js +0 -90
  477. package/web-shell/assets/channel-Zg3WHgq_.js +0 -1
  478. package/web-shell/assets/classDiagram-DTDB5LWJ-C16l9jQz.js +0 -1
  479. package/web-shell/assets/classDiagram-v2-JRS7N3AN-C16l9jQz.js +0 -1
  480. package/web-shell/assets/index-BN_m_uHJ.css +0 -5
  481. package/web-shell/assets/index-DrlJu79f.js +0 -1792
  482. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-NZYAoQLU.js +0 -1
  483. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-3YdVX3vj.js +0 -8
@@ -3,6 +3,9 @@
3
3
  import {
4
4
  computeCpuPercent
5
5
  } from "./chunk-LBOVL47Y.js";
6
+ import {
7
+ resolveServeToken
8
+ } from "./chunk-ZELCTN6Y.js";
6
9
  import {
7
10
  RUNTIME_STARTUP_CANCELLED_MESSAGE
8
11
  } from "./chunk-QUPXZXLV.js";
@@ -35,30 +38,38 @@ import {
35
38
  positiveFiniteOrNull,
36
39
  prepareManagedScratchRoot,
37
40
  resolveAcpHttpEnabled,
38
- setDeferredRuntimeRequestTiming,
39
41
  toDaemonStatusMemoryLimits
40
- } from "./chunk-UUQFJILB.js";
41
- import "./chunk-VGHZT6JR.js";
42
+ } from "./chunk-RFI4YGMR.js";
42
43
  import {
43
- isLoopbackBind,
44
- normalizeSessionIdForLookup
45
- } from "./chunk-TQOF5KBL.js";
44
+ ConversationDirectoryIdentityError,
45
+ assertExactConversationRootIdentity,
46
+ createConversationRootIdentity,
47
+ getConversationDirectoryName,
48
+ getConversationStagedDirectoryName,
49
+ inspectConversationDirectoryIdentity,
50
+ inspectConversationStagedDirectoryIdentity,
51
+ isSameConversationDirectoryObject,
52
+ materializeConversationDirectoryIdentity,
53
+ revalidateConversationRootIdentity
54
+ } from "./chunk-U54AYGEC.js";
55
+ import {
56
+ isLoopbackBind
57
+ } from "./chunk-RXFQM6FQ.js";
46
58
  import {
47
59
  formatMemoryBudgetStderr,
48
60
  resolveDaemonMemoryBudget,
49
61
  serveJournalGrowthPoolMb
50
62
  } from "./chunk-UXEO7E3V.js";
51
- import "./chunk-NYWWQ437.js";
52
63
  import {
53
- require_express,
54
- resolveWebShellDir
55
- } from "./chunk-O5Z7EB6Y.js";
64
+ setDeferredRuntimeRequestTiming
65
+ } from "./chunk-RNVFRIOO.js";
66
+ import {
67
+ normalizeSessionIdForLookup
68
+ } from "./chunk-ZEZKIS2K.js";
69
+ import "./chunk-NYWWQ437.js";
56
70
  import {
57
71
  resolveSessionRestoreTimeoutMs
58
72
  } from "./chunk-4JRM2BSM.js";
59
- import {
60
- LIVE_HOST_PROTOCOL_VERSION
61
- } from "./chunk-NKLP3DCK.js";
62
73
  import {
63
74
  DEFAULT_COMPACTED_REPLAY_MAX_BYTES,
64
75
  DEFAULT_MAX_JOURNAL_BYTES,
@@ -68,40 +79,63 @@ import {
68
79
  normalizeMaxJournalBytes,
69
80
  normalizeMaxJournalEvents
70
81
  } from "./chunk-WCCLLK7X.js";
71
- import "./chunk-HMJ2P3SV.js";
82
+ import {
83
+ require_express
84
+ } from "./chunk-AYHQZBJ4.js";
85
+ import {
86
+ resolveWebShellDir
87
+ } from "./chunk-FBX2SDQ4.js";
72
88
  import {
73
89
  resolveChannelCwd
74
- } from "./chunk-45NQKMYB.js";
90
+ } from "./chunk-HVC3PNVC.js";
91
+ import {
92
+ LIVE_HOST_PROTOCOL_VERSION
93
+ } from "./chunk-NKLP3DCK.js";
94
+ import "./chunk-K6KS3LTN.js";
95
+ import "./chunk-HMJ2P3SV.js";
96
+ import "./chunk-7E7UCJHS.js";
97
+ import {
98
+ consumeServeFastPathRejectedLoaderKeys,
99
+ loadServeFastPathSettings,
100
+ preResolveServeFastPathHomeEnvOverrides
101
+ } from "./chunk-TWSKM647.js";
75
102
  import {
76
103
  MAX_REGISTERED_WORKSPACES,
77
104
  resolveWorkspaceInputs,
78
105
  workspaceRegistrationId
79
- } from "./chunk-BUGYW6FB.js";
80
- import "./chunk-IOSEW6KP.js";
106
+ } from "./chunk-LEGTMYAE.js";
107
+ import "./chunk-G6FECKTJ.js";
81
108
  import {
82
109
  LOAD_REPLAY_META_KEY
83
- } from "./chunk-LURJYO2T.js";
84
- import "./chunk-624NHDGB.js";
110
+ } from "./chunk-OZ6KS6KW.js";
111
+ import "./chunk-ERFDKH32.js";
85
112
  import {
86
113
  canonicalizeWorkspace,
87
114
  translateAndCheckAbsoluteWorkspacePath
88
115
  } from "./chunk-6PLDPT2C.js";
89
- import "./chunk-4F5WV4RF.js";
116
+ import {
117
+ ExtraCaInspectionError,
118
+ loadableCertificates
119
+ } from "./chunk-ISKH4QX3.js";
90
120
  import "./chunk-FYJ7W2PI.js";
91
121
  import "./chunk-Z7B6SRPM.js";
92
122
  import {
93
- ChannelDeliveryError,
94
- ChannelWebhookEnqueueError,
95
- QWEN_SERVER_TOKEN_ENV,
96
- isChannelDeliveryError
97
- } from "./chunk-ND7NOI4P.js";
123
+ ChannelWebhookEnqueueError
124
+ } from "./chunk-STUJ7IMZ.js";
125
+ import {
126
+ QWEN_SERVER_TOKEN_ENV
127
+ } from "./chunk-GYTKQYDB.js";
98
128
  import {
99
129
  normalizeWorkerDiagnostic,
100
130
  sanitizeWorkerDiagnostic
101
- } from "./chunk-A6NRNRKE.js";
131
+ } from "./chunk-RFIDDFAL.js";
102
132
  import {
103
133
  channelSelectionNames
104
134
  } from "./chunk-ALMR3E6Q.js";
135
+ import {
136
+ ChannelDeliveryError,
137
+ isChannelDeliveryError
138
+ } from "./chunk-RKFGE7JH.js";
105
139
  import "./chunk-UDG5EZJI.js";
106
140
  import {
107
141
  EXTERNAL_TOOL_GUARD_PROVIDER_ATTACHED_VALUE,
@@ -114,17 +148,10 @@ import "./chunk-M5GB774H.js";
114
148
  import {
115
149
  MAX_DAEMON_WORKSPACES
116
150
  } from "./chunk-5HBA2Z7V.js";
117
- import "./chunk-K6KS3LTN.js";
118
- import "./chunk-7E7UCJHS.js";
119
151
  import {
120
152
  sanitizeLogText
121
- } from "./chunk-AW27A43Y.js";
153
+ } from "./chunk-ICURCKIU.js";
122
154
  import "./chunk-IW6RQPQB.js";
123
- import {
124
- consumeServeFastPathRejectedLoaderKeys,
125
- loadServeFastPathSettings,
126
- preResolveServeFastPathHomeEnvOverrides
127
- } from "./chunk-LD5VIJ7S.js";
128
155
  import "./chunk-GOXKNSDZ.js";
129
156
  import {
130
157
  getGlobalQwenDirLite,
@@ -135,20 +162,20 @@ import {
135
162
  clearLoaderKeyRejectionReporterIfCurrent,
136
163
  scrubInheritedLoaderEnv,
137
164
  setLoaderKeyRejectionReporter
138
- } from "./chunk-CXJHQVEK.js";
165
+ } from "./chunk-5PA6UEYA.js";
139
166
  import {
140
167
  getCliVersion
141
- } from "./chunk-RDG44S5I.js";
142
- import "./chunk-YLFLHKDL.js";
168
+ } from "./chunk-GGNE3JAW.js";
169
+ import "./chunk-W3N5XAZ6.js";
143
170
  import "./chunk-NPQ5ZKRP.js";
144
171
  import {
145
172
  isWithinRoot
146
173
  } from "./chunk-MR3PXB6E.js";
147
174
  import "./chunk-LJZSMWOH.js";
148
175
  import "./chunk-GOFAQQZA.js";
176
+ import "./chunk-5M6IDOMF.js";
149
177
  import "./chunk-TWPJO254.js";
150
178
  import "./chunk-CQ35AJ4Z.js";
151
- import "./chunk-5M6IDOMF.js";
152
179
  import {
153
180
  require_proper_lockfile
154
181
  } from "./chunk-MLXTMF7H.js";
@@ -181,10 +208,12 @@ import {
181
208
  // packages/cli/src/serve/run-qwen-serve.ts
182
209
  init_esbuild_shims();
183
210
  var import_express = __toESM(require_express(), 1);
184
- import { X509Certificate, createHash as createHash3, timingSafeEqual } from "node:crypto";
211
+ import { X509Certificate, createHash as createHash2, timingSafeEqual } from "node:crypto";
212
+ import { execFile } from "node:child_process";
185
213
  import * as fs from "node:fs";
186
214
  import { createServer } from "node:http";
187
215
  import * as https from "node:https";
216
+ import { isIP } from "node:net";
188
217
  import * as path from "node:path";
189
218
  import * as os from "node:os";
190
219
  import { monitorEventLoopDelay, performance as performance2 } from "node:perf_hooks";
@@ -597,11 +626,11 @@ async function ensureRealDirectory(fs2, dirPath, mutationAllowed = () => true) {
597
626
  __name(ensureRealDirectory, "ensureRealDirectory");
598
627
  async function activeFileSize(fs2, activePath) {
599
628
  try {
600
- const stat = await fs2.lstat(activePath);
601
- if (!stat.isFile() || stat.isSymbolicLink()) {
629
+ const stat2 = await fs2.lstat(activePath);
630
+ if (!stat2.isFile() || stat2.isSymbolicLink()) {
602
631
  throw new Error(`${activePath} is not a regular file`);
603
632
  }
604
- return stat.size;
633
+ return stat2.size;
605
634
  } catch (error) {
606
635
  if (isErrno(error, "ENOENT")) return 0;
607
636
  throw error;
@@ -1022,8 +1051,8 @@ __name(closeFallbackFamily, "closeFallbackFamily");
1022
1051
  async function cleanupFallbacksBestEffort(input) {
1023
1052
  const runsDir = nodePath.join(input.daemonDir, "runs");
1024
1053
  try {
1025
- const stat = await input.fs.lstat(runsDir);
1026
- if (!stat.isDirectory() || stat.isSymbolicLink()) {
1054
+ const stat2 = await input.fs.lstat(runsDir);
1055
+ if (!stat2.isDirectory() || stat2.isSymbolicLink()) {
1027
1056
  throw new Error(`${runsDir} is not a real directory`);
1028
1057
  }
1029
1058
  } catch (error) {
@@ -1390,7 +1419,7 @@ function createConcreteLogger(input) {
1390
1419
  }
1391
1420
  });
1392
1421
  let timeout;
1393
- const deadline = new Promise((resolve4) => {
1422
+ const deadline = new Promise((resolve3) => {
1394
1423
  timeout = setTimeout(() => {
1395
1424
  try {
1396
1425
  input.warnOnce(
@@ -1399,7 +1428,7 @@ function createConcreteLogger(input) {
1399
1428
  );
1400
1429
  } catch {
1401
1430
  } finally {
1402
- resolve4();
1431
+ resolve3();
1403
1432
  }
1404
1433
  }, input.policy.closeDrainBudgetMs);
1405
1434
  timeout.unref();
@@ -1745,251 +1774,10 @@ __name(initDaemonLogger, "initDaemonLogger");
1745
1774
 
1746
1775
  // packages/cli/src/serve/conversations/conversation-workspace.ts
1747
1776
  init_esbuild_shims();
1748
- import { readdir, rmdir } from "node:fs/promises";
1777
+ import { constants as fsConstants } from "node:fs";
1778
+ import { open, readdir, rename, rm, rmdir, stat } from "node:fs/promises";
1749
1779
  import { homedir } from "node:os";
1750
- import { resolve as resolve2 } from "node:path";
1751
-
1752
- // packages/cli/src/utils/conversation-directory-identity.ts
1753
- init_esbuild_shims();
1754
- import { createHash as createHash2 } from "node:crypto";
1755
- import { lstat, mkdir, realpath } from "node:fs/promises";
1756
- import { isAbsolute, join as join2, relative as relative2, resolve, sep } from "node:path";
1757
- function hasVerifiableInode(ino) {
1758
- return Number(ino) !== 0;
1759
- }
1760
- __name(hasVerifiableInode, "hasVerifiableInode");
1761
- var ConversationDirectoryIdentityError = class extends Error {
1762
- constructor(scope, reason, cause) {
1763
- super(
1764
- `Conversation ${scope} identity validation failed: ${reason}`,
1765
- cause !== void 0 ? { cause } : void 0
1766
- );
1767
- this.scope = scope;
1768
- this.reason = reason;
1769
- }
1770
- static {
1771
- __name(this, "ConversationDirectoryIdentityError");
1772
- }
1773
- name = "ConversationDirectoryIdentityError";
1774
- };
1775
- function throwIdentityIoError(scope, cause) {
1776
- throw new ConversationDirectoryIdentityError(scope, "io_error", cause);
1777
- }
1778
- __name(throwIdentityIoError, "throwIdentityIoError");
1779
- var isSameConversationPath = /* @__PURE__ */ __name((left, right) => process.platform === "win32" ? left.toLowerCase() === right.toLowerCase() : left === right, "isSameConversationPath");
1780
- function getConversationDirectoryName(storageSessionId) {
1781
- if (storageSessionId.length === 0 || storageSessionId.length > 256) {
1782
- throw new ConversationDirectoryIdentityError("child", "invalid_session_id");
1783
- }
1784
- return `conversation-${createHash2("sha256").update(storageSessionId).digest("hex")}`;
1785
- }
1786
- __name(getConversationDirectoryName, "getConversationDirectoryName");
1787
- function validateDirectoryStats(stats, scope) {
1788
- if (stats.isSymbolicLink() || !stats.isDirectory()) {
1789
- throw new ConversationDirectoryIdentityError(scope, "not_directory");
1790
- }
1791
- if (process.platform !== "win32" && typeof process.getuid === "function" && stats.uid !== process.getuid()) {
1792
- throw new ConversationDirectoryIdentityError(scope, "wrong_owner");
1793
- }
1794
- if (process.platform !== "win32" && (stats.mode & 63) !== 0) {
1795
- throw new ConversationDirectoryIdentityError(scope, "wrong_mode");
1796
- }
1797
- }
1798
- __name(validateDirectoryStats, "validateDirectoryStats");
1799
- function hasRootIdentity(stats, root) {
1800
- if (!root.inodeVerifiable) return stats.dev === root.device;
1801
- return hasVerifiableInode(stats.ino) && stats.dev === root.device && stats.ino === root.inode;
1802
- }
1803
- __name(hasRootIdentity, "hasRootIdentity");
1804
- function isSameDirectoryIdentity(before, after) {
1805
- if (!hasVerifiableInode(before.ino) || !hasVerifiableInode(after.ino)) {
1806
- return before.dev === after.dev;
1807
- }
1808
- return before.dev === after.dev && before.ino === after.ino;
1809
- }
1810
- __name(isSameDirectoryIdentity, "isSameDirectoryIdentity");
1811
- function hasExpectedDirectoryIdentity(identity, expected) {
1812
- const inodesProvable = hasVerifiableInode(identity.inode) && hasVerifiableInode(expected.inode);
1813
- return identity.storageSessionId === expected.storageSessionId && identity.name === expected.name && isSameConversationPath(identity.canonicalPath, expected.canonicalPath) && identity.device === expected.device && (!inodesProvable || identity.inode === expected.inode) && isSameConversationPath(
1814
- identity.root.configuredRoot,
1815
- expected.root.configuredRoot
1816
- ) && isSameConversationPath(
1817
- identity.root.canonicalRoot,
1818
- expected.root.canonicalRoot
1819
- ) && identity.root.device === expected.root.device && (!identity.root.inodeVerifiable || !expected.root.inodeVerifiable || identity.root.inode === expected.root.inode);
1820
- }
1821
- __name(hasExpectedDirectoryIdentity, "hasExpectedDirectoryIdentity");
1822
- async function createConversationRootIdentity(configuredRoot) {
1823
- try {
1824
- await mkdir(configuredRoot, { recursive: true, mode: 448 });
1825
- } catch (error) {
1826
- let existing;
1827
- try {
1828
- existing = await lstat(configuredRoot);
1829
- } catch {
1830
- throwIdentityIoError("root", error);
1831
- }
1832
- validateDirectoryStats(existing, "root");
1833
- throwIdentityIoError("root", error);
1834
- }
1835
- let before;
1836
- try {
1837
- before = await lstat(configuredRoot);
1838
- } catch (error) {
1839
- throwIdentityIoError("root", error);
1840
- }
1841
- validateDirectoryStats(before, "root");
1842
- let canonicalRoot;
1843
- let after;
1844
- try {
1845
- canonicalRoot = await realpath(configuredRoot);
1846
- after = await lstat(canonicalRoot);
1847
- } catch (error) {
1848
- throwIdentityIoError("root", error);
1849
- }
1850
- validateDirectoryStats(after, "root");
1851
- if (!isSameDirectoryIdentity(before, after)) {
1852
- throw new ConversationDirectoryIdentityError("root", "identity_changed");
1853
- }
1854
- return {
1855
- configuredRoot,
1856
- canonicalRoot,
1857
- device: after.dev,
1858
- inode: after.ino,
1859
- inodeVerifiable: hasVerifiableInode(after.ino)
1860
- };
1861
- }
1862
- __name(createConversationRootIdentity, "createConversationRootIdentity");
1863
- async function revalidateConversationRootIdentity(root) {
1864
- let configuredStats;
1865
- try {
1866
- configuredStats = await lstat(root.configuredRoot);
1867
- } catch (error) {
1868
- throwIdentityIoError("root", error);
1869
- }
1870
- validateDirectoryStats(configuredStats, "root");
1871
- if (!hasRootIdentity(configuredStats, root)) {
1872
- throw new ConversationDirectoryIdentityError("root", "identity_changed");
1873
- }
1874
- let canonical;
1875
- try {
1876
- canonical = await realpath(root.configuredRoot);
1877
- } catch (error) {
1878
- throwIdentityIoError("root", error);
1879
- }
1880
- if (!isSameConversationPath(canonical, root.canonicalRoot)) {
1881
- throw new ConversationDirectoryIdentityError(
1882
- "root",
1883
- "canonical_path_changed"
1884
- );
1885
- }
1886
- let canonicalStats;
1887
- try {
1888
- canonicalStats = await lstat(root.canonicalRoot);
1889
- } catch (error) {
1890
- throwIdentityIoError("root", error);
1891
- }
1892
- validateDirectoryStats(canonicalStats, "root");
1893
- if (!hasRootIdentity(canonicalStats, root)) {
1894
- throw new ConversationDirectoryIdentityError("root", "identity_changed");
1895
- }
1896
- return root;
1897
- }
1898
- __name(revalidateConversationRootIdentity, "revalidateConversationRootIdentity");
1899
- async function assertExactConversationRootIdentity(root, candidate) {
1900
- await revalidateConversationRootIdentity(root);
1901
- const resolvedCandidate = resolve(candidate);
1902
- if (!isSameConversationPath(resolvedCandidate, root.configuredRoot) && !isSameConversationPath(resolvedCandidate, root.canonicalRoot)) {
1903
- throw new ConversationDirectoryIdentityError("root", "unexpected_identity");
1904
- }
1905
- let stats;
1906
- let canonical;
1907
- try {
1908
- stats = await lstat(resolvedCandidate);
1909
- validateDirectoryStats(stats, "root");
1910
- canonical = await realpath(resolvedCandidate);
1911
- } catch (error) {
1912
- if (error instanceof ConversationDirectoryIdentityError) throw error;
1913
- throwIdentityIoError("root", error);
1914
- }
1915
- if (!isSameConversationPath(canonical, root.canonicalRoot) || !hasRootIdentity(stats, root)) {
1916
- throw new ConversationDirectoryIdentityError("root", "unexpected_identity");
1917
- }
1918
- return root;
1919
- }
1920
- __name(assertExactConversationRootIdentity, "assertExactConversationRootIdentity");
1921
- async function inspectConversationDirectoryIdentity(root, storageSessionId, expected) {
1922
- await revalidateConversationRootIdentity(root);
1923
- const name = getConversationDirectoryName(storageSessionId);
1924
- const candidate = join2(root.canonicalRoot, name);
1925
- let before;
1926
- try {
1927
- before = await lstat(candidate);
1928
- } catch (error) {
1929
- if (error.code === "ENOENT") return void 0;
1930
- throwIdentityIoError("child", error);
1931
- }
1932
- validateDirectoryStats(before, "child");
1933
- let canonical;
1934
- let after;
1935
- try {
1936
- canonical = await realpath(candidate);
1937
- after = await lstat(canonical);
1938
- } catch (error) {
1939
- if (error.code === "ENOENT") return void 0;
1940
- throwIdentityIoError("child", error);
1941
- }
1942
- validateDirectoryStats(after, "child");
1943
- const child = relative2(root.canonicalRoot, canonical);
1944
- if (child !== name || child.includes(sep) || child.startsWith("..") || isAbsolute(child)) {
1945
- throw new ConversationDirectoryIdentityError("child", "not_direct_child");
1946
- }
1947
- if (!isSameDirectoryIdentity(before, after)) {
1948
- throw new ConversationDirectoryIdentityError("child", "identity_changed");
1949
- }
1950
- await revalidateConversationRootIdentity(root);
1951
- const identity = {
1952
- root,
1953
- storageSessionId,
1954
- name,
1955
- canonicalPath: canonical,
1956
- device: after.dev,
1957
- inode: after.ino
1958
- };
1959
- if (expected && !hasExpectedDirectoryIdentity(identity, expected)) {
1960
- throw new ConversationDirectoryIdentityError(
1961
- "child",
1962
- "unexpected_identity"
1963
- );
1964
- }
1965
- return identity;
1966
- }
1967
- __name(inspectConversationDirectoryIdentity, "inspectConversationDirectoryIdentity");
1968
- async function materializeConversationDirectoryIdentity(root, storageSessionId) {
1969
- await revalidateConversationRootIdentity(root);
1970
- const name = getConversationDirectoryName(storageSessionId);
1971
- const candidate = join2(root.canonicalRoot, name);
1972
- let created = false;
1973
- try {
1974
- await mkdir(candidate, { mode: 448 });
1975
- created = true;
1976
- } catch (error) {
1977
- if (error.code !== "EEXIST") {
1978
- throwIdentityIoError("child", error);
1979
- }
1980
- }
1981
- const identity = await inspectConversationDirectoryIdentity(
1982
- root,
1983
- storageSessionId
1984
- );
1985
- if (!identity) {
1986
- throw new ConversationDirectoryIdentityError("child", "identity_changed");
1987
- }
1988
- return { identity, created };
1989
- }
1990
- __name(materializeConversationDirectoryIdentity, "materializeConversationDirectoryIdentity");
1991
-
1992
- // packages/cli/src/serve/conversations/conversation-workspace.ts
1780
+ import { join as join2, resolve } from "node:path";
1993
1781
  function liveIdentityError(error, exactRoot = false, creatingRoot = false) {
1994
1782
  if (!(error instanceof ConversationDirectoryIdentityError)) throw error;
1995
1783
  if (error.reason === "io_error" && error.cause !== void 0) {
@@ -2047,7 +1835,7 @@ function liveIdentityError(error, exactRoot = false, creatingRoot = false) {
2047
1835
  }
2048
1836
  __name(liveIdentityError, "liveIdentityError");
2049
1837
  function getConversationRootPath(homeDir = homedir()) {
2050
- return resolve2(homeDir, "Documents", "Qwen Code", "Conversations");
1838
+ return resolve(homeDir, "Documents", "Qwen Code", "Conversations");
2051
1839
  }
2052
1840
  __name(getConversationRootPath, "getConversationRootPath");
2053
1841
  async function revalidateConversationRoot(root) {
@@ -2231,6 +2019,171 @@ var ConversationWorkspace = class {
2231
2019
  throw error;
2232
2020
  }
2233
2021
  }
2022
+ async inspectStandaloneDeletionPaths(storageSessionId, expected) {
2023
+ const root = await this.revalidateStandaloneRoot();
2024
+ try {
2025
+ const normal = await inspectConversationDirectoryIdentity(
2026
+ root,
2027
+ storageSessionId
2028
+ );
2029
+ const staged = await inspectConversationStagedDirectoryIdentity(
2030
+ root,
2031
+ storageSessionId
2032
+ );
2033
+ if (normal && staged) {
2034
+ throw new ConversationDirectoryIdentityError(
2035
+ "child",
2036
+ "unexpected_identity"
2037
+ );
2038
+ }
2039
+ const identity = normal ?? staged;
2040
+ if (identity && expected && !isSameConversationDirectoryObject(identity, expected)) {
2041
+ throw new ConversationDirectoryIdentityError(
2042
+ "child",
2043
+ "unexpected_identity"
2044
+ );
2045
+ }
2046
+ if (normal) return { status: "normal", identity: normal };
2047
+ if (staged) return { status: "staged", identity: staged };
2048
+ return { status: "absent" };
2049
+ } catch (error) {
2050
+ if (error instanceof ConversationDirectoryIdentityError && error.scope === "child") {
2051
+ return { status: "compromised", error };
2052
+ }
2053
+ throw error;
2054
+ }
2055
+ }
2056
+ async createStandaloneDeletionExpectation(storageSessionId, recorded) {
2057
+ if (recorded.inodeVerifiable !== (recorded.inode !== 0)) {
2058
+ throw new ConversationDirectoryIdentityError(
2059
+ "child",
2060
+ "unexpected_identity"
2061
+ );
2062
+ }
2063
+ const root = await this.revalidateStandaloneRoot();
2064
+ const name = getConversationDirectoryName(storageSessionId);
2065
+ return {
2066
+ root,
2067
+ storageSessionId,
2068
+ name,
2069
+ canonicalPath: join2(root.canonicalRoot, name),
2070
+ device: recorded.device,
2071
+ inode: recorded.inode
2072
+ };
2073
+ }
2074
+ async stageStandaloneDirectory(storageSessionId, expected) {
2075
+ const inspected = await this.inspectStandaloneDeletionPaths(
2076
+ storageSessionId,
2077
+ expected
2078
+ );
2079
+ if (inspected.status === "compromised") throw inspected.error;
2080
+ if (inspected.status !== "normal") {
2081
+ throw new ConversationDirectoryIdentityError("child", "identity_changed");
2082
+ }
2083
+ const root = await this.revalidateStandaloneRoot();
2084
+ await rename(
2085
+ inspected.identity.canonicalPath,
2086
+ join2(
2087
+ root.canonicalRoot,
2088
+ getConversationStagedDirectoryName(storageSessionId)
2089
+ )
2090
+ );
2091
+ await revalidateConversationRootIdentity(root);
2092
+ const staged = await inspectConversationStagedDirectoryIdentity(
2093
+ root,
2094
+ storageSessionId
2095
+ );
2096
+ if (!staged || !isSameConversationDirectoryObject(staged, inspected.identity)) {
2097
+ throw new ConversationDirectoryIdentityError("child", "identity_changed");
2098
+ }
2099
+ await this.syncStandaloneRoot(root);
2100
+ return staged;
2101
+ }
2102
+ async restoreStagedStandaloneDirectory(storageSessionId, expected) {
2103
+ const inspected = await this.inspectStandaloneDeletionPaths(
2104
+ storageSessionId,
2105
+ expected
2106
+ );
2107
+ if (inspected.status === "compromised") throw inspected.error;
2108
+ if (inspected.status !== "staged") {
2109
+ throw new ConversationDirectoryIdentityError("child", "identity_changed");
2110
+ }
2111
+ const root = await this.revalidateStandaloneRoot();
2112
+ await rename(
2113
+ inspected.identity.canonicalPath,
2114
+ join2(root.canonicalRoot, getConversationDirectoryName(storageSessionId))
2115
+ );
2116
+ await revalidateConversationRootIdentity(root);
2117
+ const restored = await inspectConversationDirectoryIdentity(
2118
+ root,
2119
+ storageSessionId
2120
+ );
2121
+ if (!restored || !isSameConversationDirectoryObject(restored, inspected.identity)) {
2122
+ throw new ConversationDirectoryIdentityError("child", "identity_changed");
2123
+ }
2124
+ await this.syncStandaloneRoot(root);
2125
+ return restored;
2126
+ }
2127
+ async removeStagedStandaloneDirectory(storageSessionId, expected) {
2128
+ const inspected = await this.inspectStandaloneDeletionPaths(
2129
+ storageSessionId,
2130
+ expected
2131
+ );
2132
+ if (inspected.status === "compromised") throw inspected.error;
2133
+ if (inspected.status !== "staged") {
2134
+ throw new ConversationDirectoryIdentityError("child", "identity_changed");
2135
+ }
2136
+ const confirmed = await inspectConversationStagedDirectoryIdentity(
2137
+ inspected.identity.root,
2138
+ storageSessionId
2139
+ );
2140
+ if (!confirmed || !isSameConversationDirectoryObject(confirmed, inspected.identity)) {
2141
+ throw new ConversationDirectoryIdentityError("child", "identity_changed");
2142
+ }
2143
+ await rm(confirmed.canonicalPath, { recursive: true });
2144
+ await this.syncStandaloneRoot(confirmed.root);
2145
+ }
2146
+ async confirmStandaloneRootDurability(root) {
2147
+ await this.syncStandaloneRoot(root);
2148
+ }
2149
+ async syncStandaloneRoot(root) {
2150
+ await revalidateConversationRootIdentity(root);
2151
+ let handle;
2152
+ try {
2153
+ handle = await open(
2154
+ root.canonicalRoot,
2155
+ fsConstants.O_RDONLY | (process.platform === "win32" ? 0 : fsConstants.O_NOFOLLOW ?? 0)
2156
+ );
2157
+ const stats = await handle.stat();
2158
+ const inodeVerifiable = Number.isSafeInteger(stats.ino) && stats.ino > 0;
2159
+ if (!stats.isDirectory() || stats.dev !== root.device || inodeVerifiable !== root.inodeVerifiable || root.inodeVerifiable && stats.ino !== root.inode) {
2160
+ throw new ConversationDirectoryIdentityError(
2161
+ "root",
2162
+ "identity_changed"
2163
+ );
2164
+ }
2165
+ try {
2166
+ await handle.sync();
2167
+ } catch (error) {
2168
+ if (process.platform !== "win32" || !["EACCES", "EINVAL", "EPERM"].includes(
2169
+ error.code ?? ""
2170
+ )) {
2171
+ throw error;
2172
+ }
2173
+ }
2174
+ const current = await stat(root.canonicalRoot);
2175
+ const currentInodeVerifiable = Number.isSafeInteger(current.ino) && current.ino > 0;
2176
+ if (!current.isDirectory() || current.dev !== root.device || currentInodeVerifiable !== root.inodeVerifiable || root.inodeVerifiable && current.ino !== root.inode) {
2177
+ throw new ConversationDirectoryIdentityError(
2178
+ "root",
2179
+ "identity_changed"
2180
+ );
2181
+ }
2182
+ } finally {
2183
+ await handle?.close().catch(() => void 0);
2184
+ }
2185
+ await revalidateConversationRootIdentity(root);
2186
+ }
2234
2187
  };
2235
2188
 
2236
2189
  // packages/cli/src/serve/daemon-metrics-ring.ts
@@ -3091,8 +3044,8 @@ async function flushDaemonLogBounded(daemonLog, budgetMs) {
3091
3044
  await Promise.race([
3092
3045
  daemonLog.flush().catch(() => {
3093
3046
  }),
3094
- new Promise((resolve4) => {
3095
- timer = setTimeout(resolve4, budgetMs);
3047
+ new Promise((resolve3) => {
3048
+ timer = setTimeout(resolve3, budgetMs);
3096
3049
  timer.unref();
3097
3050
  })
3098
3051
  ]);
@@ -3273,14 +3226,453 @@ function workspaceRuntimeEffectiveEnv(runtime, daemonEnv) {
3273
3226
  return runtime.env.effectiveEnv ?? daemonEnv;
3274
3227
  }
3275
3228
  __name(workspaceRuntimeEffectiveEnv, "workspaceRuntimeEffectiveEnv");
3276
- function formatChannelWorkerDaemonUrl(host, port) {
3229
+ function formatChannelWorkerDaemonUrl(host, port, tls = false) {
3230
+ const scheme = tls ? "https" : "http";
3277
3231
  const normalized = host.trim().toLowerCase();
3278
3232
  if (normalized === "" || normalized === "0.0.0.0" || normalized === "::" || normalized === "[::]") {
3279
- return `http://127.0.0.1:${port}`;
3233
+ return `${scheme}://127.0.0.1:${port}`;
3280
3234
  }
3281
- return `http://${formatHostForUrl(host)}:${port}`;
3235
+ return `${scheme}://${formatHostForUrl(host)}:${port}`;
3282
3236
  }
3283
3237
  __name(formatChannelWorkerDaemonUrl, "formatChannelWorkerDaemonUrl");
3238
+ var WORKER_TLS_TRUST_PROBE = `
3239
+ import { isIP } from 'node:net';
3240
+ import * as tls from 'node:tls';
3241
+ const url = new URL(process.argv[1]);
3242
+ const timeoutMs = Number(process.argv[2]);
3243
+ const hostname = url.hostname.replace(/^\\[|\\]$/g, '');
3244
+ let socket;
3245
+ let settled = false;
3246
+ const finish = (result) => {
3247
+ if (settled) return;
3248
+ settled = true;
3249
+ process.stdout.write(JSON.stringify(result));
3250
+ socket?.destroy();
3251
+ };
3252
+ try {
3253
+ socket = tls.connect({
3254
+ host: hostname,
3255
+ port: Number(url.port || '443'),
3256
+ rejectUnauthorized: true,
3257
+ ...(isIP(hostname) === 0 ? { servername: hostname } : {}),
3258
+ }, () => finish({ ok: true }));
3259
+ socket.once('error', (error) => finish({
3260
+ ok: false,
3261
+ code: error.code ?? 'WORKER_TLS_VERIFY_FAILED',
3262
+ message: error.message,
3263
+ }));
3264
+ socket.setTimeout(timeoutMs, () => finish({
3265
+ ok: false,
3266
+ code: 'WORKER_TLS_VERIFY_TIMEOUT',
3267
+ message: 'TLS verification probe timed out.',
3268
+ }));
3269
+ } catch (error) {
3270
+ finish({
3271
+ ok: false,
3272
+ code: error.code ?? 'WORKER_TLS_VERIFY_FAILED',
3273
+ message: error.message,
3274
+ });
3275
+ }
3276
+ `;
3277
+ async function verifyWorkerTlsTrust(opts) {
3278
+ const timeoutMs = opts.timeoutMs ?? 5e3;
3279
+ return new Promise((resolve3) => {
3280
+ execFile(
3281
+ process.execPath,
3282
+ [
3283
+ "--input-type=module",
3284
+ "--eval",
3285
+ WORKER_TLS_TRUST_PROBE,
3286
+ opts.daemonUrl,
3287
+ String(timeoutMs)
3288
+ ],
3289
+ {
3290
+ env: {
3291
+ ...process.env,
3292
+ NODE_EXTRA_CA_CERTS: opts.caCertPath
3293
+ },
3294
+ encoding: "utf8",
3295
+ timeout: timeoutMs + 1e3
3296
+ },
3297
+ (error, stdout) => {
3298
+ try {
3299
+ const result = JSON.parse(stdout);
3300
+ resolve3(result.ok ? void 0 : result);
3301
+ } catch {
3302
+ const failure = error;
3303
+ resolve3({
3304
+ code: failure?.code != null ? String(failure.code) : "WORKER_TLS_VERIFY_FAILED",
3305
+ message: failure?.message ?? "TLS verification probe failed."
3306
+ });
3307
+ }
3308
+ }
3309
+ );
3310
+ });
3311
+ }
3312
+ __name(verifyWorkerTlsTrust, "verifyWorkerTlsTrust");
3313
+ function describeWorkerTlsTrustGaps(opts) {
3314
+ const chain = parseCertChain(opts.cert);
3315
+ const x509 = bootParsedLeaf(opts.cert);
3316
+ if (!x509) {
3317
+ return [];
3318
+ }
3319
+ const gaps = [];
3320
+ const operatorChain = opts.operatorCaCert ? loadableCertificates(
3321
+ opts.operatorCaCert.toString("utf8"),
3322
+ opts.operatorCaCertSourcePath
3323
+ ) : void 0;
3324
+ const servingBlocks = loadableCertificates(
3325
+ opts.cert.toString("utf8"),
3326
+ opts.certSourcePath
3327
+ );
3328
+ const operatorDiscarded = !servingBlocks && operatorChain !== void 0;
3329
+ const servingChain = servingBlocks === void 0 ? [
3330
+ x509,
3331
+ ...chain.filter(
3332
+ (member) => member.fingerprint256 !== x509.fingerprint256
3333
+ )
3334
+ ] : (
3335
+ // The loader can read blocks out of the file and still not read the
3336
+ // block the daemon SERVES — a leaf exported by `openssl x509
3337
+ // -trustout` carries the `TRUSTED CERTIFICATE` label, which is not one
3338
+ // the loader takes a certificate from, so a `trusted leaf + plain root`
3339
+ // serving file yields `servingBlocks = [root]`. Starting the walk at
3340
+ // that root put it at depth 0, where the leaf-depth exemption below
3341
+ // waives the CA-capability check, and the walk returned anchored with
3342
+ // zero gaps: measured `gaps: []` at boot for a CA:FALSE root
3343
+ // (handshake INVALID_PURPOSE) and for a CA:TRUE root without
3344
+ // keyCertSign (handshake UNSPECIFIED), while `createSecureContext`
3345
+ // accepts the file and the daemon boots green and silent.
3346
+ //
3347
+ // So anchor the walk at the certificate boot parsed, the way the
3348
+ // `servingBlocks === undefined` fallback above already does; the
3349
+ // remaining blocks supply the rest of the chain.
3350
+ servingBlocks.some(
3351
+ (block) => block.fingerprint256 === x509.fingerprint256
3352
+ ) ? servingBlocks : [x509, ...servingBlocks]
3353
+ );
3354
+ const leafHeldByWorkers = servingBlocks !== void 0 && servingBlocks.some((block) => block.fingerprint256 === x509.fingerprint256);
3355
+ const workerTrustStore = operatorChain && servingBlocks ? [...operatorChain, ...servingChain] : servingChain;
3356
+ const anchorPath = walkWorkerAnchorPath(
3357
+ x509,
3358
+ workerTrustStore,
3359
+ // The `servingBlocks === undefined` fallback prepends the leaf too, but
3360
+ // that file already reports its own gap below and the workers receive it
3361
+ // verbatim; only the partial-read case needs the distinction.
3362
+ servingBlocks === void 0 || leafHeldByWorkers
3363
+ );
3364
+ if (opts.operatorCaCertReadError !== void 0) {
3365
+ const servingFallbackAnchors = anchorPath.anchored && servingBlocks !== void 0;
3366
+ gaps.push(
3367
+ `NODE_EXTRA_CA_CERTS "${opts.operatorCaCertPath}" could not be read by the daemon (${opts.operatorCaCertReadError}), so channel workers receive no CA from it \u2014 a root-owned or mode-600 file is the usual cause, and its contents are not the problem. ` + (servingFallbackAnchors ? `--tls-cert "${opts.certPath}" carries an anchor of its own, and that file is what the workers fall back to, so their trust does not rest on this one today \u2014 whatever it was meant to add reaches nobody. Fix that file's permissions or path and restart.` : servingBlocks === void 0 ? `--tls-cert "${opts.certPath}" itself holds no block the workers' loader can read, so their fallback bundle is that file alone and it anchors nothing \u2014 fixing this CA file's permissions changes nothing; re-export the serving file as the gap below describes and restart.` : `Every worker handshake to the daemon will fail UNABLE_TO_VERIFY_LEAF_SIGNATURE unless the issuing CA is already in the workers' default trust store. Fix that file's permissions or path and restart.`)
3368
+ );
3369
+ } else if (opts.operatorCaCert && !operatorChain) {
3370
+ gaps.push(
3371
+ `NODE_EXTRA_CA_CERTS "${opts.operatorCaCertPath}" holds no PEM certificate block Node's loader can read \u2014 every -----BEGIN/END CERTIFICATE----- marker must sit alone on its own line and every block must decode, and a DER file is never read at all. Channel workers therefore receive the daemon cert alone and anchor nothing through this file. Re-export it as PEM and restart.`
3372
+ );
3373
+ }
3374
+ if (!servingBlocks) {
3375
+ gaps.push(
3376
+ `--tls-cert "${opts.certPath}" holds no PEM certificate block Node's loader can read, so ` + (operatorDiscarded ? `the channel workers' bundle cannot be merged: they receive that file alone and NODE_EXTRA_CA_CERTS "${opts.operatorCaCertPath}" is discarded. ` : `the channel workers receive a bundle their loader takes nothing from. `) + `Every worker handshake to the daemon will fail UNABLE_TO_VERIFY_LEAF_SIGNATURE. Re-export --tls-cert as PEM with every -----BEGIN/END CERTIFICATE----- marker alone on its own line and restart.`
3377
+ );
3378
+ }
3379
+ const leafPurposeDefect = tlsServerPurposeDefect(x509);
3380
+ if (leafPurposeDefect) {
3381
+ gaps.push(
3382
+ `--tls-cert "${opts.certPath}" cannot be used as a TLS server certificate because ${leafPurposeDefect}. Every worker handshake to the daemon will fail INVALID_PURPOSE. Reissue the leaf with a TLS-server keyUsage and serverAuth extendedKeyUsage, then restart.`
3383
+ );
3384
+ }
3385
+ if (anchorPath.nonCaTerminator) {
3386
+ const terminatorSubject = anchorPath.nonCaTerminator.subject.replace(
3387
+ /\r?\n/g,
3388
+ ", "
3389
+ );
3390
+ gaps.push(
3391
+ issuerRefusedForKeyUsage(anchorPath.nonCaTerminator) ? `--tls-cert "${opts.certPath}" chains up to "${terminatorSubject}", which is self-signed but whose keyUsage does not include keyCertSign, so OpenSSL refuses to let it issue the certificates below it however its basicConstraints reads. Every worker handshake to the daemon will fail "key usage does not include certificate signing" even though the chain terminates on a self-signed certificate. Reissue that certificate with keyCertSign in its keyUsage and restart \u2014 CA:TRUE alone does not fix it, and no NODE_EXTRA_CA_CERTS can anchor a self-signed certificate through anything but itself.` : `--tls-cert "${opts.certPath}" chains up to "${terminatorSubject}", which is self-signed but is not a CA \u2014 it carries basicConstraints CA:FALSE or, as an X.509 v3 certificate, no basicConstraints at all, and OpenSSL refuses to let it issue the certificates below it, so every worker handshake to the daemon will fail INVALID_PURPOSE ("unsuitable certificate purpose"). Reissue that certificate with CA:TRUE, or point NODE_EXTRA_CA_CERTS at a real CA that anchors the chain, and restart.`
3392
+ );
3393
+ } else if (anchorPath.incapableIssuer) {
3394
+ const keyUsageIsTheCause = issuerRefusedForKeyUsage(
3395
+ anchorPath.incapableIssuer
3396
+ );
3397
+ gaps.push(
3398
+ `--tls-cert "${opts.certPath}" chains through "${anchorPath.incapableIssuer.subject.replace(/\r?\n/g, ", ")}", ` + (keyUsageIsTheCause ? `whose keyUsage does not include keyCertSign, so OpenSSL refuses to let it issue the certificate below it however its basicConstraints reads. Every worker handshake to the daemon will fail with an invalid-CA error even though the chain looks complete, and the issuing CA IS in their bundle. Reissue that intermediate with keyCertSign in its keyUsage and restart \u2014 pointing NODE_EXTRA_CA_CERTS elsewhere cannot fix it.` : `which is not a CA \u2014 it carries basicConstraints CA:FALSE or, as an X.509 v3 certificate, no basicConstraints at all, and OpenSSL refuses to let it issue the certificate below it. Every worker handshake to the daemon will fail INVALID_PURPOSE or INVALID_CA even though the chain looks complete. Reissue that intermediate with CA:TRUE, or point NODE_EXTRA_CA_CERTS at a chain whose intermediates are real CAs, and restart.`)
3399
+ );
3400
+ } else if (anchorPath.pathLengthViolation) {
3401
+ const { cert, constraint } = anchorPath.pathLengthViolation;
3402
+ gaps.push(
3403
+ `--tls-cert "${opts.certPath}" chains through "${cert.subject.replace(/\r?\n/g, ", ")}", whose basicConstraints carries pathlen:${constraint} \u2014 it permits at most ${constraint} intermediate CA${constraint === 1 ? "" : "s"} below it, and this chain has more. Every worker handshake to the daemon will fail PATH_LENGTH_EXCEEDED even though every certificate in the bundle verifies. Reissue that CA with a pathlen that covers the chain, or shorten the chain, and restart.`
3404
+ );
3405
+ } else if (anchorPath.unheldSelfSignedLeaf) {
3406
+ gaps.push(
3407
+ `--tls-cert "${opts.certPath}" serves a self-signed certificate whose own PEM block is not one Node's NODE_EXTRA_CA_CERTS loader takes (a -----BEGIN TRUSTED CERTIFICATE----- block, as \`openssl x509 -trustout\` writes, is the usual cause), so the channel workers never receive that certificate \u2014 and a self-signed certificate verifies only when it is itself in the trust store. The daemon serves it fine, but every worker handshake will fail DEPTH_ZERO_SELF_SIGNED_CERT with nothing logged. Re-export --tls-cert with a plain -----BEGIN CERTIFICATE----- block and restart.`
3408
+ );
3409
+ } else if (!anchorPath.anchored) {
3410
+ gaps.push(
3411
+ `--tls-cert "${opts.certPath}" is issued by another CA (${x509.issuer.replace(/\r?\n/g, ", ")}), not self-signed, and ${!opts.operatorCaCertPath ? `no NODE_EXTRA_CA_CERTS is set` : opts.operatorCaCertReadError !== void 0 ? `NODE_EXTRA_CA_CERTS "${opts.operatorCaCertPath}" could not be read, so whatever it carries reached nobody` : operatorDiscarded ? `NODE_EXTRA_CA_CERTS "${opts.operatorCaCertPath}" was discarded together with the unloadable serving file above, whatever it carries` : `NODE_EXTRA_CA_CERTS "${opts.operatorCaCertPath}" does not carry a certificate that anchors it`}, so nothing in the channel workers' bundle anchors their trust \u2014 every worker handshake to the daemon will fail UNABLE_TO_VERIFY_LEAF_SIGNATURE unless the issuing CA is already in the workers' default trust store. ` + (operatorDiscarded ? `Re-export --tls-cert as described above and restart; NODE_EXTRA_CA_CERTS is not the file to change.` : opts.operatorCaCertReadError !== void 0 ? `Make NODE_EXTRA_CA_CERTS readable by the daemon as described above and restart.` : `Point NODE_EXTRA_CA_CERTS at the issuing CA (for mkcert: "$(mkcert -CAROOT)/rootCA.pem") and restart.`)
3412
+ );
3413
+ }
3414
+ const now = Date.now();
3415
+ for (const member of anchorPath.path) {
3416
+ if (member.fingerprint256 === x509.fingerprint256) continue;
3417
+ const subject = member.subject.replace(/\r?\n/g, ", ");
3418
+ if (member.keyUsage && !member.keyUsage.includes(TLS_SERVER_AUTH_OID)) {
3419
+ gaps.push(
3420
+ `--tls-cert "${opts.certPath}" chains through "${subject}", whose extendedKeyUsage does not include serverAuth \u2014 every worker handshake to the daemon will fail INVALID_PURPOSE. Reissue that chain member with serverAuth in its extendedKeyUsage and restart.`
3421
+ );
3422
+ continue;
3423
+ }
3424
+ if (new Date(member.validTo).getTime() < now) {
3425
+ gaps.push(
3426
+ `--tls-cert "${opts.certPath}" chains through "${subject}", which expired on ${member.validTo} \u2014 every worker handshake to the daemon will fail CERT_HAS_EXPIRED. Renew that chain member and restart.`
3427
+ );
3428
+ } else if (new Date(member.validFrom).getTime() > now) {
3429
+ gaps.push(
3430
+ `--tls-cert "${opts.certPath}" chains through "${subject}", which is not yet valid (validFrom: ${member.validFrom}) \u2014 every worker handshake to the daemon will fail CERT_NOT_YET_VALID. Check that chain member's notBefore date or the system clock.`
3431
+ );
3432
+ }
3433
+ }
3434
+ const host = workerDialHost(opts.daemonUrl);
3435
+ if (host && !certCoversHost(x509, host)) {
3436
+ gaps.push(
3437
+ `--tls-cert "${opts.certPath}" has no subjectAltName covering "${host}", the host channel workers dial \u2014 every worker handshake will fail ERR_TLS_CERT_ALTNAME_INVALID. Reissue the certificate with that host in its SANs and restart.`
3438
+ );
3439
+ }
3440
+ return gaps;
3441
+ }
3442
+ __name(describeWorkerTlsTrustGaps, "describeWorkerTlsTrustGaps");
3443
+ var BASIC_CONSTRAINTS_OID = Buffer.from([85, 29, 19]);
3444
+ var KEY_USAGE_OID = Buffer.from([85, 29, 15]);
3445
+ var KEY_CERT_SIGN_MASK = 4;
3446
+ var TLS_SERVER_KEY_USAGE_MASK = 168;
3447
+ var TLS_SERVER_AUTH_OID = "1.3.6.1.5.5.7.3.1";
3448
+ var VERSION_TAG = 160;
3449
+ var EXTENSIONS_TAG = 163;
3450
+ var SEQUENCE_TAG = 48;
3451
+ var BOOLEAN_TAG = 1;
3452
+ var INTEGER_TAG = 2;
3453
+ function derElementAt(der, at) {
3454
+ const tag = der[at];
3455
+ const header = der[at + 1];
3456
+ if (tag === void 0 || header === void 0) return void 0;
3457
+ let start = at + 2;
3458
+ let length = header & 127;
3459
+ if ((header & 128) !== 0) {
3460
+ if (length === 0 || length > 4) return void 0;
3461
+ let value = 0;
3462
+ for (let index = 0; index < length; index += 1) {
3463
+ const byte = der[start + index];
3464
+ if (byte === void 0) return void 0;
3465
+ value = value * 256 + byte;
3466
+ }
3467
+ start += length;
3468
+ length = value;
3469
+ }
3470
+ const end = start + length;
3471
+ return end <= der.length ? { tag, start, end } : void 0;
3472
+ }
3473
+ __name(derElementAt, "derElementAt");
3474
+ function tbsCertificateOf(cert) {
3475
+ const certificate = derElementAt(cert.raw, 0);
3476
+ if (certificate?.tag !== SEQUENCE_TAG) return void 0;
3477
+ const tbs = derElementAt(cert.raw, certificate.start);
3478
+ return tbs?.tag === SEQUENCE_TAG ? tbs : void 0;
3479
+ }
3480
+ __name(tbsCertificateOf, "tbsCertificateOf");
3481
+ function certificateExtension(cert, oid) {
3482
+ const der = cert.raw;
3483
+ const tbs = tbsCertificateOf(cert);
3484
+ if (!tbs) return void 0;
3485
+ let at = tbs.start;
3486
+ while (at < tbs.end) {
3487
+ const member = derElementAt(der, at);
3488
+ if (!member) return void 0;
3489
+ if (member.tag !== EXTENSIONS_TAG) {
3490
+ at = member.end;
3491
+ continue;
3492
+ }
3493
+ const list = derElementAt(der, member.start);
3494
+ if (list?.tag !== SEQUENCE_TAG) return void 0;
3495
+ let entry = list.start;
3496
+ while (entry < list.end) {
3497
+ const extension = derElementAt(der, entry);
3498
+ if (extension?.tag !== SEQUENCE_TAG) return void 0;
3499
+ const id = derElementAt(der, extension.start);
3500
+ if (!id) return void 0;
3501
+ let valueAt = id.end;
3502
+ const critical = derElementAt(der, valueAt);
3503
+ if (critical?.tag === BOOLEAN_TAG) valueAt = critical.end;
3504
+ const value = derElementAt(der, valueAt);
3505
+ if (!value) return void 0;
3506
+ if (der.subarray(id.start, id.end).equals(oid)) {
3507
+ return der.subarray(value.start, value.end);
3508
+ }
3509
+ entry = extension.end;
3510
+ }
3511
+ return void 0;
3512
+ }
3513
+ return void 0;
3514
+ }
3515
+ __name(certificateExtension, "certificateExtension");
3516
+ function keyUsageAllowsCertSign(der) {
3517
+ const bits = derElementAt(der, 0);
3518
+ if (!bits) return false;
3519
+ const first = der[bits.start + 1];
3520
+ return first !== void 0 && (first & KEY_CERT_SIGN_MASK) !== 0;
3521
+ }
3522
+ __name(keyUsageAllowsCertSign, "keyUsageAllowsCertSign");
3523
+ function tlsServerPurposeDefect(cert) {
3524
+ const keyUsage = certificateExtension(cert, KEY_USAGE_OID);
3525
+ if (keyUsage !== void 0) {
3526
+ const bits = derElementAt(keyUsage, 0);
3527
+ const first = bits ? keyUsage[bits.start + 1] : void 0;
3528
+ if (first === void 0 || (first & TLS_SERVER_KEY_USAGE_MASK) === 0) {
3529
+ return "its keyUsage permits none of digitalSignature, keyEncipherment, or keyAgreement";
3530
+ }
3531
+ }
3532
+ if (cert.keyUsage && !cert.keyUsage.includes(TLS_SERVER_AUTH_OID)) {
3533
+ return "its extendedKeyUsage does not include serverAuth";
3534
+ }
3535
+ return void 0;
3536
+ }
3537
+ __name(tlsServerPurposeDefect, "tlsServerPurposeDefect");
3538
+ function isV1Certificate(cert) {
3539
+ const tbs = tbsCertificateOf(cert);
3540
+ return tbs !== void 0 && cert.raw[tbs.start] !== VERSION_TAG;
3541
+ }
3542
+ __name(isV1Certificate, "isV1Certificate");
3543
+ function cannotIssueCertificates(cert) {
3544
+ const keyUsage = certificateExtension(cert, KEY_USAGE_OID);
3545
+ if (keyUsage !== void 0 && !keyUsageAllowsCertSign(keyUsage)) return true;
3546
+ if (certificateExtension(cert, BASIC_CONSTRAINTS_OID) !== void 0) {
3547
+ return !cert.ca;
3548
+ }
3549
+ return !isV1Certificate(cert) && keyUsage === void 0;
3550
+ }
3551
+ __name(cannotIssueCertificates, "cannotIssueCertificates");
3552
+ function isSelfSignedCert(x509) {
3553
+ if (x509.subject !== x509.issuer) return false;
3554
+ try {
3555
+ return x509.verify(x509.publicKey);
3556
+ } catch {
3557
+ return true;
3558
+ }
3559
+ }
3560
+ __name(isSelfSignedCert, "isSelfSignedCert");
3561
+ var PEM_CERTIFICATE_BLOCK = /-----BEGIN CERTIFICATE-----[^-]*-----END CERTIFICATE-----/g;
3562
+ function parseCertChain(cert) {
3563
+ const blocks = cert.toString("utf8").match(PEM_CERTIFICATE_BLOCK);
3564
+ if (!blocks) {
3565
+ try {
3566
+ return [new X509Certificate(cert)];
3567
+ } catch {
3568
+ return [];
3569
+ }
3570
+ }
3571
+ const chain = [];
3572
+ for (const block of blocks) {
3573
+ try {
3574
+ chain.push(new X509Certificate(block));
3575
+ } catch {
3576
+ }
3577
+ }
3578
+ return chain;
3579
+ }
3580
+ __name(parseCertChain, "parseCertChain");
3581
+ function bootParsedLeaf(cert) {
3582
+ try {
3583
+ return new X509Certificate(cert);
3584
+ } catch {
3585
+ return void 0;
3586
+ }
3587
+ }
3588
+ __name(bootParsedLeaf, "bootParsedLeaf");
3589
+ function certIssuedBy(cert, issuer) {
3590
+ try {
3591
+ return cert.issuer === issuer.subject && cert.verify(issuer.publicKey);
3592
+ } catch {
3593
+ return false;
3594
+ }
3595
+ }
3596
+ __name(certIssuedBy, "certIssuedBy");
3597
+ function issuerRefusedForKeyUsage(cert) {
3598
+ const keyUsage = certificateExtension(cert, KEY_USAGE_OID);
3599
+ return keyUsage !== void 0 && !keyUsageAllowsCertSign(keyUsage);
3600
+ }
3601
+ __name(issuerRefusedForKeyUsage, "issuerRefusedForKeyUsage");
3602
+ function pathLengthConstraint(cert) {
3603
+ const value = certificateExtension(cert, BASIC_CONSTRAINTS_OID);
3604
+ if (!value) return void 0;
3605
+ const sequence = derElementAt(value, 0);
3606
+ if (sequence?.tag !== SEQUENCE_TAG) return void 0;
3607
+ let at = sequence.start;
3608
+ const first = derElementAt(value, at);
3609
+ if (!first) return void 0;
3610
+ if (first.tag === BOOLEAN_TAG) at = first.end;
3611
+ const integer = derElementAt(value, at);
3612
+ if (integer?.tag !== INTEGER_TAG) return void 0;
3613
+ let length = 0;
3614
+ for (let index = integer.start; index < integer.end; index += 1) {
3615
+ const byte = value[index];
3616
+ if (byte === void 0) return void 0;
3617
+ length = length * 256 + byte;
3618
+ }
3619
+ return length;
3620
+ }
3621
+ __name(pathLengthConstraint, "pathLengthConstraint");
3622
+ function walkWorkerAnchorPath(leaf, chain, leafHeldByWorkers = true) {
3623
+ let next = leaf;
3624
+ const walked = /* @__PURE__ */ new Set();
3625
+ const path2 = [];
3626
+ let pathLengthViolation;
3627
+ while (next) {
3628
+ const current = next;
3629
+ path2.push(current);
3630
+ if (path2.length > 1 && pathLengthViolation === void 0) {
3631
+ const constraint = pathLengthConstraint(current);
3632
+ const intermediatesBelow = path2.length - 2;
3633
+ if (constraint !== void 0 && intermediatesBelow > constraint) {
3634
+ pathLengthViolation = { cert: current, constraint };
3635
+ }
3636
+ }
3637
+ if (isSelfSignedCert(current)) {
3638
+ if (path2.length > 1 && cannotIssueCertificates(current)) {
3639
+ return { anchored: false, path: path2, nonCaTerminator: current };
3640
+ }
3641
+ if (path2.length === 1 && !leafHeldByWorkers) {
3642
+ return { anchored: false, path: path2, unheldSelfSignedLeaf: current };
3643
+ }
3644
+ return pathLengthViolation ? { anchored: false, path: path2, pathLengthViolation } : { anchored: true, path: path2 };
3645
+ }
3646
+ walked.add(current.fingerprint256);
3647
+ const issuer = chain.find(
3648
+ (candidate) => !walked.has(candidate.fingerprint256) && certIssuedBy(current, candidate)
3649
+ );
3650
+ if (issuer && !isSelfSignedCert(issuer) && !issuer.ca) {
3651
+ return { anchored: false, path: path2, incapableIssuer: issuer };
3652
+ }
3653
+ next = issuer;
3654
+ }
3655
+ return pathLengthViolation ? { anchored: false, path: path2, pathLengthViolation } : { anchored: false, path: path2 };
3656
+ }
3657
+ __name(walkWorkerAnchorPath, "walkWorkerAnchorPath");
3658
+ function workerDialHost(daemonUrl) {
3659
+ try {
3660
+ const hostname = new URL(daemonUrl).hostname;
3661
+ if (!hostname) return void 0;
3662
+ return hostname.startsWith("[") && hostname.endsWith("]") ? hostname.slice(1, -1) : hostname;
3663
+ } catch {
3664
+ return void 0;
3665
+ }
3666
+ }
3667
+ __name(workerDialHost, "workerDialHost");
3668
+ function certCoversHost(x509, host) {
3669
+ try {
3670
+ return isIP(host) ? Boolean(x509.checkIP(host)) : Boolean(x509.checkHost(host));
3671
+ } catch {
3672
+ return true;
3673
+ }
3674
+ }
3675
+ __name(certCoversHost, "certCoversHost");
3284
3676
  function extractContextFilename(value) {
3285
3677
  if (typeof value === "string") {
3286
3678
  const trimmed = value.trim();
@@ -3346,12 +3738,12 @@ __name(hasRetryableChannelWorkerShutdownError, "hasRetryableChannelWorkerShutdow
3346
3738
  var channelWorkerRuntimePromise;
3347
3739
  async function loadChannelWorkerRuntime() {
3348
3740
  channelWorkerRuntimePromise ??= Promise.all([
3349
- import("./channel-worker-supervisor-F6I6WSWW.js"),
3350
- import("./pidfile-IO7ALSZF.js"),
3351
- import("./runtime-J4SPTJRQ.js"),
3741
+ import("./channel-worker-supervisor-FKU7DIHJ.js"),
3742
+ import("./pidfile-P25DWA5Q.js"),
3743
+ import("./runtime-RUSPD35D.js"),
3352
3744
  import("./cli-entry-path-4VJ3Y6T2.js"),
3353
- import("./channel-worker-group-BJNMR2MP.js"),
3354
- import("./channel-worker-manager-EMA7CQDJ.js")
3745
+ import("./channel-worker-group-6NA6BBZV.js"),
3746
+ import("./channel-worker-manager-NEZ2J6RK.js")
3355
3747
  ]).then(
3356
3748
  ([
3357
3749
  supervisor,
@@ -3362,6 +3754,7 @@ async function loadChannelWorkerRuntime() {
3362
3754
  workerManager
3363
3755
  ]) => ({
3364
3756
  createChannelWorkerSupervisor: supervisor.createChannelWorkerSupervisor,
3757
+ resolveWorkerCaCertPath: supervisor.resolveWorkerCaCertPath,
3365
3758
  channelServicePidfile: pidfile,
3366
3759
  loadChannelsConfig: channelRuntime.loadChannelsConfig,
3367
3760
  createChannelWorkerGroup: workerGroup.createChannelWorkerGroup,
@@ -3456,7 +3849,7 @@ function shouldPreheatBridge(deps) {
3456
3849
  __name(shouldPreheatBridge, "shouldPreheatBridge");
3457
3850
  var coreRuntimePromise;
3458
3851
  function loadCoreRuntime() {
3459
- coreRuntimePromise ??= import("./core-runtime-CES6JSVV.js");
3852
+ coreRuntimePromise ??= import("./core-runtime-XHYA2RH7.js");
3460
3853
  return coreRuntimePromise;
3461
3854
  }
3462
3855
  __name(loadCoreRuntime, "loadCoreRuntime");
@@ -3492,10 +3885,10 @@ __name(resolveDaemonLogBaseDirForRun, "resolveDaemonLogBaseDirForRun");
3492
3885
  var settingsRuntimePromise;
3493
3886
  function loadSettingsRuntimeModules() {
3494
3887
  settingsRuntimePromise ??= Promise.all([
3495
- import("./settings-35QZNFDG.js"),
3496
- import("./environment-WUPHLPKZ.js"),
3497
- import("./loadedSettingsAdapter-F3T2EQ5J.js"),
3498
- import("./trustedFolders-7XMJWGQ3.js")
3888
+ import("./settings-YXZ4XBKK.js"),
3889
+ import("./environment-CKWHBC5T.js"),
3890
+ import("./loadedSettingsAdapter-7JOCVOKV.js"),
3891
+ import("./trustedFolders-V6Y4CU3F.js")
3499
3892
  ]).then(([settings, environment, loadedSettingsAdapter, trustedFolders]) => ({
3500
3893
  settings,
3501
3894
  environment,
@@ -3508,8 +3901,8 @@ __name(loadSettingsRuntimeModules, "loadSettingsRuntimeModules");
3508
3901
  var channelWebhookConfigRuntimePromise;
3509
3902
  function loadChannelWebhookConfigRuntime() {
3510
3903
  channelWebhookConfigRuntimePromise ??= Promise.all([
3511
- import("./runtime-J4SPTJRQ.js"),
3512
- import("./config-utils-WZ43VOBS.js")
3904
+ import("./runtime-RUSPD35D.js"),
3905
+ import("./config-utils-JVGAP34H.js")
3513
3906
  ]).then(([channelRuntime, configUtils]) => ({
3514
3907
  loadChannelsConfig: channelRuntime.loadChannelsConfig,
3515
3908
  parseChannelWebhookConfig: configUtils.parseChannelWebhookConfig
@@ -3535,18 +3928,18 @@ async function loadServeRuntimeModules() {
3535
3928
  workspaceRegistryModule,
3536
3929
  promptLedgerModule
3537
3930
  ] = await Promise.all([
3538
- import("./server-74ONDK62.js"),
3539
- import("./bridge-EBYO4SYM.js"),
3540
- import("./spawnChannel-2K6NKWM5.js"),
3541
- import("./process-registry-PMJOA5CO.js"),
3542
- import("./workspace-service-LLY6HCUC.js"),
3931
+ import("./server-THCOMUC2.js"),
3932
+ import("./bridge-5LR2F2ND.js"),
3933
+ import("./spawnChannel-BPMIXRBI.js"),
3934
+ import("./process-registry-OAEG6WGC.js"),
3935
+ import("./workspace-service-7PXDM6EB.js"),
3543
3936
  import("./types-WYCFCEHR.js"),
3544
- import("./daemon-status-provider-EYMLPYJU.js"),
3545
- import("./workspace-providers-status-GPGU5YMT.js"),
3546
- import("./workspace-skills-status-L5N2Y3ZP.js"),
3547
- import("./total-session-admission-NSCFWGJH.js"),
3548
- import("./workspace-registry-BQISXT6Y.js"),
3549
- import("./prompt-terminal-ledger-TCE7PMCE.js")
3937
+ import("./daemon-status-provider-KKU7ZTLM.js"),
3938
+ import("./workspace-providers-status-525ORQBH.js"),
3939
+ import("./workspace-skills-status-FMJGC2XI.js"),
3940
+ import("./total-session-admission-PWXZBOVX.js"),
3941
+ import("./workspace-registry-HS4RWUSQ.js"),
3942
+ import("./prompt-terminal-ledger-AJ7T7OIV.js")
3550
3943
  ]);
3551
3944
  return {
3552
3945
  createServeApp: serverModule.createServeApp,
@@ -3591,7 +3984,7 @@ function sessionIdleTimeoutMs(value) {
3591
3984
  return value !== void 0 ? channelIdleTimeoutMs(value) : DEFAULT_SESSION_IDLE_TIMEOUT_MS;
3592
3985
  }
3593
3986
  __name(sessionIdleTimeoutMs, "sessionIdleTimeoutMs");
3594
- function currentServeFeaturesForRunQwenServe(opts, sessionShellCommandEnabled, sessionArtifactsPersistenceAvailable, env) {
3987
+ function currentServeFeaturesForRunQwenServe(opts, sessionShellCommandEnabled, sessionArtifactsPersistenceAvailable, currentSessionSchedulingAvailable, env) {
3595
3988
  return getAdvertisedServeFeatures(void 0, {
3596
3989
  requireAuth: opts.requireAuth === true,
3597
3990
  mcpPoolActive: opts.mcpPoolActive !== false,
@@ -3603,6 +3996,7 @@ function currentServeFeaturesForRunQwenServe(opts, sessionShellCommandEnabled, s
3603
3996
  sessionShellCommandEnabled,
3604
3997
  sessionArtifactsPersistenceAvailable,
3605
3998
  sessionGenerationAvailable: true,
3999
+ currentSessionSchedulingAvailable,
3606
4000
  workspaceGenerationAvailable: true,
3607
4001
  rateLimit: opts.rateLimit === true,
3608
4002
  reloadAvailable: true,
@@ -3629,6 +4023,7 @@ function createBootstrapCapabilities(input) {
3629
4023
  input.opts,
3630
4024
  input.sessionShellCommandEnabled,
3631
4025
  input.sessionArtifactsPersistenceAvailable,
4026
+ input.currentSessionSchedulingAvailable,
3632
4027
  input.env
3633
4028
  ),
3634
4029
  modelServices: [],
@@ -3744,12 +4139,12 @@ async function waitForRuntimeStartingForShutdown(runtimeStarting, daemonLog, tim
3744
4139
  let timer;
3745
4140
  await Promise.race([
3746
4141
  runtimeStarting,
3747
- new Promise((resolve4) => {
4142
+ new Promise((resolve3) => {
3748
4143
  timer = setTimeout(() => {
3749
4144
  daemonLog.warn(
3750
4145
  `${timeoutMs}ms runtime-startup wait reached during shutdown; continuing listener close`
3751
4146
  );
3752
- resolve4();
4147
+ resolve3();
3753
4148
  }, timeoutMs);
3754
4149
  timer.unref();
3755
4150
  })
@@ -3788,6 +4183,7 @@ function createBootstrapServeApp(input) {
3788
4183
  qwenCodeVersion,
3789
4184
  sessionShellCommandEnabled,
3790
4185
  sessionArtifactsPersistenceAvailable,
4186
+ currentSessionSchedulingAvailable,
3791
4187
  permissionPolicy,
3792
4188
  multiWorkspaceCapabilitiesRequireRuntime,
3793
4189
  getRuntimeError,
@@ -3847,6 +4243,7 @@ function createBootstrapServeApp(input) {
3847
4243
  qwenCodeVersion,
3848
4244
  sessionShellCommandEnabled,
3849
4245
  sessionArtifactsPersistenceAvailable,
4246
+ currentSessionSchedulingAvailable,
3850
4247
  permissionPolicy,
3851
4248
  env: process.env
3852
4249
  })
@@ -3964,6 +4361,7 @@ function createBootstrapServeApp(input) {
3964
4361
  opts,
3965
4362
  sessionShellCommandEnabled,
3966
4363
  sessionArtifactsPersistenceAvailable,
4364
+ currentSessionSchedulingAvailable,
3967
4365
  process.env
3968
4366
  )
3969
4367
  },
@@ -4160,8 +4558,8 @@ function matchesWebhookSecret(candidate, expected) {
4160
4558
  if (typeof candidate !== "string" || typeof expected !== "string" || expected.length === 0) {
4161
4559
  return false;
4162
4560
  }
4163
- const expectedDigest = createHash3("sha256").update(expected).digest();
4164
- const candidateDigest = createHash3("sha256").update(candidate).digest();
4561
+ const expectedDigest = createHash2("sha256").update(expected).digest();
4562
+ const candidateDigest = createHash2("sha256").update(candidate).digest();
4165
4563
  return timingSafeEqual(expectedDigest, candidateDigest);
4166
4564
  }
4167
4565
  __name(matchesWebhookSecret, "matchesWebhookSecret");
@@ -4302,8 +4700,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4302
4700
  loaderEnvScrub.release();
4303
4701
  }, "restoreScrubbedLoaderEnv");
4304
4702
  loggerLifecycle.scrubApplied(restoreScrubbedLoaderEnv);
4305
- const rawToken = optsIn.token ?? process.env[QWEN_SERVER_TOKEN_ENV];
4306
- const token = typeof rawToken === "string" && rawToken.trim().length > 0 ? rawToken.trim() : void 0;
4703
+ const token = resolveServeToken(optsIn.token);
4307
4704
  const channelDeliveryDiagnosticRedaction = {
4308
4705
  workerEnv: daemonRuntimeBaseEnv,
4309
4706
  ...token ? { daemonToken: token } : {}
@@ -4415,6 +4812,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4415
4812
  );
4416
4813
  }
4417
4814
  let tlsOptions;
4815
+ let tlsCertPath;
4418
4816
  if (opts.tlsCert && !opts.tlsKey || !opts.tlsCert && opts.tlsKey) {
4419
4817
  throw new Error(
4420
4818
  `--tls-cert and --tls-key must be provided together (got only --tls-${opts.tlsCert ? "cert" : "key"}).`
@@ -4457,6 +4855,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4457
4855
  );
4458
4856
  }
4459
4857
  tlsOptions = { cert, key };
4858
+ tlsCertPath = path.resolve(opts.tlsCert);
4460
4859
  }
4461
4860
  if (!isLoopbackBind(opts.hostname) && !token) {
4462
4861
  throw new Error(
@@ -4586,7 +4985,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4586
4985
  }
4587
4986
  let workspaceRegistrationStore = deps.workspaceRegistrationStore;
4588
4987
  if (workspaceRegistrationStore === void 0 && process.env["QWEN_SERVE_NO_PERSISTENT_REGISTRATION"] !== "1") {
4589
- const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-SU4EJKSD.js");
4988
+ const { WorkspaceRegistrationStore } = await import("./workspace-registration-store-7Y44R4LV.js");
4590
4989
  workspaceRegistrationStore = new WorkspaceRegistrationStore(boundWorkspace);
4591
4990
  }
4592
4991
  if (workspaceRegistrationStore) {
@@ -4870,7 +5269,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4870
5269
  "qwen serve: required external tool guard handshake succeeded."
4871
5270
  );
4872
5271
  }
4873
- const { createDaemonToolGuard } = await import("./daemon-git-worktree-guard-3QY2BQYB.js");
5272
+ const { createDaemonToolGuard } = await import("./daemon-git-worktree-guard-V3P5XLHB.js");
4874
5273
  const daemonToolGuardHandler = createDaemonToolGuard(
4875
5274
  externalToolGuardHandler
4876
5275
  );
@@ -4886,6 +5285,9 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4886
5285
  const diagnosticSink = /* @__PURE__ */ __name((line, level) => daemonLog.raw(line, level), "diagnosticSink");
4887
5286
  let actualPort = opts.port;
4888
5287
  const webShellDir = opts.serveWebShell === false ? void 0 : resolveWebShellDir();
5288
+ if (optsIn.requireWebShell && !webShellDir) {
5289
+ throw new Error("--open-with-auth requires built Web Shell assets.");
5290
+ }
4889
5291
  if (opts.serveWebShell !== false) {
4890
5292
  if (!webShellDir) {
4891
5293
  writeStderrLine(
@@ -4913,8 +5315,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4913
5315
  let resolveServeAppStartup;
4914
5316
  let rejectServeAppStartup;
4915
5317
  let serveAppStartupSettled = false;
4916
- const serveAppStartupReady = new Promise((resolve4, reject) => {
4917
- resolveServeAppStartup = resolve4;
5318
+ const serveAppStartupReady = new Promise((resolve3, reject) => {
5319
+ resolveServeAppStartup = resolve3;
4918
5320
  rejectServeAppStartup = reject;
4919
5321
  });
4920
5322
  void serveAppStartupReady.catch(() => void 0);
@@ -4936,6 +5338,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4936
5338
  const internalRuntimeBridgesForCleanup = [];
4937
5339
  let daemonEventLoopMonitor;
4938
5340
  let daemonMetricsSampler;
5341
+ let sessionPrRefreshTimer;
5342
+ let sessionPrRefreshGeneration = 0;
4939
5343
  let runtimeStartupError;
4940
5344
  let runtimeStarting;
4941
5345
  let markRuntimeReady;
@@ -4944,8 +5348,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4944
5348
  let startRuntimeAfterHealth;
4945
5349
  let startRuntimeForRequest;
4946
5350
  const deferRuntimeUntilFirstHealth = deps.resolveOnListen === true && deps.deferRuntimeUntilFirstHealth === true;
4947
- const runtimeReady = new Promise((resolve4, reject) => {
4948
- markRuntimeReady = resolve4;
5351
+ const runtimeReady = new Promise((resolve3, reject) => {
5352
+ markRuntimeReady = resolve3;
4949
5353
  markRuntimeFailed = reject;
4950
5354
  });
4951
5355
  void runtimeReady.catch(() => {
@@ -4955,6 +5359,10 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
4955
5359
  daemonEventLoopMonitor = void 0;
4956
5360
  const metricsSampler = daemonMetricsSampler;
4957
5361
  daemonMetricsSampler = void 0;
5362
+ const prRefreshTimer = sessionPrRefreshTimer;
5363
+ sessionPrRefreshTimer = void 0;
5364
+ sessionPrRefreshGeneration += 1;
5365
+ prRefreshTimer?.dispose();
4958
5366
  try {
4959
5367
  eventLoopMonitor?.dispose();
4960
5368
  } catch (err) {
@@ -5206,7 +5614,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5206
5614
  loadCoreRuntime(),
5207
5615
  loadSettingsRuntimeModules(),
5208
5616
  cliVersionPromise,
5209
- import("./daemon-trust-policy-CQYKZ7VO.js")
5617
+ import("./daemon-trust-policy-TZGK34DW.js")
5210
5618
  ]);
5211
5619
  cliVersion = resolvedCliVersion;
5212
5620
  settingsRuntime.environment.preResolveHomeEnvOverrides();
@@ -5582,7 +5990,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5582
5990
  resolveSkillSettings,
5583
5991
  skillSettingStrings,
5584
5992
  updateWorkspaceSkillSettingLists
5585
- } = await import("./skill-settings-TCKLXIXM.js");
5993
+ } = await import("./skill-settings-7SG4YA2W.js");
5586
5994
  const fresh = loadSettingsForPersistence(workspace);
5587
5995
  const normalizedName = skillName.trim().toLowerCase();
5588
5996
  const resolved = resolveSkillSettings(fresh);
@@ -5647,7 +6055,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5647
6055
  resolveSkillSettings,
5648
6056
  skillSettingStrings,
5649
6057
  updateWorkspaceSkillSettingLists
5650
- } = await import("./skill-settings-TCKLXIXM.js");
6058
+ } = await import("./skill-settings-7SG4YA2W.js");
5651
6059
  const fresh = loadSettingsForPersistence(workspace);
5652
6060
  const resolved = resolveSkillSettings(fresh);
5653
6061
  const initialDisabled = skillSettingStrings(
@@ -5752,7 +6160,43 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5752
6160
  );
5753
6161
  }
5754
6162
  }), "persistSettingsFn");
5755
- const { createSubSessionLauncher } = await import("./create-sub-session-UJTPMVOG.js");
6163
+ const [{ createSubSessionLauncher }, scheduledTaskRoutes] = await Promise.all([
6164
+ import("./create-sub-session-MHYCFNCM.js"),
6165
+ import("./scheduled-tasks-DVRJZO6I.js")
6166
+ ]);
6167
+ const createCurrentSessionScheduledTaskHandler = /* @__PURE__ */ __name((workspaceCwd, runtimeBaseDir, getBridge, assertGenerationOpen) => async ({
6168
+ callerSessionId,
6169
+ cron,
6170
+ prompt,
6171
+ recurring,
6172
+ assertCallerPromptActive
6173
+ }) => {
6174
+ const targetBridge = getBridge();
6175
+ if (!targetBridge) {
6176
+ throw new Error(
6177
+ "Current-session scheduling is unavailable while the workspace runtime is starting."
6178
+ );
6179
+ }
6180
+ const task = await scheduledTaskRoutes.createScheduledTaskWithExistingSession(
6181
+ {
6182
+ workspaceCwd,
6183
+ runtimeBaseDir,
6184
+ bridge: targetBridge,
6185
+ assertGenerationOpen,
6186
+ resolveLiveSessionOwner: /* @__PURE__ */ __name((sessionId) => workspaceRegistryForPersistence.current === void 0 ? { kind: "unavailable" } : workspaceRegistryForPersistence.current.resolveLiveSessionOwner(
6187
+ sessionId
6188
+ ), "resolveLiveSessionOwner")
6189
+ },
6190
+ {
6191
+ sessionId: callerSessionId,
6192
+ cron,
6193
+ prompt,
6194
+ recurring
6195
+ },
6196
+ { source: "cron-tool", assertCallerPromptActive }
6197
+ );
6198
+ return { id: task.id, cron: task.cron };
6199
+ }, "createCurrentSessionScheduledTaskHandler");
5756
6200
  const subSessionLauncher = createSubSessionLauncher({
5757
6201
  getBridge: /* @__PURE__ */ __name(() => bridgeRef, "getBridge"),
5758
6202
  boundWorkspace,
@@ -5769,6 +6213,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
5769
6213
  // connection that hosts a named client MCP server (#5626).
5770
6214
  clientMcpSender: clientMcpSenderRegistry.lookup,
5771
6215
  onCreateSubSession: subSessionLauncher.launch,
6216
+ onCreateCurrentSessionScheduledTask: createCurrentSessionScheduledTaskHandler(
6217
+ boundWorkspace,
6218
+ primarySessionRuntimeBaseDir,
6219
+ () => bridgeRef,
6220
+ () => primaryGenerationGuard.assertOpen()
6221
+ ),
5772
6222
  onChannelDelivery: createBoundChannelDeliveryHandler(
5773
6223
  boundWorkspace,
5774
6224
  () => channelWorkerManager,
@@ -6004,6 +6454,27 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6004
6454
  }
6005
6455
  };
6006
6456
  }, "createRuntimeEnvMetadata");
6457
+ const readLiveConversationScheduledTasks = /* @__PURE__ */ __name(async () => {
6458
+ if (!fs.existsSync(liveConversationWorkspace.rootPath)) return [];
6459
+ const { canonicalRoot } = await liveConversationWorkspace.revalidate();
6460
+ let settings;
6461
+ try {
6462
+ settings = settingsRuntime.settings.loadSettings(canonicalRoot, {
6463
+ skipLoadEnvironment: true,
6464
+ skipWorkspaceSettings: false,
6465
+ workspaceTrusted: true
6466
+ });
6467
+ } catch (err) {
6468
+ writeStderrLine(
6469
+ `qwen serve: could not read full settings for Conversations (${err instanceof Error ? err.message : String(err)}); falling back to defaults.`
6470
+ );
6471
+ }
6472
+ const env = createRuntimeEnvMetadata(canonicalRoot, settings, true);
6473
+ return core.Storage.runWithResolvedRuntimeBaseDir(
6474
+ env.sessionRuntimeBaseDir,
6475
+ () => core.readCronTasks(canonicalRoot)
6476
+ );
6477
+ }, "readLiveConversationScheduledTasks");
6007
6478
  const subSessionStoppers = [];
6008
6479
  const subSessionStoppersByRuntime = /* @__PURE__ */ new WeakMap();
6009
6480
  const runtimeCleanupPromises = /* @__PURE__ */ new WeakMap();
@@ -6093,6 +6564,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6093
6564
  ),
6094
6565
  clientMcpSender: secondaryClientMcpSenderRegistry.lookup,
6095
6566
  onCreateSubSession: secondarySubSessionLauncher.launch,
6567
+ onCreateCurrentSessionScheduledTask: createCurrentSessionScheduledTaskHandler(
6568
+ workspaceInput.cwd,
6569
+ secondaryEnv.sessionRuntimeBaseDir,
6570
+ () => secondaryBridgeRef,
6571
+ () => secondaryGenerationGuard.assertOpen()
6572
+ ),
6096
6573
  onChannelDelivery: createBoundChannelDeliveryHandler(
6097
6574
  workspaceInput.cwd,
6098
6575
  () => channelWorkerManager,
@@ -6381,6 +6858,22 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6381
6858
  metricsLoopDelay.disable();
6382
6859
  }
6383
6860
  };
6861
+ sessionPrRefreshTimer?.dispose();
6862
+ const refreshGeneration = ++sessionPrRefreshGeneration;
6863
+ void import("./session-pr-refresh-KRBH7KDA.js").then((mod) => {
6864
+ if (refreshGeneration !== sessionPrRefreshGeneration) return;
6865
+ sessionPrRefreshTimer = mod.startSessionPrRefreshTimer({
6866
+ workspaceRegistry,
6867
+ // The coordinator lives on the serve app (createServeApp below),
6868
+ // which is built after this timer starts; read it per tick like
6869
+ // the metrics sampler reads `acpHandle`.
6870
+ getArchiveCoordinator: /* @__PURE__ */ __name(() => app2.locals.sessionArchiveCoordinator, "getArchiveCoordinator")
6871
+ });
6872
+ }).catch((error) => {
6873
+ daemonLog.warn(
6874
+ `session-pr-refresh load failed: ${error instanceof Error ? error.message : String(error)}`
6875
+ );
6876
+ });
6384
6877
  const createDynamicWorkspaceRuntime = /* @__PURE__ */ __name(async (cwd, buildOptions) => {
6385
6878
  const provenance = buildOptions?.provenance ?? "existing";
6386
6879
  if (provenance === "managed-scratch" && (!managedScratchRoot || !isManagedScratchChild(cwd, managedScratchRoot.canonicalRoot))) {
@@ -6452,6 +6945,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6452
6945
  boundWorkspace: cwd,
6453
6946
  ...provenance === "live-conversation" ? {
6454
6947
  notifySentCompletion: true,
6948
+ getStandaloneSessionService: /* @__PURE__ */ __name(() => (runtimeApp ?? runtimeAppForCleanup)?.locals?.["standaloneSessionService"], "getStandaloneSessionService"),
6455
6949
  isolatedWorkspace: {
6456
6950
  materializeDirectory: /* @__PURE__ */ __name((sessionId) => liveConversationWorkspace.materializeConversationDirectory(
6457
6951
  sessionId
@@ -6474,6 +6968,12 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6474
6968
  ),
6475
6969
  clientMcpSender: wsClientMcpRegistry.lookup,
6476
6970
  onCreateSubSession: wsSubSessionLauncher.launch,
6971
+ onCreateCurrentSessionScheduledTask: createCurrentSessionScheduledTaskHandler(
6972
+ cwd,
6973
+ wsEnv.sessionRuntimeBaseDir,
6974
+ () => wsBridgeRef,
6975
+ () => generationGuard.assertOpen()
6976
+ ),
6477
6977
  onChannelDelivery: createBoundChannelDeliveryHandler(
6478
6978
  cwd,
6479
6979
  () => channelWorkerManager,
@@ -6711,6 +7211,9 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6711
7211
  const serveAppForRuntimeLifecycle = { current: void 0 };
6712
7212
  const workspaceRuntimeRemoval = {
6713
7213
  async runtimeAdded(runtimeAdded) {
7214
+ const app3 = serveAppForRuntimeLifecycle.current ?? runtimeApp ?? runtimeAppForCleanup;
7215
+ const startScheduledTaskKeepaliveForWorkspace = app3?.locals?.["startScheduledTaskKeepaliveForWorkspace"];
7216
+ startScheduledTaskKeepaliveForWorkspace?.(runtimeAdded);
6714
7217
  if (runtimeAdded.provenance === "live-conversation") return;
6715
7218
  channelWebhookEnvByWorkspace.set(
6716
7219
  runtimeAdded.workspaceCwd,
@@ -6718,9 +7221,6 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6718
7221
  );
6719
7222
  channelWebhookConfigVersion += 1;
6720
7223
  refreshChannelWebhookConfigs?.();
6721
- const app3 = serveAppForRuntimeLifecycle.current ?? runtimeApp ?? runtimeAppForCleanup;
6722
- const startScheduledTaskKeepaliveForWorkspace = app3?.locals?.["startScheduledTaskKeepaliveForWorkspace"];
6723
- startScheduledTaskKeepaliveForWorkspace?.(runtimeAdded);
6724
7224
  if (!channelWorkerManager) return;
6725
7225
  try {
6726
7226
  if (runtimeAdded.trusted) {
@@ -6960,8 +7460,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
6960
7460
  { createChannelManagementService },
6961
7461
  { WorkspaceChannelSettingsStore }
6962
7462
  ] = await Promise.all([
6963
- import("./channel-management-service-IRTT7RNE.js"),
6964
- import("./channel-settings-store-5VP2Y2YM.js")
7463
+ import("./channel-management-service-KHR3N6CH.js"),
7464
+ import("./channel-settings-store-4FOAZW72.js")
6965
7465
  ]);
6966
7466
  return createChannelManagementService({
6967
7467
  workspaceCwd: targetRuntime.workspaceCwd,
@@ -7027,6 +7527,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7027
7527
  } : {},
7028
7528
  managedScratchRoot,
7029
7529
  liveConversationWorkspace,
7530
+ readLiveConversationScheduledTasks,
7030
7531
  workspaceRegistrationStore,
7031
7532
  workspaceRuntimeRemoval,
7032
7533
  workspaceTrustHotReloadAvailable,
@@ -7040,6 +7541,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7040
7541
  // (keepalive) and reloads them on boot (rehydration). Off by default so
7041
7542
  // direct createServeApp embeds/tests don't spawn sessions.
7042
7543
  manageScheduledTaskSessions: true,
7544
+ currentSessionSchedulingAvailable: deps.bridge === void 0,
7043
7545
  fsFactory: routeFsFactory,
7044
7546
  primaryWorkspaceTrusted: trustedWorkspace,
7045
7547
  primaryRuntimeEnv,
@@ -7164,8 +7666,8 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7164
7666
  { createWorkspaceTrustReconciler },
7165
7667
  { createDaemonTrustPolicyMonitor }
7166
7668
  ] = await Promise.all([
7167
- import("./workspace-trust-reconciler-4Y4F7XIX.js"),
7168
- import("./daemon-trust-policy-monitor-TK4K7M63.js")
7669
+ import("./workspace-trust-reconciler-3YTWSQBY.js"),
7670
+ import("./daemon-trust-policy-monitor-F23DD2M4.js")
7169
7671
  ]);
7170
7672
  const materializationFor = /* @__PURE__ */ __name((entry, snapshot, decision) => {
7171
7673
  const boundWorkspaces2 = entry.primary && decision.targetTrusted ? runtime.resolveBoundWorkspacesFromIdeEnv(
@@ -7260,7 +7762,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7260
7762
  handle?.disposeWorkspace(runtimeToDispose.workspaceId);
7261
7763
  const deadline = Date.now() + 1e3;
7262
7764
  while ((handle?.getWorkspaceActivity(runtimeToDispose.workspaceId).memoryTasks ?? 0) > 0 && Date.now() < deadline) {
7263
- await new Promise((resolve4) => setTimeout(resolve4, 25));
7765
+ await new Promise((resolve3) => setTimeout(resolve3, 25));
7264
7766
  }
7265
7767
  if ((handle?.getWorkspaceActivity(runtimeToDispose.workspaceId).memoryTasks ?? 0) > 0) {
7266
7768
  throw new Error(
@@ -7337,6 +7839,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7337
7839
  qwenCodeVersion: cliVersion,
7338
7840
  sessionShellCommandEnabled,
7339
7841
  sessionArtifactsPersistenceAvailable,
7842
+ currentSessionSchedulingAvailable: false,
7340
7843
  permissionPolicy,
7341
7844
  multiWorkspaceCapabilitiesRequireRuntime: workspaceInputs.length > 1,
7342
7845
  getRuntimeError: /* @__PURE__ */ __name(() => runtimeStartupError, "getRuntimeError"),
@@ -7360,7 +7863,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7360
7863
  // through (and start the runtime) exactly like the warm app would.
7361
7864
  // Dynamic import keeps web-shell-static out of the serve fast-path
7362
7865
  // static closure (see the import-boundary guards in fast-path.test.ts).
7363
- isPreAuthRequest: webShellMounted ? (req) => import("./web-shell-static-3NUTRHAH.js").then(
7866
+ isPreAuthRequest: webShellMounted ? (req) => import("./web-shell-static-A6QMUNNV.js").then(
7364
7867
  (webShellStatic) => webShellStatic.isPreAuthWebShellRequest(req)
7365
7868
  ) : void 0
7366
7869
  });
@@ -7380,7 +7883,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7380
7883
  );
7381
7884
  }
7382
7885
  const channelValidationSettingsRuntime = opts.channelSelection ? await loadSettingsRuntimeModules() : void 0;
7383
- const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-CQYKZ7VO.js") : void 0;
7886
+ const channelValidationTrustPolicy = opts.channelSelection ? await import("./daemon-trust-policy-TZGK34DW.js") : void 0;
7384
7887
  const channelValidationTrustSnapshot = channelValidationTrustPolicy ? await channelValidationTrustPolicy.readDaemonTrustPolicySnapshot() : void 0;
7385
7888
  const resolveChannelWorkspaceGroupsAtListen = /* @__PURE__ */ __name(() => {
7386
7889
  if (!opts.channelSelection || !channelValidationSettingsRuntime || !channelRuntime) {
@@ -7486,7 +7989,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7486
7989
  if (opts.channelSelection) {
7487
7990
  reserveChannelServicePidfile(opts.channelSelection);
7488
7991
  }
7489
- return await new Promise((resolve4, reject) => {
7992
+ return await new Promise((resolve3, reject) => {
7490
7993
  let closeHost;
7491
7994
  const onListening = /* @__PURE__ */ __name((error) => {
7492
7995
  if (error) return;
@@ -7933,6 +8436,69 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7933
8436
  );
7934
8437
  }
7935
8438
  const workerRuntime = await ensureChannelRuntime();
8439
+ const workerDaemonUrl = formatChannelWorkerDaemonUrl(
8440
+ opts.hostname,
8441
+ actualPort,
8442
+ tlsOptions !== void 0
8443
+ );
8444
+ if (tlsOptions && tlsCertPath && process.env["NODE_TLS_REJECT_UNAUTHORIZED"] === "0") {
8445
+ daemonLog.warn(
8446
+ `NODE_TLS_REJECT_UNAUTHORIZED=0 disables certificate verification for channel workers; skipping the worker TLS trust check.`
8447
+ );
8448
+ } else if (tlsOptions && tlsCertPath) {
8449
+ const operatorCaCertPath = process.env["NODE_EXTRA_CA_CERTS"];
8450
+ let operatorCaCert;
8451
+ let operatorCaCertReadError;
8452
+ if (operatorCaCertPath) {
8453
+ try {
8454
+ operatorCaCert = fs.readFileSync(operatorCaCertPath);
8455
+ } catch (error2) {
8456
+ operatorCaCertReadError = error2?.code ?? "read failed";
8457
+ }
8458
+ }
8459
+ let predictedGaps = [];
8460
+ try {
8461
+ predictedGaps = describeWorkerTlsTrustGaps({
8462
+ cert: tlsOptions.cert,
8463
+ certPath: tlsCertPath,
8464
+ certSourcePath: tlsCertPath,
8465
+ daemonUrl: workerDaemonUrl,
8466
+ ...operatorCaCertPath ? { operatorCaCertPath } : {},
8467
+ ...operatorCaCert ? {
8468
+ operatorCaCert,
8469
+ operatorCaCertSourcePath: operatorCaCertPath
8470
+ } : {},
8471
+ ...operatorCaCertReadError ? { operatorCaCertReadError } : {}
8472
+ });
8473
+ } catch (error2) {
8474
+ if (!(error2 instanceof ExtraCaInspectionError)) throw error2;
8475
+ daemonLog.warn(
8476
+ `Channel worker TLS trust-gap inspection could not run: ${error2.message} Continuing with the live handshake probe only.`
8477
+ );
8478
+ }
8479
+ const workerCaCertPath = workerRuntime.resolveWorkerCaCertPath(
8480
+ tlsCertPath,
8481
+ operatorCaCertPath
8482
+ );
8483
+ const trustFailure = await (deps.workerTlsTrustVerifier ?? verifyWorkerTlsTrust)({
8484
+ daemonUrl: workerDaemonUrl,
8485
+ caCertPath: workerCaCertPath
8486
+ });
8487
+ if (shuttingDown || runtimeStartupError !== void 0) {
8488
+ throw new Error(
8489
+ "Daemon stopped while the channel worker TLS trust check was running."
8490
+ );
8491
+ }
8492
+ if (trustFailure) {
8493
+ if (predictedGaps.length > 0) {
8494
+ for (const gap of predictedGaps) daemonLog.warn(gap);
8495
+ } else {
8496
+ daemonLog.warn(
8497
+ `Channel worker TLS verification failed against the exact CA bundle workers receive (${sanitizeLogText(normalizeWorkerDiagnostic(trustFailure.code), 80)}): ${sanitizeLogText(normalizeWorkerDiagnostic(trustFailure.message), 300)}`
8498
+ );
8499
+ }
8500
+ }
8501
+ }
7936
8502
  const createSupervisor = deps.channelWorkerSupervisorFactory ?? workerRuntime.createChannelWorkerSupervisor;
7937
8503
  const createGroup = /* @__PURE__ */ __name((groups) => workerRuntime.createChannelWorkerGroup({
7938
8504
  groups,
@@ -7940,11 +8506,9 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
7940
8506
  createSupervisor,
7941
8507
  shared: {
7942
8508
  cliEntryPath: workerRuntime.findCliEntryPath(),
7943
- daemonUrl: formatChannelWorkerDaemonUrl(
7944
- opts.hostname,
7945
- actualPort
7946
- ),
7947
- ...token ? { daemonToken: token } : {}
8509
+ daemonUrl: workerDaemonUrl,
8510
+ ...token ? { daemonToken: token } : {},
8511
+ ...tlsCertPath ? { workerTlsCaCertPath: tlsCertPath } : {}
7948
8512
  },
7949
8513
  onReady: /* @__PURE__ */ __name((snapshot) => {
7950
8514
  if (runtimeStartupError !== void 0) return;
@@ -8207,6 +8771,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8207
8771
  if (!preserveSignalHandlers) {
8208
8772
  process.removeListener("SIGINT", onSignal);
8209
8773
  process.removeListener("SIGTERM", onSignal);
8774
+ process.removeListener("SIGHUP", onSignal);
8210
8775
  }
8211
8776
  process.removeListener(
8212
8777
  "uncaughtExceptionMonitor",
@@ -8426,6 +8991,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8426
8991
  }
8427
8992
  process.on("SIGINT", onSignal);
8428
8993
  process.on("SIGTERM", onSignal);
8994
+ process.on("SIGHUP", onSignal);
8429
8995
  process.on("uncaughtExceptionMonitor", onUncaughtExceptionMonitor);
8430
8996
  server.on("error", (err) => {
8431
8997
  daemonLog.error("server error", err instanceof Error ? err : null);
@@ -8456,7 +9022,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8456
9022
  loggerPublished = true;
8457
9023
  loggerLifecycle.published();
8458
9024
  void (liveDiscoveryPublish ?? Promise.resolve()).then(
8459
- () => resolve4(handle)
9025
+ () => resolve3(handle)
8460
9026
  );
8461
9027
  } else {
8462
9028
  void runtimeReady.then(
@@ -8464,7 +9030,7 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8464
9030
  await liveDiscoveryPublish;
8465
9031
  loggerPublished = true;
8466
9032
  loggerLifecycle.published();
8467
- resolve4(handle);
9033
+ resolve3(handle);
8468
9034
  },
8469
9035
  (err) => {
8470
9036
  void handle.close().then(
@@ -8513,10 +9079,10 @@ async function runQwenServeImpl(optsIn, deps, loggerLifecycle) {
8513
9079
  drainHost: /* @__PURE__ */ __name(() => {
8514
9080
  if (closeHost) return closeHost();
8515
9081
  if (!server.listening) return Promise.resolve();
8516
- return new Promise((resolve5, rejectClose) => {
9082
+ return new Promise((resolve4, rejectClose) => {
8517
9083
  server.close((error) => {
8518
9084
  if (error) rejectClose(error);
8519
- else resolve5();
9085
+ else resolve4();
8520
9086
  });
8521
9087
  });
8522
9088
  }, "drainHost")
@@ -8578,6 +9144,7 @@ export {
8578
9144
  createBoundChannelDeliveryHandler,
8579
9145
  createDisabledChannelWorkerSupervisor,
8580
9146
  createLazyBridgeProxy,
9147
+ describeWorkerTlsTrustGaps,
8581
9148
  extractContextFilename,
8582
9149
  formatChannelWorkerDaemonUrl,
8583
9150
  resolveRuntimeStartupTimeoutMs,
@@ -8585,6 +9152,7 @@ export {
8585
9152
  subSessionConcurrencyCapsFromSettings,
8586
9153
  validateAndCanonicalizeWorkspaceInput,
8587
9154
  validatePolicyConfig,
9155
+ verifyWorkerTlsTrust,
8588
9156
  waitForRuntimeStartingForShutdown
8589
9157
  };
8590
9158
  /**