@qwen-code/qwen-code 0.21.7 → 0.21.8-nightly.20260810.55e20db328

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 (334) hide show
  1. package/README.md +2 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +73 -59
  3. package/bundled/qc-helper/docs/extension/introduction.md +15 -1
  4. package/bundled/qc-helper/docs/features/channels/dingtalk.md +40 -2
  5. package/bundled/qc-helper/docs/features/channels/feishu.md +13 -2
  6. package/bundled/qc-helper/docs/features/channels/github.md +13 -11
  7. package/bundled/qc-helper/docs/features/channels/gitlab.md +13 -11
  8. package/bundled/qc-helper/docs/features/channels/overview.md +49 -31
  9. package/bundled/qc-helper/docs/features/channels/plugins.md +2 -2
  10. package/bundled/qc-helper/docs/features/channels/qqbot.md +4 -2
  11. package/bundled/qc-helper/docs/features/channels/telegram.md +4 -2
  12. package/bundled/qc-helper/docs/features/channels/wecom.md +1 -1
  13. package/bundled/qc-helper/docs/features/code-review.md +4 -0
  14. package/bundled/qc-helper/docs/features/commands.md +1 -1
  15. package/bundled/qc-helper/docs/features/hooks.md +52 -0
  16. package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
  17. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
  18. package/bundled/qc-helper/docs/qwen-serve.md +10 -5
  19. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -36
  20. package/bundled/review/SKILL.md +32 -5
  21. package/chunks/{MaxSizedBox-ANWZBPTS.js → MaxSizedBox-A52T4GEU.js} +29 -25
  22. package/chunks/{StandaloneSessionPicker-XKS3VU3A.js → StandaloneSessionPicker-4J654SOB.js} +48 -44
  23. package/chunks/{acp-startup-profiler-ORIQ2CCQ.js → acp-startup-profiler-B5BYAMYQ.js} +2 -2
  24. package/chunks/{acpAgent-KUAZ3GCZ.js → acpAgent-65AM4AOR.js} +1833 -843
  25. package/chunks/{agent-T6PTGX5R.js → agent-SVQ7U7NJ.js} +28 -24
  26. package/chunks/{agent-headless-PR7YCB7S.js → agent-headless-XXGY2SQO.js} +28 -24
  27. package/chunks/{artifact-tool-U4VOZIK5.js → artifact-tool-N652YE4L.js} +1 -1
  28. package/chunks/{askUserQuestion-XOBQLPFA.js → askUserQuestion-ONW74PKJ.js} +1 -1
  29. package/chunks/{bridge-NU6YEEHK.js → bridge-Y32B5S3G.js} +34 -30
  30. package/chunks/{ca-NYKNH222.js → ca-ZLKAB4K3.js} +6 -0
  31. package/chunks/{channel-management-service-FSQ7SHYI.js → channel-management-service-PHELKOW2.js} +19 -10
  32. package/chunks/{channel-settings-store-35VQVUVV.js → channel-settings-store-OW43U6VB.js} +36 -32
  33. package/chunks/{channel-worker-group-JWQK224X.js → channel-worker-group-MSHT6CWR.js} +7 -7
  34. package/chunks/{channel-worker-manager-77E3OXRQ.js → channel-worker-manager-XXD3GDSK.js} +7 -7
  35. package/chunks/{channel-worker-supervisor-62YWUGP2.js → channel-worker-supervisor-IVSDIMI4.js} +4 -4
  36. package/chunks/{chunk-HYRDKNUY.js → chunk-2545EHZR.js} +1 -1
  37. package/chunks/{chunk-SPMY6CX6.js → chunk-2ASQDZSJ.js} +3 -3
  38. package/chunks/{chunk-CJXIIILK.js → chunk-2FRY5CRX.js} +1 -1
  39. package/chunks/{chunk-CNIID3TV.js → chunk-2UUMVNYT.js} +1 -1
  40. package/chunks/{chunk-KXSDEOFU.js → chunk-3KJQZEN3.js} +1 -1
  41. package/chunks/{chunk-22NBYCPD.js → chunk-3P2LV43B.js} +1 -1
  42. package/chunks/{chunk-Y7E5LNLO.js → chunk-47ZUMGGY.js} +2634 -2114
  43. package/chunks/{chunk-LA7YLSR6.js → chunk-4EOURKA4.js} +839 -153
  44. package/chunks/chunk-4JRM2BSM.js +48 -0
  45. package/chunks/{chunk-BGG4MBYD.js → chunk-4PYCZH2V.js} +4 -187
  46. package/chunks/{chunk-L4N6TIP7.js → chunk-4TRQPFDP.js} +4 -2
  47. package/chunks/{chunk-6XJMFJ4D.js → chunk-5WZL724W.js} +177 -120
  48. package/chunks/{chunk-23RZCH76.js → chunk-5ZTS3OQ3.js} +3 -3
  49. package/chunks/{chunk-VWOVHOTT.js → chunk-67EWJE77.js} +1 -1
  50. package/chunks/{chunk-3K7FH2KQ.js → chunk-67N6HB5H.js} +1310 -171
  51. package/chunks/{chunk-CXE7E23H.js → chunk-6Q5ABMTU.js} +45 -17
  52. package/chunks/{chunk-NG2R4N5O.js → chunk-6ZRFAKXK.js} +1 -1
  53. package/chunks/{chunk-RERATVSK.js → chunk-7XX5IBXL.js} +145 -10
  54. package/chunks/{chunk-S7CV4KO6.js → chunk-AKJQSWV4.js} +4 -4
  55. package/chunks/{chunk-5KH532V7.js → chunk-AUWN7BAG.js} +1 -1
  56. package/chunks/{chunk-DBOFL3LQ.js → chunk-BL65MO72.js} +10 -10
  57. package/chunks/{chunk-AKA24BGO.js → chunk-BT6GQIEJ.js} +1 -1
  58. package/chunks/{chunk-W7U4ESW2.js → chunk-CG3WBKJK.js} +1 -1
  59. package/chunks/{chunk-2M5N3DHY.js → chunk-CMOBWHWW.js} +1 -1
  60. package/chunks/chunk-COBO5EBO.js +135 -0
  61. package/chunks/chunk-CPG6P4GG.js +82 -0
  62. package/chunks/{chunk-3NB7TSE2.js → chunk-D2D7J3EW.js} +1 -1
  63. package/chunks/{chunk-NLREQJFK.js → chunk-DA4HRSBW.js} +15 -0
  64. package/chunks/{chunk-RNVQB725.js → chunk-DPMJLKUP.js} +2 -2
  65. package/chunks/{chunk-DIEFUBV6.js → chunk-DX3RGJMS.js} +218 -37
  66. package/chunks/{chunk-33ACCIIY.js → chunk-DZUO626D.js} +1 -1
  67. package/chunks/chunk-E2FPSSKP.js +244 -0
  68. package/chunks/{chunk-72LNFGUY.js → chunk-E2N554HK.js} +3 -3
  69. package/chunks/{chunk-6EOI4HOK.js → chunk-E2T7FLDU.js} +12 -17
  70. package/chunks/{chunk-EUQTXRKZ.js → chunk-EISUQQPS.js} +6 -6
  71. package/chunks/{chunk-H2UQ2M5Z.js → chunk-EUVOKP6Y.js} +96 -22
  72. package/chunks/{chunk-RMH5OWLD.js → chunk-F3II4BTZ.js} +1 -1
  73. package/chunks/{chunk-P3LEG54R.js → chunk-F6TUUA2U.js} +3 -3
  74. package/chunks/chunk-F6WFNA7U.js +22 -0
  75. package/chunks/{chunk-RZHU3ILK.js → chunk-FAD7OC7V.js} +4 -4
  76. package/chunks/{chunk-OMKQH5C5.js → chunk-FWWQIFDT.js} +6 -23
  77. package/chunks/{chunk-TLV2IMHR.js → chunk-FYB4GIDW.js} +3 -3
  78. package/chunks/{chunk-ZJ3VGYHK.js → chunk-GY24H6IA.js} +40 -22
  79. package/chunks/{chunk-P2AJ7FTI.js → chunk-H4JC7LZX.js} +1 -1
  80. package/chunks/{chunk-55LYDVPU.js → chunk-HDYQYYWB.js} +1 -1
  81. package/chunks/{chunk-PQBHU2IA.js → chunk-HKI3KHAO.js} +11 -11
  82. package/chunks/{chunk-Y4NGLFGJ.js → chunk-HUWENAHO.js} +1 -1
  83. package/chunks/{chunk-3ULCB3NE.js → chunk-HV76SFIA.js} +1 -1
  84. package/chunks/{chunk-CSZEXZBE.js → chunk-HWXGX534.js} +3 -3
  85. package/chunks/{chunk-E33LOKRA.js → chunk-I5VM3SKY.js} +22 -5
  86. package/chunks/{chunk-LZC3B5N2.js → chunk-IA7TGCN2.js} +2 -2
  87. package/chunks/{chunk-RGSBTHSU.js → chunk-KMS57JDD.js} +137 -7
  88. package/chunks/{chunk-VOARQPTA.js → chunk-KP25NJNM.js} +65 -21
  89. package/chunks/{chunk-6M26GBKX.js → chunk-L2AFWWJE.js} +42 -3
  90. package/chunks/{chunk-ZXU5UHMI.js → chunk-LHEC5V6G.js} +2 -2
  91. package/chunks/{chunk-J26HHFI5.js → chunk-LP2QGNSP.js} +32 -2
  92. package/chunks/{chunk-R574ATRM.js → chunk-M2PNLYGY.js} +41 -0
  93. package/chunks/{chunk-MKVZE4ZJ.js → chunk-MFDYOYZZ.js} +3 -2
  94. package/chunks/{chunk-ALGGS7UH.js → chunk-NPQ5ZKRP.js} +82 -1
  95. package/chunks/{chunk-YHEEE624.js → chunk-NV3F44FL.js} +7 -3
  96. package/chunks/{chunk-6GONZVLS.js → chunk-NZMXUSKS.js} +1 -1
  97. package/chunks/{chunk-HQB2KUAN.js → chunk-O277O7U6.js} +1 -1
  98. package/chunks/{chunk-Y4EWSQF7.js → chunk-OBP6QWD5.js} +2 -2
  99. package/chunks/{chunk-CYR3HI5X.js → chunk-OQTXYMKW.js} +2 -2
  100. package/chunks/{chunk-TYKC75AX.js → chunk-OR6R3IUW.js} +2 -2
  101. package/chunks/{chunk-TRLYP7OF.js → chunk-OSVH4SMN.js} +16 -141
  102. package/chunks/{chunk-FPM27XN4.js → chunk-OW2BWT2P.js} +4 -4
  103. package/chunks/{chunk-TDXGKHDN.js → chunk-P5ULXPK5.js} +2 -2
  104. package/chunks/{chunk-24ER7UV4.js → chunk-PBRVUF5B.js} +1 -1
  105. package/chunks/{chunk-LKRMNRSN.js → chunk-PDPFQ2FO.js} +2 -0
  106. package/chunks/{chunk-2VSTGY6M.js → chunk-PJRW65JO.js} +1 -1
  107. package/chunks/{chunk-6HVUFDS2.js → chunk-PNVPFARW.js} +22 -13
  108. package/chunks/{chunk-IC4Z6LX6.js → chunk-PYQADEFD.js} +5 -0
  109. package/chunks/chunk-R4ZA6GBK.js +208 -0
  110. package/chunks/{chunk-KR4ZSC7K.js → chunk-RMPLEWF3.js} +3 -3
  111. package/chunks/{chunk-EORNAQDT.js → chunk-RQ6U2JJQ.js} +1 -1
  112. package/chunks/{chunk-AE77C5ZU.js → chunk-RYQMJCUO.js} +1 -1
  113. package/chunks/{chunk-6UWFTUQL.js → chunk-S5CULOHB.js} +75 -31
  114. package/chunks/{chunk-7UFKAV7Y.js → chunk-S6HYI3MF.js} +2 -2
  115. package/chunks/chunk-SAH4BD2J.js +92 -0
  116. package/chunks/chunk-SR7RZ4MS.js +202 -0
  117. package/chunks/{chunk-QETYKPMG.js → chunk-T2O6NIOY.js} +1 -1
  118. package/chunks/chunk-TQOF5KBL.js +71 -0
  119. package/chunks/{chunk-OHJLEW5J.js → chunk-TWFFY5BP.js} +4 -4
  120. package/chunks/{chunk-SCI7K3GM.js → chunk-TXO5BMR2.js} +19 -10
  121. package/chunks/{chunk-YJQCUTT2.js → chunk-UAB6J2IE.js} +4 -4
  122. package/chunks/{chunk-OFI7IGST.js → chunk-UGUKH3SU.js} +10 -10
  123. package/chunks/{chunk-SHZYHGQH.js → chunk-V2226RFW.js} +1 -1
  124. package/chunks/{chunk-KKJJB5X6.js → chunk-V47QNK5W.js} +1526 -833
  125. package/chunks/{chunk-W4B7UBUS.js → chunk-VHXPSL57.js} +6 -6
  126. package/chunks/{chunk-WUC6ZFXO.js → chunk-VKJ4KTPJ.js} +1 -1
  127. package/chunks/{chunk-MAJS7AT4.js → chunk-VNNWAZSI.js} +2 -2
  128. package/chunks/{chunk-BVWVWGLE.js → chunk-WAUGQKUU.js} +4 -64
  129. package/chunks/{chunk-OH2VKQXH.js → chunk-WH6QMLUW.js} +37 -30
  130. package/chunks/{chunk-PJOBIWUG.js → chunk-WQYWK4DG.js} +1 -1
  131. package/chunks/{chunk-LEMXGVEP.js → chunk-YFRFZCIP.js} +3 -3
  132. package/chunks/{chunk-2U3WZGZG.js → chunk-YGT2AUJ7.js} +103 -135
  133. package/chunks/{chunk-6XU3PH66.js → chunk-YR7ZQ4RD.js} +22 -69
  134. package/chunks/{chunk-OA4JVLSA.js → chunk-Z7VOMGDC.js} +22 -1
  135. package/chunks/{chunk-RUL4S3K3.js → chunk-ZCJBCKL5.js} +175 -60
  136. package/chunks/{chunk-GSS34377.js → chunk-ZI5IH2HP.js} +2 -2
  137. package/chunks/{chunk-CB2464BK.js → chunk-ZIKTCMQF.js} +117 -10
  138. package/chunks/chunk-ZLBIFIMV.js +1099 -0
  139. package/chunks/{chunk-D3UEZIQH.js → chunk-ZSNBQXMZ.js} +48 -55
  140. package/chunks/{chunk-FZBZSYKU.js → chunk-ZV7LTLFE.js} +1 -1
  141. package/chunks/{computer-use-KEAPATUY.js → computer-use-SLN7DV2E.js} +28 -24
  142. package/chunks/{config-utils-K7SCOWHD.js → config-utils-ULCSRMWD.js} +4 -4
  143. package/chunks/{contextCommand-ZJA6A5K5.js → contextCommand-EHFYX6FW.js} +30 -26
  144. package/chunks/{core-runtime-QMJPWHCI.js → core-runtime-FBSP5IIG.js} +33 -29
  145. package/chunks/{create-sub-session-E4PBYXV5.js → create-sub-session-QIDZUOPU.js} +1 -1
  146. package/chunks/{create-sub-session-DJE6XICH.js → create-sub-session-WC7YGVSL.js} +29 -25
  147. package/chunks/{cron-create-GRBWYMIJ.js → cron-create-VONA5JYY.js} +1 -1
  148. package/chunks/{cron-delete-4CMKBR2M.js → cron-delete-5JXSP2MI.js} +1 -1
  149. package/chunks/{cron-list-W7K4ASOA.js → cron-list-KE4F2CIR.js} +1 -1
  150. package/chunks/{daemon-SCTQMM7Z.js → daemon-VSX3FHTY.js} +119 -4
  151. package/chunks/{daemon-status-provider-FSWDPE2G.js → daemon-status-provider-WW2AD2T7.js} +39 -35
  152. package/chunks/{daemon-trust-policy-P5L5VFAY.js → daemon-trust-policy-E4MAYWPI.js} +35 -31
  153. package/chunks/{daemon-trust-policy-monitor-73JYN6ET.js → daemon-trust-policy-monitor-XVIDV6T4.js} +35 -31
  154. package/chunks/{de-VL76CPLV.js → de-LIW4XVLN.js} +5 -0
  155. package/chunks/{deferred-core-runtime-BWRCCFTE.js → deferred-core-runtime-5SVUC6UC.js} +28 -24
  156. package/chunks/{display-image-O2XFPQTC.js → display-image-NQRSIBXM.js} +2 -2
  157. package/chunks/{dist-HVBMEYWK.js → dist-3NTTUAHT.js} +1 -1
  158. package/chunks/{dist-7JGAAQSC.js → dist-6BMOAE3Z.js} +2 -2
  159. package/chunks/{dist-3BMEUGTG.js → dist-B2CGTW6T.js} +1 -1
  160. package/chunks/{dist-C5U4LJKW.js → dist-EWW3J4HQ.js} +5 -4
  161. package/chunks/{dist-K4WWQBHS.js → dist-EZE3V3Q7.js} +55 -15
  162. package/chunks/{dist-DPPHJAVL.js → dist-J47AXBZC.js} +918 -142
  163. package/chunks/{dist-SFQ34F4M.js → dist-OTUO3AS2.js} +8 -1091
  164. package/chunks/{dist-KS4O2NKE.js → dist-Z3CS4OVP.js} +14 -8
  165. package/chunks/{earlyInputCapture-L5ST23A6.js → earlyInputCapture-72FYHYRD.js} +28 -24
  166. package/chunks/{edit-LHHRFNFK.js → edit-SWVVWHXW.js} +28 -24
  167. package/chunks/{en-IRJ2WN5T.js → en-SY5GTIGX.js} +6 -0
  168. package/chunks/{enter-worktree-6NXCRZPF.js → enter-worktree-2HF6WQEO.js} +28 -24
  169. package/chunks/{enterPlanMode-ZVQT4U7D.js → enterPlanMode-OW6S7L4P.js} +28 -24
  170. package/chunks/{environment-GJ2HWJOS.js → environment-LRTBTDXH.js} +32 -28
  171. package/chunks/{errors-6RLH3XXC.js → errors-4CO2DME6.js} +30 -26
  172. package/chunks/{exit-worktree-I2YLUHHY.js → exit-worktree-GHJEIRGL.js} +28 -24
  173. package/chunks/{exitPlanMode-7CCWKO7I.js → exitPlanMode-JVP4FNNK.js} +28 -24
  174. package/chunks/{fast-path-DVFD4HQD.js → fast-path-HCCY7GR2.js} +24 -3
  175. package/chunks/{fast-path-settings-WQJU2LAT.js → fast-path-settings-MN5QQQET.js} +6 -3
  176. package/chunks/{fr-GK3HQYVB.js → fr-RQFO7U4P.js} +5 -0
  177. package/chunks/{gemini-7FWGOYD4.js → gemini-V3YVRKXU.js} +85 -72
  178. package/chunks/{geminiContentGenerator-V2WVLIXU.js → geminiContentGenerator-LVPMQUWX.js} +1 -1
  179. package/chunks/{glob-3N6GGI75.js → glob-7HRXHYDR.js} +28 -24
  180. package/chunks/{goal-tools-APOW6UXL.js → goal-tools-PXWN5VK3.js} +4 -2
  181. package/chunks/{grep-V43ILZVX.js → grep-BITQUON5.js} +28 -24
  182. package/chunks/{handleAutoUpdate-A5WFVWIA.js → handleAutoUpdate-DKFY454S.js} +32 -28
  183. package/chunks/{i18n-PLVQ4FBZ.js → i18n-53BQIQSH.js} +29 -25
  184. package/chunks/{image-gen-7C6IK6DC.js → image-gen-H62FLDFB.js} +7 -5
  185. package/chunks/{initializer-CVAIKZYL.js → initializer-Q7NUQRSU.js} +35 -31
  186. package/chunks/{installationInfo-J6QDHNTK.js → installationInfo-BWFHT7WU.js} +29 -25
  187. package/chunks/{ja-3FA46IKD.js → ja-KOZKHJHZ.js} +5 -0
  188. package/chunks/{list-ZZ4OUUWV.js → list-OWQKR6JK.js} +38 -34
  189. package/chunks/{list-agents-KFFIIS2G.js → list-agents-Z4WABFDZ.js} +1 -1
  190. package/chunks/{loadedSettingsAdapter-QRYRJSWL.js → loadedSettingsAdapter-HNPKQMFA.js} +35 -31
  191. package/chunks/{loggingContentGenerator-OJCO75HM.js → loggingContentGenerator-A5I3VQUC.js} +10 -8
  192. package/chunks/{loop-wakeup-TLMJPMMP.js → loop-wakeup-UZ5RL5Y2.js} +2 -2
  193. package/chunks/{ls-UVVE2XGE.js → ls-TVHDGIES.js} +1 -1
  194. package/chunks/{lsp-QMEA2VLB.js → lsp-CVN6OQPI.js} +1 -1
  195. package/chunks/main-PXAUXNF2.js +8 -0
  196. package/chunks/{managed-npm-update-PCOSCP2N.js → managed-npm-update-CUUJGUTV.js} +29 -25
  197. package/chunks/{mcp-M3WKKWKY.js → mcp-GJSC7ZPO.js} +35 -31
  198. package/chunks/{monitor-GN24FH6C.js → monitor-TZ2II7JM.js} +38 -30
  199. package/chunks/{nonInteractiveCli-KPTU3VSQ.js → nonInteractiveCli-22RS4EVH.js} +72 -66
  200. package/chunks/{notebook-edit-4YM65BBO.js → notebook-edit-YZC3YPY2.js} +36 -24
  201. package/chunks/{openaiContentGenerator-EDQT6GTV.js → openaiContentGenerator-OIGO5XNF.js} +21 -11
  202. package/chunks/{pidfile-JOIIRN2C.js → pidfile-QJQ65RJ2.js} +28 -24
  203. package/chunks/{process-registry-2CHQBXH5.js → process-registry-PMJOA5CO.js} +15 -0
  204. package/chunks/{processUtils-5SV4MX3Q.js → processUtils-V5VSDIKS.js} +2 -2
  205. package/chunks/{pt-3AOBKPIJ.js → pt-U6AOCTMF.js} +5 -0
  206. package/chunks/{qwenContentGenerator-ODRJSUGR.js → qwenContentGenerator-HXM25BGB.js} +35 -30
  207. package/chunks/{qwenOAuth2-NESCMZ47.js → qwenOAuth2-7MTMS2Z5.js} +7 -5
  208. package/chunks/{read-file-HPSODLPK.js → read-file-PMGXB3ZB.js} +8 -6
  209. package/chunks/{read-mcp-resource-2TNSJTC3.js → read-mcp-resource-PZ4ZF6YL.js} +1 -1
  210. package/chunks/{record-artifact-RAON52FC.js → record-artifact-P4HFMS7X.js} +2 -2
  211. package/chunks/{resumeHistoryUtils-TXCOFFMQ.js → resumeHistoryUtils-YUTPLHUH.js} +33 -29
  212. package/chunks/{ripGrep-ZKQGTQAO.js → ripGrep-XUS66YIV.js} +28 -24
  213. package/chunks/{ru-VJRAMC4W.js → ru-CMX4UMYP.js} +5 -0
  214. package/chunks/{run-qwen-serve-ZPKPKECF.js → run-qwen-serve-4NVSU75L.js} +261 -62
  215. package/chunks/{runtime-2FLNNM36.js → runtime-QLRVP6HM.js} +40 -36
  216. package/chunks/{scheduler-365PJHNR.js → scheduler-PBB2NSOP.js} +28 -24
  217. package/chunks/{sdk-exporters-http-KHAB5JSD.js → sdk-exporters-http-XVTZQRCE.js} +2 -2
  218. package/chunks/{sdk-impl-KD7FSTC3.js → sdk-impl-7W7AKCS4.js} +7 -3
  219. package/chunks/{send-message-ZM7MRUGP.js → send-message-CAMSLG2L.js} +4 -3
  220. package/chunks/{serve-QD2RNLKJ.js → serve-BWKTRX72.js} +37 -31
  221. package/chunks/{server-XLJVLTYM.js → server-E7CH7WPK.js} +1437 -593
  222. package/chunks/{session-3VTUHH4Q.js → session-QEKSJ6YU.js} +166 -105
  223. package/chunks/{settings-KULVPCQC.js → settings-BRAOSJIM.js} +34 -30
  224. package/chunks/{shell-3SWW22MH.js → shell-OF3CK4AT.js} +28 -24
  225. package/chunks/{skill-KDHWYS7W.js → skill-HLH2NO2H.js} +9 -7
  226. package/chunks/{skill-settings-NMY4JEJC.js → skill-settings-DRPU7YI5.js} +34 -30
  227. package/chunks/{spawnChannel-ZKS4Q5OU.js → spawnChannel-4KO7YTFM.js} +31 -27
  228. package/chunks/{standalone-update-7CXPGAQ4.js → standalone-update-DJN2R3YW.js} +30 -26
  229. package/chunks/{startInteractiveUI-2QQLEKM6.js → startInteractiveUI-O3WQQ2WC.js} +384 -173
  230. package/chunks/{syntheticOutput-ZLCUTKO2.js → syntheticOutput-PEBJQYJV.js} +2 -2
  231. package/chunks/{task-create-CQP5UEA3.js → task-create-5NWCQSJF.js} +5 -4
  232. package/chunks/{task-list-XLEZOJXP.js → task-list-53265TRZ.js} +1 -1
  233. package/chunks/{task-stop-7ZQM5CFF.js → task-stop-FPCOIRYX.js} +1 -1
  234. package/chunks/{task-update-JA75U2SN.js → task-update-5HN577LS.js} +5 -4
  235. package/chunks/{team-create-2WTNGAOX.js → team-create-2E4ACBJD.js} +28 -24
  236. package/chunks/{team-delete-MHY3UZGY.js → team-delete-MMQB4OSC.js} +1 -1
  237. package/chunks/{team-plan-approval-LZTYLEG4.js → team-plan-approval-LWIDXYOA.js} +28 -24
  238. package/chunks/{terminal-image-renderer-R5HHAFJN.js → terminal-image-renderer-PJM7663W.js} +30 -26
  239. package/chunks/{theme-manager-PAUCSJFF.js → theme-manager-FDQTM3RP.js} +28 -24
  240. package/chunks/{todoWrite-UPVOHYGD.js → todoWrite-JGV6VLOX.js} +1 -1
  241. package/chunks/{tool-search-2BFCGLI6.js → tool-search-TL5ZXBF4.js} +11 -8
  242. package/chunks/{total-session-admission-MK4SINFK.js → total-session-admission-LS6EY5KT.js} +37 -32
  243. package/chunks/{trustedFolders-TJ5S26N7.js → trustedFolders-5RWP5OB7.js} +32 -26
  244. package/chunks/{types-ML3TRJQ5.js → types-WYCFCEHR.js} +5 -3
  245. package/chunks/{update-relaunch-N7AYLARF.js → update-relaunch-HWQ4USKY.js} +5 -5
  246. package/chunks/{updateCheck-QRZ3DVT5.js → updateCheck-EZMBTEIR.js} +31 -27
  247. package/chunks/{useAutoAcceptIndicator-DBJ7Y5AF.js → useAutoAcceptIndicator-JDMI627A.js} +37 -33
  248. package/chunks/{validateNonInterActiveAuth-6ZQWUDS3.js → validateNonInterActiveAuth-RRUHC5RO.js} +67 -63
  249. package/chunks/{version-AJQGQWXC.js → version-XS4UTKUX.js} +1 -1
  250. package/chunks/{web-fetch-QWJYRXFL.js → web-fetch-2JV7H6OM.js} +14 -10
  251. package/chunks/{web-search-2AOXJGHU.js → web-search-RCTN2GAM.js} +10 -7
  252. package/chunks/{workflow-ERH3SJG2.js → workflow-6MKLKQ6R.js} +909 -273
  253. package/chunks/{workspace-providers-status-HZ474RA4.js → workspace-providers-status-YZ2IJ4DK.js} +38 -34
  254. package/chunks/{workspace-registration-store-6EUP4JXG.js → workspace-registration-store-IYN72LBS.js} +1 -1
  255. package/chunks/{workspace-registry-R4APRRNC.js → workspace-registry-7LFBZQLT.js} +37 -32
  256. package/chunks/{workspace-service-HFIFDMU7.js → workspace-service-2EHSPRJB.js} +45 -39
  257. package/chunks/{workspace-skills-status-HAHEIHGK.js → workspace-skills-status-5VJ2D5HN.js} +36 -32
  258. package/chunks/{workspace-trust-reconciler-65GTAGDK.js → workspace-trust-reconciler-X2LZ6XCI.js} +44 -39
  259. package/chunks/{write-file-B34CDELV.js → write-file-CJK6SCCF.js} +28 -24
  260. package/chunks/{zh-ARWDLDLR.js → zh-AGL2FVBI.js} +6 -0
  261. package/chunks/{zh-TW-Y4RGI3P7.js → zh-TW-KI66MHQY.js} +6 -0
  262. package/chunks/{zoom-image-HPRBZHSS.js → zoom-image-BVW4RFYW.js} +8 -6
  263. package/cli.js +13 -13
  264. package/locales/ca.js +10 -0
  265. package/locales/de.js +9 -0
  266. package/locales/en.js +10 -0
  267. package/locales/fr.js +9 -0
  268. package/locales/ja.js +9 -0
  269. package/locales/pt.js +9 -0
  270. package/locales/ru.js +9 -0
  271. package/locales/zh-TW.js +10 -0
  272. package/locales/zh.js +10 -0
  273. package/package.json +3 -3
  274. package/web-shell/assets/{arc-Ip-FFDJ0.js → arc-DDtoJrAW.js} +1 -1
  275. package/web-shell/assets/{architectureDiagram-3BPJPVTR-CChqgwIb.js → architectureDiagram-3BPJPVTR-BAInIW4O.js} +1 -1
  276. package/web-shell/assets/{blockDiagram-GPEHLZMM-BHN-Tfss.js → blockDiagram-GPEHLZMM-ChPDk7fP.js} +1 -1
  277. package/web-shell/assets/{c4Diagram-AAUBKEIU-BhyjzDjN.js → c4Diagram-AAUBKEIU-Cd9BJuUy.js} +1 -1
  278. package/web-shell/assets/channel-0OQklTfP.js +1 -0
  279. package/web-shell/assets/{chunk-2J33WTMH-BB9eyHrx.js → chunk-2J33WTMH-COQkLp56.js} +1 -1
  280. package/web-shell/assets/{chunk-4BX2VUAB-BeV7ce_J.js → chunk-4BX2VUAB-GUJshQ_l.js} +1 -1
  281. package/web-shell/assets/{chunk-55IACEB6-DO7kXDiV.js → chunk-55IACEB6-Boaa7c10.js} +1 -1
  282. package/web-shell/assets/{chunk-727SXJPM-B27MPznD.js → chunk-727SXJPM-CcRXaly2.js} +1 -1
  283. package/web-shell/assets/{chunk-AQP2D5EJ-DHIjqjD_.js → chunk-AQP2D5EJ-BY0OARHh.js} +1 -1
  284. package/web-shell/assets/{chunk-FMBD7UC4-DabMqyN2.js → chunk-FMBD7UC4-DLFQfv0S.js} +1 -1
  285. package/web-shell/assets/{chunk-ND2GUHAM-Dw7Nnnxc.js → chunk-ND2GUHAM-C_S0u-D2.js} +1 -1
  286. package/web-shell/assets/{chunk-QZHKN3VN-DdaZew1Q.js → chunk-QZHKN3VN-DP9m64hw.js} +1 -1
  287. package/web-shell/assets/classDiagram-4FO5ZUOK-CZ4-apsu.js +1 -0
  288. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CZ4-apsu.js +1 -0
  289. package/web-shell/assets/{cose-bilkent-S5V4N54A-CgBpCYH5.js → cose-bilkent-S5V4N54A-CGY6zGE1.js} +1 -1
  290. package/web-shell/assets/{dagre-BM42HDAG-BB4IU8G0.js → dagre-BM42HDAG-yB7whKNn.js} +1 -1
  291. package/web-shell/assets/{diagram-2AECGRRQ-BcUTHU37.js → diagram-2AECGRRQ-Bdlc59La.js} +1 -1
  292. package/web-shell/assets/{diagram-5GNKFQAL-B6Lyihyv.js → diagram-5GNKFQAL-BUClP18L.js} +1 -1
  293. package/web-shell/assets/{diagram-KO2AKTUF-CRIJOjpG.js → diagram-KO2AKTUF-aZm08kjn.js} +1 -1
  294. package/web-shell/assets/{diagram-LMA3HP47-DdNiwWWT.js → diagram-LMA3HP47-7DGwEkxC.js} +1 -1
  295. package/web-shell/assets/{diagram-OG6HWLK6-Dz4b32Do.js → diagram-OG6HWLK6-CAGKayxx.js} +1 -1
  296. package/web-shell/assets/{erDiagram-TEJ5UH35-D-8NGw77.js → erDiagram-TEJ5UH35-CptoHHQi.js} +1 -1
  297. package/web-shell/assets/{flowDiagram-I6XJVG4X-Dun26LyM.js → flowDiagram-I6XJVG4X-CNOH0s7Q.js} +1 -1
  298. package/web-shell/assets/{ganttDiagram-6RSMTGT7-F10Hu1Gc.js → ganttDiagram-6RSMTGT7-CCQuCU3y.js} +1 -1
  299. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js → gitGraphDiagram-PVQCEYII-B7gv9f4E.js} +1 -1
  300. package/web-shell/assets/{index-BXqw-nGq.js → index-BoUPVvpf.js} +1 -1
  301. package/web-shell/assets/index-D1YQXYsB.css +5 -0
  302. package/web-shell/assets/index-J4N7zCmU.js +1768 -0
  303. package/web-shell/assets/{infoDiagram-5YYISTIA-DVgTMLvj.js → infoDiagram-5YYISTIA-Bb3KYEbR.js} +1 -1
  304. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-uT-KepvK.js → ishikawaDiagram-YF4QCWOH-DWEzbAGi.js} +1 -1
  305. package/web-shell/assets/{journeyDiagram-JHISSGLW-Vg_XadQf.js → journeyDiagram-JHISSGLW-CmxwEqeb.js} +1 -1
  306. package/web-shell/assets/{kanban-definition-UN3LZRKU-Dyv1ESBE.js → kanban-definition-UN3LZRKU-Ci0gDD8O.js} +1 -1
  307. package/web-shell/assets/{linear-BMIepYX3.js → linear-BqxZqGhS.js} +1 -1
  308. package/web-shell/assets/{mermaid.core-zA8pJ9ag.js → mermaid.core-BDAFffHv.js} +5 -5
  309. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BCW_BZ_5.js → mindmap-definition-RKZ34NQL-Btvx-xvS.js} +1 -1
  310. package/web-shell/assets/{pieDiagram-4H26LBE5-DseNEGp2.js → pieDiagram-4H26LBE5-CKAg7yG7.js} +1 -1
  311. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js → quadrantDiagram-W4KKPZXB-DIt8E1mC.js} +1 -1
  312. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CVOlCRPf.js → requirementDiagram-4Y6WPE33-BA7mQWQJ.js} +1 -1
  313. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CGhgrUJZ.js → sankeyDiagram-5OEKKPKP-D0JppnVU.js} +1 -1
  314. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-dlqmpLuQ.js → sequenceDiagram-3UESZ5HK-29DIQFjB.js} +1 -1
  315. package/web-shell/assets/{stateDiagram-AJRCARHV-B9EW10Xb.js → stateDiagram-AJRCARHV-iiXMdK--.js} +1 -1
  316. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CEGK3l80.js +1 -0
  317. package/web-shell/assets/{timeline-definition-PNZ67QCA-BBRh0mgZ.js → timeline-definition-PNZ67QCA-CeF7ngSW.js} +1 -1
  318. package/web-shell/assets/{vennDiagram-CIIHVFJN-B8Gs-REP.js → vennDiagram-CIIHVFJN-Beilq8D6.js} +1 -1
  319. package/web-shell/assets/{wardley-L42UT6IY-D_y80Ur7.js → wardley-L42UT6IY-DOYjY4zO.js} +1 -1
  320. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-D-CNfHJ-.js → wardleyDiagram-YWT4CUSO-Dtqp8o18.js} +1 -1
  321. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DQ5CvELo.js → xychartDiagram-2RQKCTM6-cdAc0Dfv.js} +1 -1
  322. package/web-shell/index.html +2 -2
  323. package/chunks/chunk-6PEXNQTX.js +0 -68
  324. package/chunks/chunk-IUFV6FYU.js +0 -81
  325. package/chunks/chunk-RXFQM6FQ.js +0 -42
  326. package/web-shell/assets/channel-Cu8qd6OB.js +0 -1
  327. package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +0 -1
  328. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +0 -1
  329. package/web-shell/assets/index-QQlUCJGg.css +0 -5
  330. package/web-shell/assets/index-hcgjV7vS.js +0 -1768
  331. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +0 -1
  332. package/chunks/{anthropicContentGenerator-DTMVEL5M.js → anthropicContentGenerator-SSFE2753.js} +9 -9
  333. /package/chunks/{chunk-VXZBKKQR.js → chunk-NTTBXH7U.js} +0 -0
  334. /package/chunks/{chunk-GRC5HGPI.js → chunk-OIBUG24X.js} +0 -0
@@ -1,8 +1,9 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
3
  import {
4
- isLoopbackBind
5
- } from "./chunk-RXFQM6FQ.js";
4
+ isLoopbackBind,
5
+ normalizeSessionIdForLookup
6
+ } from "./chunk-TQOF5KBL.js";
6
7
  import {
7
8
  MAX_CHILD_HEAP_MB,
8
9
  MIN_CHILD_HEAP_MB,
@@ -10,7 +11,7 @@ import {
10
11
  } from "./chunk-HGCQ5SE7.js";
11
12
  import {
12
13
  CLIENT_MCP_OVER_WS_CONFIG_FLAG
13
- } from "./chunk-R574ATRM.js";
14
+ } from "./chunk-M2PNLYGY.js";
14
15
  import {
15
16
  MAX_WORKSPACE_PATH_LENGTH,
16
17
  translateAndCheckAbsoluteWorkspacePath
@@ -1219,6 +1220,7 @@ var SERVE_CAPABILITY_REGISTRY = {
1219
1220
  daemon_status: { since: "v1" },
1220
1221
  capabilities: { since: "v1" },
1221
1222
  session_create: { since: "v1" },
1223
+ session_id_override: { since: "v1" },
1222
1224
  session_scope_override: { since: "v1" },
1223
1225
  session_load: { since: "v1" },
1224
1226
  session_resume: { since: "v1" },
@@ -1355,6 +1357,7 @@ var SERVE_CAPABILITY_REGISTRY = {
1355
1357
  // (`tools.disabled` is consulted at `Config` construction time).
1356
1358
  workspace_tool_toggle: { since: "v1" },
1357
1359
  workspace_skill_toggle: { since: "v1" },
1360
+ workspace_skill_batch_toggle: { since: "v1" },
1358
1361
  workspace_skill_manage: { since: "v1" },
1359
1362
  workspace_settings: { since: "v1" },
1360
1363
  // `GET /workspace/permissions` is always available when this tag is
@@ -1912,7 +1915,7 @@ function requireSessionId(req, res) {
1912
1915
  res.status(400).json({ error: "`sessionId` route parameter is required" });
1913
1916
  return null;
1914
1917
  }
1915
- return sessionId;
1918
+ return normalizeSessionIdForLookup(sessionId);
1916
1919
  }
1917
1920
  __name(requireSessionId, "requireSessionId");
1918
1921
  function parseClientIdHeader(req, res) {
@@ -2304,13 +2307,75 @@ __name(resolveAcpHttpEnabled, "resolveAcpHttpEnabled");
2304
2307
 
2305
2308
  // packages/cli/src/serve/daemon-status.ts
2306
2309
  init_esbuild_shims();
2310
+
2311
+ // packages/cli/src/serve/daemon-memory-pressure.ts
2312
+ init_esbuild_shims();
2313
+ import { getHeapStatistics } from "node:v8";
2314
+ var SOFT_PRESSURE_RATIO = 0.5;
2315
+ var HARD_PRESSURE_RATIO = 0.65;
2316
+ var CRITICAL_PRESSURE_RATIO = 0.8;
2317
+ function classify(ratio) {
2318
+ if (ratio >= CRITICAL_PRESSURE_RATIO) return "critical";
2319
+ if (ratio >= HARD_PRESSURE_RATIO) return "hard";
2320
+ if (ratio >= SOFT_PRESSURE_RATIO) return "soft";
2321
+ return "normal";
2322
+ }
2323
+ __name(classify, "classify");
2324
+ function computeDaemonMemoryPressure(input) {
2325
+ const heapLimitBytes = usableDenominator(
2326
+ input.heapLimitBytes ?? getHeapStatistics().heap_size_limit
2327
+ );
2328
+ const availableBytes = usableDenominator(input.availableBytes);
2329
+ const rss = usableNumerator(input.rssBytes);
2330
+ const heapUsed = usableNumerator(input.heapUsedBytes);
2331
+ const rssBytes = rss ?? 0;
2332
+ const heapUsedBytes = heapUsed ?? 0;
2333
+ const rssMeasured = availableBytes > 0 && rss !== null;
2334
+ const heapMeasured = heapLimitBytes > 0 && heapUsed !== null;
2335
+ const rssRatio = rssMeasured ? rssBytes / availableBytes : 0;
2336
+ const heapRatio = heapMeasured ? heapUsedBytes / heapLimitBytes : 0;
2337
+ let source;
2338
+ if (!rssMeasured && !heapMeasured) source = "unknown";
2339
+ else if (!heapMeasured) source = "rss";
2340
+ else if (!rssMeasured) source = "heap";
2341
+ else source = rssRatio >= heapRatio ? "rss" : "heap";
2342
+ const ratio = Math.max(rssRatio, heapRatio);
2343
+ return {
2344
+ level: classify(ratio),
2345
+ ratio,
2346
+ source,
2347
+ rssBytes,
2348
+ rssRatio,
2349
+ availableBytes,
2350
+ heapUsedBytes,
2351
+ heapRatio,
2352
+ heapLimitBytes
2353
+ };
2354
+ }
2355
+ __name(computeDaemonMemoryPressure, "computeDaemonMemoryPressure");
2356
+ function usableDenominator(value) {
2357
+ return Number.isFinite(value) && value > 0 ? value : 0;
2358
+ }
2359
+ __name(usableDenominator, "usableDenominator");
2360
+ function usableNumerator(value) {
2361
+ return Number.isFinite(value) && value >= 0 ? value : null;
2362
+ }
2363
+ __name(usableNumerator, "usableNumerator");
2364
+
2365
+ // packages/cli/src/serve/daemon-status.ts
2307
2366
  var DEFAULT_LISTENER_MAX_CONNECTIONS = 256;
2308
2367
  var SECTION_TIMEOUT_MS = 1e3;
2309
2368
  var CAPACITY_WARNING_RATIO = 0.8;
2310
- function toDaemonStatusMemoryLimits(budget) {
2369
+ function toDaemonStatusMemoryLimits(budget, childHeap) {
2311
2370
  if (!budget) return null;
2312
2371
  return {
2313
2372
  enforced: false,
2373
+ childHeap: childHeap ? {
2374
+ mode: childHeap.mode,
2375
+ maxConcurrentChildren: childHeap.maxConcurrentChildren,
2376
+ perChildCeilingMb: childHeap.perChildCeilingMb,
2377
+ refusals: childHeap.refusals
2378
+ } : null,
2314
2379
  configuredBudgetMb: budget.configuredBudgetMb,
2315
2380
  effectiveBudgetMb: budget.effectiveBudgetMb,
2316
2381
  budgetSource: budget.budgetSource,
@@ -2379,13 +2444,52 @@ async function buildDaemonStatusResponse(detail, input) {
2379
2444
  const managedRuntimes = input.workspaceRegistry?.listManaged();
2380
2445
  const activeAcpChildCount = managedRuntimes ? managedRuntimes.filter((runtime) => runtime.bridge.isChannelLive()).length : workspaceSnapshots.filter((item) => item.snapshot.channelLive).length;
2381
2446
  const registeredWorkspaceCount = input.workspaceRegistry ? input.workspaceRegistry.listEntries().length : workspaceSnapshots.length;
2447
+ let childRssBytesTotal = 0;
2448
+ let childRssSampled = 0;
2449
+ let oldestChildReadingAgeMs = null;
2450
+ for (const runtime of managedRuntimes ?? []) {
2451
+ if (!runtime.bridge.isChannelLive()) continue;
2452
+ const snapshot = runtime.bridge.getChildResourceSnapshot?.();
2453
+ if (!snapshot) continue;
2454
+ childRssBytesTotal += snapshot.rssBytes;
2455
+ childRssSampled += 1;
2456
+ if (snapshot.ageMs !== void 0) {
2457
+ oldestChildReadingAgeMs = Math.max(
2458
+ oldestChildReadingAgeMs ?? 0,
2459
+ snapshot.ageMs
2460
+ );
2461
+ }
2462
+ }
2463
+ const pressureMode = input.opts.memoryPressureMode ?? "observe";
2464
+ const pressureMemory = process.memoryUsage();
2382
2465
  runtimeMemory = {
2383
2466
  registeredWorkspaces: registeredWorkspaceCount,
2384
2467
  activeAcpChildren: activeAcpChildCount,
2385
- childRssCoverage: "primary_only",
2468
+ childRssCoverage: "active_children",
2469
+ children: {
2470
+ rssBytes: childRssBytesTotal,
2471
+ sampled: childRssSampled,
2472
+ oldestReadingAgeMs: oldestChildReadingAgeMs
2473
+ },
2386
2474
  modeled: {
2387
2475
  recommendedShareAtRegisteredMb: registeredWorkspaceCount > 0 ? recommendedChildShareMb(memoryBudget, registeredWorkspaceCount) : null,
2388
2476
  recommendedShareAtActiveMb: activeAcpChildCount > 0 ? recommendedChildShareMb(memoryBudget, activeAcpChildCount) : null
2477
+ },
2478
+ pressure: {
2479
+ ...computeDaemonMemoryPressure({
2480
+ rssBytes: pressureMemory.rss,
2481
+ heapUsedBytes: pressureMemory.heapUsed,
2482
+ // `availableMemoryMb`, not `effectiveBudgetMb`: pressure asks how
2483
+ // close this process is to being killed, and what kills it is the
2484
+ // cgroup limit or host memory. An operator's budget is a policy
2485
+ // number — exceeding it is not fatal, so classifying against it
2486
+ // would report `critical` for a daemon in no danger.
2487
+ // Note the unit change: the budget carries megabytes.
2488
+ availableBytes: memoryBudget.availableMemoryMb * 1024 * 1024
2489
+ }),
2490
+ // After the spread, so the flag stays authoritative if the computed
2491
+ // shape ever grows a field of this name.
2492
+ mode: pressureMode
2389
2493
  }
2390
2494
  };
2391
2495
  }
@@ -2436,6 +2540,29 @@ async function buildDaemonStatusResponse(detail, input) {
2436
2540
  totalAdmissionSnapshot,
2437
2541
  workspaceSnapshots
2438
2542
  );
2543
+ if (runtimeMemory && runtimeMemory.pressure.mode === "observe" && runtimeMemory.pressure.level !== "normal") {
2544
+ const { level, ratio, source } = runtimeMemory.pressure;
2545
+ issues.push({
2546
+ code: "daemon_memory_pressure",
2547
+ // `warning` at every level, including `critical`. An `error` severity
2548
+ // makes `rollupStatus` return `error` for the whole daemon, which is a
2549
+ // strong claim to stake on thresholds borrowed from an interactive-CLI
2550
+ // monitor and not yet calibrated here. The level itself is reported in
2551
+ // `runtime.memory.pressure`, so nothing is lost by keeping the rollup
2552
+ // at `warning` until the numbers have been checked against real
2553
+ // deployments — which is what this phase is for.
2554
+ severity: "warning",
2555
+ // Name the denominator, not the numerator: "% of the rss limit" would
2556
+ // call the measured value a limit. `section` is omitted because every
2557
+ // other use of it names a workspace status section, and this is a
2558
+ // daemon-level concern — the same reason `daemon_log_degraded` omits it.
2559
+ // One decimal, not zero: at 0 decimals a ratio of 0.795 rounds to "80%"
2560
+ // while `level` still reads `hard`, and 80% is critical's documented
2561
+ // threshold. An oncall engineer comparing the two sees a contradiction
2562
+ // in the one feature whose whole purpose is trustworthy triage.
2563
+ message: `Daemon memory pressure is ${level} at ${(ratio * 100).toFixed(1)}% of ${source === "heap" ? "the V8 heap limit" : "available memory"}.`
2564
+ });
2565
+ }
2439
2566
  if (daemonLogStatus?.health === "degraded") {
2440
2567
  issues.push({
2441
2568
  code: "daemon_log_degraded",
@@ -2499,7 +2626,10 @@ async function buildDaemonStatusResponse(detail, input) {
2499
2626
  channelIdleTimeoutMs: bridgeSnapshot.limits.channelIdleTimeoutMs,
2500
2627
  sessionIdleTimeoutMs: bridgeSnapshot.limits.sessionIdleTimeoutMs,
2501
2628
  acpConnectionCap: acpSnapshot?.connectionCap ?? null,
2502
- memory: toDaemonStatusMemoryLimits(memoryBudget)
2629
+ memory: toDaemonStatusMemoryLimits(
2630
+ memoryBudget,
2631
+ input.getChildHeapPolicySnapshot?.()
2632
+ )
2503
2633
  },
2504
2634
  ...workspaceRuntimes && workspaceRuntimes.length > 1 ? {
2505
2635
  workspaces: workspaceRuntimes.map((runtime) => ({
@@ -4,11 +4,15 @@ import {
4
4
  DEFAULT_EXCLUDED_ENV_VARS,
5
5
  HOME_ENV_BOOTSTRAP_KEYS,
6
6
  PROJECT_ENV_HARDCODED_EXCLUSIONS,
7
- publishPendingCompileCache
8
- } from "./chunk-6PEXNQTX.js";
7
+ isHardcodedProjectEnvExclusion,
8
+ isLoaderEnvKey,
9
+ publishPendingCompileCache,
10
+ reportRejectedLoaderKeys,
11
+ resetLoaderKeyRejectionReportingForTesting
12
+ } from "./chunk-R4ZA6GBK.js";
9
13
  import {
10
14
  isWorkspaceTrusted
11
- } from "./chunk-6XU3PH66.js";
15
+ } from "./chunk-YR7ZQ4RD.js";
12
16
  import {
13
17
  require_main
14
18
  } from "./chunk-5M6IDOMF.js";
@@ -34,17 +38,18 @@ import * as os from "node:os";
34
38
  var SETTINGS_DIRECTORY_NAME = QWEN_DIR;
35
39
  var RELOAD_EXCLUDED_KEYS = /* @__PURE__ */ new Set([
36
40
  ...PROJECT_ENV_HARDCODED_EXCLUSIONS,
41
+ // The daemon auth token: the full loader never takes it from
42
+ // settings.env, and a mid-session .env edit must not rotate it. (The
43
+ // serve fast path consults only the hardcoded tier, so its documented
44
+ // workspace-settings.env token feature is unaffected.)
37
45
  "QWEN_SERVER_TOKEN",
38
- "QWEN_CLI_ENTRY",
39
- "NODE_OPTIONS",
40
- "NODE_PATH",
41
- "NODE_TLS_REJECT_UNAUTHORIZED",
42
- "LD_PRELOAD",
43
- "LD_AUDIT",
46
+ // Loader-class keys are rejected by the isLoaderEnvKey guard before this
47
+ // Set is consulted, so they are not spread here. These three keep their
48
+ // pre-denylist reload-only exclusion: too compatibility-heavy for the
49
+ // inherited-env scrub (mainstream toolchain/app conventions), but a
50
+ // mid-session .env edit must still not apply them.
44
51
  "LD_LIBRARY_PATH",
45
- "DYLD_INSERT_LIBRARIES",
46
52
  "DYLD_LIBRARY_PATH",
47
- "BASH_ENV",
48
53
  "ENV",
49
54
  "PATH",
50
55
  "HOME",
@@ -52,6 +57,13 @@ var RELOAD_EXCLUDED_KEYS = /* @__PURE__ */ new Set([
52
57
  "TMP",
53
58
  "TEMP"
54
59
  ]);
60
+ var RELOAD_EXCLUDED_KEYS_CASEFOLDED = new Set(
61
+ [...RELOAD_EXCLUDED_KEYS].map((key) => key.toLowerCase())
62
+ );
63
+ function isReloadExcludedKey(key) {
64
+ return RELOAD_EXCLUDED_KEYS_CASEFOLDED.has(key.toLowerCase());
65
+ }
66
+ __name(isReloadExcludedKey, "isReloadExcludedKey");
55
67
  var dotEnvSourcedKeys = /* @__PURE__ */ new Set();
56
68
  var settingsEnvSourcedKeys = /* @__PURE__ */ new Set();
57
69
  var lastReloadSnapshot = /* @__PURE__ */ new Map();
@@ -101,7 +113,7 @@ function readHomeEnvInto(file) {
101
113
  }
102
114
  try {
103
115
  const parsed = dotenv.parse(fs.readFileSync(file, "utf-8"));
104
- for (const key of PROJECT_ENV_HARDCODED_EXCLUSIONS) {
116
+ for (const key of HOME_ENV_BOOTSTRAP_KEYS) {
105
117
  if (parsed[key] && !Object.hasOwn(process.env, key)) {
106
118
  process.env[key] = parsed[key];
107
119
  }
@@ -115,6 +127,7 @@ function resetHomeEnvBootstrapForTesting() {
115
127
  }
116
128
  __name(resetHomeEnvBootstrapForTesting, "resetHomeEnvBootstrapForTesting");
117
129
  function resetEnvironmentTrackingForTesting() {
130
+ resetLoaderKeyRejectionReportingForTesting();
118
131
  dotEnvSourcedKeys.clear();
119
132
  settingsEnvSourcedKeys.clear();
120
133
  lastReloadSnapshot.clear();
@@ -246,6 +259,7 @@ function parseEnvFiles(envFilePaths, userLevelPaths) {
246
259
  const isHomeScopedEnvFile = userLevelPaths.has(normalizedEnvFilePath);
247
260
  const isQwenScopedEnvFile = isHomeScopedEnvFile || path.basename(path.dirname(normalizedEnvFilePath)) === QWEN_DIR;
248
261
  files.push({
262
+ path: envFilePath,
249
263
  parsedEnv,
250
264
  isHomeScopedEnvFile,
251
265
  isQwenScopedEnvFile
@@ -262,8 +276,9 @@ function parseEnvFiles(envFilePaths, userLevelPaths) {
262
276
  __name(parseEnvFiles, "parseEnvFiles");
263
277
  function canApplyParsedEnvKey(envFile, key, excludedVars, options = {}) {
264
278
  if (!Object.hasOwn(envFile.parsedEnv, key)) return false;
265
- if (options.reload && RELOAD_EXCLUDED_KEYS.has(key)) return false;
266
- if (!envFile.isHomeScopedEnvFile && PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) {
279
+ if (isLoaderEnvKey(key)) return false;
280
+ if (options.reload && isReloadExcludedKey(key)) return false;
281
+ if (!envFile.isHomeScopedEnvFile && isHardcodedProjectEnvExclusion(key)) {
267
282
  return false;
268
283
  }
269
284
  return envFile.isQwenScopedEnvFile || !excludedVars.includes(key);
@@ -301,16 +316,25 @@ function buildRuntimeEnvironment(settings, startDir = process.cwd(), baseEnv = p
301
316
  }
302
317
  setRuntimeEnvIfUnset(effectiveEnv, key, envFile.parsedEnv[key]);
303
318
  }
319
+ reportRejectedLoaderKeys(
320
+ `.env file ${envFile.path}`,
321
+ Object.keys(envFile.parsedEnv)
322
+ );
304
323
  }
305
324
  if (settings.env) {
306
325
  const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
307
326
  for (const [key, value] of Object.entries(settings.env)) {
308
- if (RELOAD_EXCLUDED_KEYS.has(key)) continue;
309
- if (PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) continue;
327
+ if (isLoaderEnvKey(key)) continue;
328
+ if (isReloadExcludedKey(key)) continue;
329
+ if (isHardcodedProjectEnvExclusion(key)) continue;
310
330
  if (excludedVars.includes(key)) continue;
311
331
  if (typeof value !== "string") continue;
312
332
  setRuntimeEnvIfUnset(effectiveEnv, key, value);
313
333
  }
334
+ reportRejectedLoaderKeys(
335
+ `settings.env (${startDir})`,
336
+ Object.keys(settings.env)
337
+ );
314
338
  }
315
339
  const overlayKeys = Object.keys(effectiveEnv).filter((key) => effectiveEnv[key] !== baseEnv[key]).sort();
316
340
  return {
@@ -343,13 +367,20 @@ function loadEnvironment(settings, startDir = process.cwd()) {
343
367
  lastReloadSnapshot.set(key, envFile.parsedEnv[key]);
344
368
  }
345
369
  }
370
+ reportRejectedLoaderKeys(
371
+ `.env file ${envFile.path}`,
372
+ Object.keys(envFile.parsedEnv)
373
+ );
346
374
  }
347
375
  if (settings.env) {
348
376
  for (const [key, value] of Object.entries(settings.env)) {
349
- if (RELOAD_EXCLUDED_KEYS.has(key)) {
377
+ if (isLoaderEnvKey(key)) {
378
+ continue;
379
+ }
380
+ if (isReloadExcludedKey(key)) {
350
381
  continue;
351
382
  }
352
- if (PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) {
383
+ if (isHardcodedProjectEnvExclusion(key)) {
353
384
  continue;
354
385
  }
355
386
  const existingValue = process.env[key];
@@ -362,6 +393,10 @@ function loadEnvironment(settings, startDir = process.cwd()) {
362
393
  lastReloadSnapshot.set(key, value);
363
394
  }
364
395
  }
396
+ reportRejectedLoaderKeys(
397
+ `settings.env (${startDir})`,
398
+ Object.keys(settings.env)
399
+ );
365
400
  }
366
401
  lastReloadSnapshotSeeded = true;
367
402
  publishPendingCompileCache();
@@ -392,17 +427,26 @@ function reloadEnvironment(settings, workspaceCwd, workspaceTrusted) {
392
427
  newDotEnvKeys.set(key, envFile.parsedEnv[key]);
393
428
  }
394
429
  }
430
+ reportRejectedLoaderKeys(
431
+ `.env file ${envFile.path}`,
432
+ Object.keys(envFile.parsedEnv)
433
+ );
395
434
  }
396
435
  if (settings.env) {
397
436
  for (const [key, value] of Object.entries(settings.env)) {
398
- if (RELOAD_EXCLUDED_KEYS.has(key)) continue;
399
- if (PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) continue;
437
+ if (isLoaderEnvKey(key)) continue;
438
+ if (isReloadExcludedKey(key)) continue;
439
+ if (isHardcodedProjectEnvExclusion(key)) continue;
400
440
  if (typeof value !== "string") continue;
401
441
  const dotEnvValue = newDotEnvKeys.get(key);
402
442
  if (dotEnvValue !== void 0 && dotEnvValue !== "") continue;
403
443
  if (dotEnvReadFailed && lastReloadSnapshot.has(key)) continue;
404
444
  newSettingsEnvKeys.set(key, value);
405
445
  }
446
+ reportRejectedLoaderKeys(
447
+ `settings.env (${workspaceCwd})`,
448
+ Object.keys(settings.env)
449
+ );
406
450
  }
407
451
  const allNewKeys = /* @__PURE__ */ new Set([
408
452
  ...newDotEnvKeys.keys(),
@@ -417,7 +461,7 @@ function reloadEnvironment(settings, workspaceCwd, workspaceTrusted) {
417
461
  ...settingsEnvSourcedKeys
418
462
  ]);
419
463
  for (const key of previouslyKnown) {
420
- if (!allNewKeys.has(key) && !RELOAD_EXCLUDED_KEYS.has(key)) {
464
+ if (!allNewKeys.has(key) && !isReloadExcludedKey(key)) {
421
465
  delete process.env[key];
422
466
  removedKeys.push(key);
423
467
  }
@@ -12,7 +12,7 @@ import {
12
12
  SPAN_TOOL_EXECUTION,
13
13
  TOOL_FAILURE_KIND_ATTRIBUTE,
14
14
  TOOL_FAILURE_KIND_CANCELLED
15
- } from "./chunk-LKRMNRSN.js";
15
+ } from "./chunk-PDPFQ2FO.js";
16
16
  import {
17
17
  createDebugLogger,
18
18
  getCurrentSessionId,
@@ -44,6 +44,7 @@ init_esbuild_shims();
44
44
  init_esm();
45
45
  var TOOL_CALL_COUNT = `${SERVICE_NAME}.tool.call.count`;
46
46
  var TOOL_EXECUTION_COUNT = `${SERVICE_NAME}.tool.execution.count`;
47
+ var REPEATED_TOOL_FAILURE_GUARD_COUNT = `${SERVICE_NAME}.repeated_tool_failure_guard.count`;
47
48
  var TOOL_CALL_LATENCY = `${SERVICE_NAME}.tool.call.latency`;
48
49
  var API_REQUEST_COUNT = `${SERVICE_NAME}.api.request.count`;
49
50
  var API_REQUEST_LATENCY = `${SERVICE_NAME}.api.request.latency`;
@@ -112,6 +113,12 @@ var COUNTER_DEFINITIONS = {
112
113
  assign: /* @__PURE__ */ __name((c) => toolExecutionCounter = c, "assign"),
113
114
  attributes: {}
114
115
  },
116
+ [REPEATED_TOOL_FAILURE_GUARD_COUNT]: {
117
+ description: "Counts privacy-safe repeated tool execution failure guard transitions.",
118
+ valueType: ValueType.INT,
119
+ assign: /* @__PURE__ */ __name((c) => repeatedToolFailureGuardCounter = c, "assign"),
120
+ attributes: {}
121
+ },
115
122
  [API_REQUEST_COUNT]: {
116
123
  description: "Counts API requests, tagged by model and status.",
117
124
  valueType: ValueType.INT,
@@ -272,6 +279,7 @@ var PERFORMANCE_HISTOGRAM_DEFINITIONS = {
272
279
  var cliMeter;
273
280
  var toolCallCounter;
274
281
  var toolExecutionCounter;
282
+ var repeatedToolFailureGuardCounter;
275
283
  var toolCallLatencyHistogram;
276
284
  var apiRequestCounter;
277
285
  var apiRequestLatencyHistogram;
@@ -478,6 +486,11 @@ function recordToolExecutionMetrics(config, attributes) {
478
486
  });
479
487
  }
480
488
  __name(recordToolExecutionMetrics, "recordToolExecutionMetrics");
489
+ function recordRepeatedToolFailureGuardMetrics(attributes) {
490
+ if (!repeatedToolFailureGuardCounter || !isMetricsInitialized) return;
491
+ repeatedToolFailureGuardCounter.add(1, attributes);
492
+ }
493
+ __name(recordRepeatedToolFailureGuardMetrics, "recordRepeatedToolFailureGuardMetrics");
481
494
  function recordTokenUsageMetrics(config, tokenCount, attributes) {
482
495
  if (!tokenUsageCounter || !isMetricsInitialized) return;
483
496
  tokenUsageCounter.add(tokenCount, {
@@ -852,6 +865,31 @@ var telemetryInitialized = false;
852
865
  var telemetryInitPromise;
853
866
  var telemetryShutdownPromise;
854
867
  var activeMetricReader;
868
+ var OTEL_EXPORTER_ENV_VARS = [
869
+ "OTEL_TRACES_EXPORTER",
870
+ "OTEL_LOGS_EXPORTER",
871
+ "OTEL_METRICS_EXPORTER"
872
+ ];
873
+ function startSdkWithExplicitExporters(currentSdk) {
874
+ const previousValues = /* @__PURE__ */ new Map();
875
+ for (const name of OTEL_EXPORTER_ENV_VARS) {
876
+ previousValues.set(name, process.env[name]);
877
+ delete process.env[name];
878
+ }
879
+ try {
880
+ currentSdk.start();
881
+ } finally {
882
+ for (const name of OTEL_EXPORTER_ENV_VARS) {
883
+ const previousValue = previousValues.get(name);
884
+ if (previousValue === void 0) {
885
+ delete process.env[name];
886
+ } else {
887
+ process.env[name] = previousValue;
888
+ }
889
+ }
890
+ }
891
+ }
892
+ __name(startSdkWithExplicitExporters, "startSdkWithExplicitExporters");
855
893
  function isTelemetrySdkInitialized() {
856
894
  return telemetryInitialized;
857
895
  }
@@ -863,12 +901,12 @@ function initializeTelemetry(config) {
863
901
  telemetryInitPromise ??= (async () => {
864
902
  const debugLogger3 = createDebugLogger("OTEL");
865
903
  try {
866
- const { startTelemetrySdk } = await import("./sdk-impl-KD7FSTC3.js");
904
+ const { startTelemetrySdk } = await import("./sdk-impl-7W7AKCS4.js");
867
905
  if (telemetryInitialized) return;
868
906
  const started = await startTelemetrySdk(config);
869
907
  if (!started) return;
870
908
  sdk = started.sdk;
871
- sdk.start();
909
+ startSdkWithExplicitExporters(sdk);
872
910
  debugLogger3.debug("OpenTelemetry SDK started successfully.");
873
911
  telemetryInitialized = true;
874
912
  activeMetricReader = started.metricReader;
@@ -1989,6 +2027,7 @@ export {
1989
2027
  recordChatCompressionMetrics,
1990
2028
  recordToolCallMetrics,
1991
2029
  recordToolExecutionMetrics,
2030
+ recordRepeatedToolFailureGuardMetrics,
1992
2031
  recordTokenUsageMetrics,
1993
2032
  recordApiResponseMetrics,
1994
2033
  recordApiErrorMetrics,
@@ -2,11 +2,11 @@
2
2
  "use strict";
3
3
  import {
4
4
  resolveChannelCwd
5
- } from "./chunk-VWOVHOTT.js";
5
+ } from "./chunk-67EWJE77.js";
6
6
  import {
7
7
  getPlugin,
8
8
  supportedTypes
9
- } from "./chunk-IUFV6FYU.js";
9
+ } from "./chunk-E2FPSSKP.js";
10
10
  import {
11
11
  init_esbuild_shims
12
12
  } from "./chunk-5O2XNYP6.js";
@@ -90,6 +90,7 @@ var SessionArchivingError = class extends Error {
90
90
  this.lockKind = lockKind;
91
91
  }
92
92
  };
93
+ var RESTORE_IN_PROGRESS_RETRY_AFTER_SECONDS = 5;
93
94
  var RestoreInProgressError = class extends Error {
94
95
  static {
95
96
  __name(this, "RestoreInProgressError");
@@ -97,14 +98,21 @@ var RestoreInProgressError = class extends Error {
97
98
  sessionId;
98
99
  activeAction;
99
100
  requestedAction;
100
- constructor(sessionId, activeAction, requestedAction) {
101
+ reason;
102
+ retryAfterSeconds;
103
+ constructor(sessionId, activeAction, requestedAction, opts) {
104
+ const reason = opts?.reason ?? "restore_in_progress";
105
+ const retryTarget = requestedAction === "spawn" ? "the spawn" : `session/${requestedAction}`;
106
+ const activeTarget = activeAction === "spawn" ? "a caller-supplied-id spawn" : `session/${activeAction}`;
101
107
  super(
102
- `Session "${sessionId}" is already being restored via session/${activeAction}; retry session/${requestedAction} after it completes`
108
+ reason === "awaiting_abandoned_cleanup" ? `Session "${sessionId}" timed out during ${activeTarget} and its abandoned restore has not settled yet; retry ${retryTarget} once cleanup completes` : activeAction === "spawn" ? `Session "${sessionId}" is already being registered by ${activeTarget}; retry ${retryTarget} after it completes` : `Session "${sessionId}" is already being restored via ${activeTarget}; retry ${retryTarget} after it completes`
103
109
  );
104
110
  this.name = "RestoreInProgressError";
105
111
  this.sessionId = sessionId;
106
112
  this.activeAction = activeAction;
107
113
  this.requestedAction = requestedAction;
114
+ this.reason = reason;
115
+ this.retryAfterSeconds = opts?.retryAfterSeconds ?? RESTORE_IN_PROGRESS_RETRY_AFTER_SECONDS;
108
116
  }
109
117
  };
110
118
  var InvalidSessionScopeError = class extends Error {
@@ -394,6 +402,27 @@ var WorkspaceDrainingError = class extends Error {
394
402
  this.workspaceCwd = workspaceCwd;
395
403
  }
396
404
  };
405
+ var BridgeChannelQuarantinedError = class extends Error {
406
+ static {
407
+ __name(this, "BridgeChannelQuarantinedError");
408
+ }
409
+ reason;
410
+ /**
411
+ * How long the caller should wait before retrying fresh session work. This
412
+ * state persists until the workspace channel drains, which is at least a
413
+ * restore budget away — the ordinary 5-second cadence would poll identical
414
+ * 503s, and a fresh id never reaches the 409 that carries the real hint.
415
+ */
416
+ retryAfterSeconds;
417
+ constructor(reason = "restore_cleanup_failed", retryAfterSeconds = RESTORE_IN_PROGRESS_RETRY_AFTER_SECONDS) {
418
+ super(
419
+ reason === "restore_settlement_overdue" ? "The ACP channel is unavailable for new sessions while an abandoned session restore has not settled" : "The ACP channel is unavailable for new sessions while timed-out restore cleanup is pending"
420
+ );
421
+ this.name = "BridgeChannelQuarantinedError";
422
+ this.reason = reason;
423
+ this.retryAfterSeconds = retryAfterSeconds;
424
+ }
425
+ };
397
426
  var InvalidRewindTargetError = class extends Error {
398
427
  static {
399
428
  __name(this, "InvalidRewindTargetError");
@@ -463,6 +492,7 @@ export {
463
492
  McpServerRestartFailedError,
464
493
  SessionBusyError,
465
494
  WorkspaceDrainingError,
495
+ BridgeChannelQuarantinedError,
466
496
  InvalidRewindTargetError,
467
497
  BranchWhilePromptActiveError,
468
498
  CdWhilePromptActiveError
@@ -18,7 +18,36 @@ var LOAD_REPLAY_VERSION = 1;
18
18
  var REQUESTED_SESSION_ID_META_KEY = "qwen-code/sessionId";
19
19
  var CHANNEL_STARTUP_PROFILE_META_KEY = "qwen.daemon.channelStartupProfile";
20
20
  var CHANNEL_STARTUP_PROFILE_VERSION = 1;
21
+ var ACTIVE_WORK_HEARTBEAT_META_KEY = "qwen.daemon.activeWorkHeartbeat";
22
+ var ACTIVE_WORK_HEARTBEAT_VERSION = 1;
23
+ var ACTIVE_WORK_HEARTBEAT_INTERVAL_MS = 15e3;
24
+ var ACTIVE_WORK_HEARTBEAT_MIN_INTERVAL_MS = 5e3;
25
+ var ACTIVE_WORK_HEARTBEAT_MAX_INTERVAL_MS = 6e4;
26
+ var ACTIVE_WORK_STALE_INTERVALS = 3;
27
+ var ACTIVE_WORK_NOTIFICATION_METHOD = "qwen/notify/channel/active-work";
28
+ var ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM = "onlyIfUnheld";
29
+ var ACTIVE_WORK_CLOSE_TIMEOUT_MS = 1e4;
30
+ var ACTIVE_WORK_MAX_SNAPSHOT_SESSIONS = 1024;
31
+ var ACTIVE_WORK_MAX_SESSION_HOLDS = 1024;
21
32
  var WORKTREE_MCP_DEFER_META_KEY = "qwen.session.deferMcpDiscovery";
33
+ var ACTIVE_WORK_HOLD_CATEGORIES = [
34
+ "agent",
35
+ "notification"
36
+ ];
37
+ function clampActiveWorkIntervalMs(raw) {
38
+ const value = typeof raw === "number" && Number.isFinite(raw) ? raw : NaN;
39
+ if (Number.isNaN(value)) return ACTIVE_WORK_HEARTBEAT_INTERVAL_MS;
40
+ return Math.min(
41
+ ACTIVE_WORK_HEARTBEAT_MAX_INTERVAL_MS,
42
+ Math.max(ACTIVE_WORK_HEARTBEAT_MIN_INTERVAL_MS, Math.round(value))
43
+ );
44
+ }
45
+ __name(clampActiveWorkIntervalMs, "clampActiveWorkIntervalMs");
46
+ function gradeActiveWorkCoverage(totals) {
47
+ if (totals.total === 0 || totals.covered === totals.total) return "full";
48
+ return totals.onNegotiatedChannel === 0 ? "none" : "partial";
49
+ }
50
+ __name(gradeActiveWorkCoverage, "gradeActiveWorkCoverage");
22
51
  var DAEMON_MODEL_PROMPT_META_KEY = "qwen.daemon.modelPrompt";
23
52
  var MAX_TRUSTED_MODEL_PROMPT_CHARS = 64 * 1024;
24
53
  function isValidTrustedModelPrompt(value) {
@@ -42,7 +71,19 @@ export {
42
71
  REQUESTED_SESSION_ID_META_KEY,
43
72
  CHANNEL_STARTUP_PROFILE_META_KEY,
44
73
  CHANNEL_STARTUP_PROFILE_VERSION,
74
+ ACTIVE_WORK_HEARTBEAT_META_KEY,
75
+ ACTIVE_WORK_HEARTBEAT_VERSION,
76
+ ACTIVE_WORK_HEARTBEAT_INTERVAL_MS,
77
+ ACTIVE_WORK_STALE_INTERVALS,
78
+ ACTIVE_WORK_NOTIFICATION_METHOD,
79
+ ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
80
+ ACTIVE_WORK_CLOSE_TIMEOUT_MS,
81
+ ACTIVE_WORK_MAX_SNAPSHOT_SESSIONS,
82
+ ACTIVE_WORK_MAX_SESSION_HOLDS,
45
83
  WORKTREE_MCP_DEFER_META_KEY,
84
+ ACTIVE_WORK_HOLD_CATEGORIES,
85
+ clampActiveWorkIntervalMs,
86
+ gradeActiveWorkCoverage,
46
87
  DAEMON_MODEL_PROMPT_META_KEY,
47
88
  isValidTrustedModelPrompt,
48
89
  DAEMON_CHANNEL_DELIVERY_META_KEY,
@@ -35,7 +35,7 @@ import {
35
35
  createWorkerDiagnosticRedactor,
36
36
  normalizeWorkerDiagnostic,
37
37
  sanitizeWorkerDiagnostic
38
- } from "./chunk-24ER7UV4.js";
38
+ } from "./chunk-PBRVUF5B.js";
39
39
  import {
40
40
  channelSelectionNames
41
41
  } from "./chunk-ALMR3E6Q.js";
@@ -49,7 +49,7 @@ import {
49
49
  } from "./chunk-5HBA2Z7V.js";
50
50
  import {
51
51
  sanitizeLogText
52
- } from "./chunk-DIEFUBV6.js";
52
+ } from "./chunk-DX3RGJMS.js";
53
53
  import {
54
54
  init_esbuild_shims
55
55
  } from "./chunk-5O2XNYP6.js";
@@ -180,6 +180,7 @@ __name(hasObservedExit, "hasObservedExit");
180
180
  function createWorkerEnv(opts) {
181
181
  const env = { ...opts.baseEnv ?? process.env };
182
182
  env["QWEN_CODE_NO_RELAUNCH"] = "true";
183
+ env["QWEN_CODE_SERVE"] = "1";
183
184
  env[CHANNEL_DAEMON_WORKER_SENTINEL] = randomUUID();
184
185
  env[QWEN_DAEMON_URL_ENV] = opts.daemonUrl;
185
186
  env[QWEN_DAEMON_WORKSPACE_ENV] = opts.workspace;