@qwen-code/qwen-code 0.21.7-nightly.20260808.4ec0371e6 → 0.21.8

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 (254) hide show
  1. package/README.md +2 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +12 -8
  3. package/bundled/qc-helper/docs/features/commands.md +1 -1
  4. package/bundled/qc-helper/docs/features/hooks.md +50 -0
  5. package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
  6. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  7. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -36
  8. package/bundled/review/SKILL.md +24 -5
  9. package/chunks/{MaxSizedBox-COZBVNCI.js → MaxSizedBox-7PM6BGJ5.js} +13 -10
  10. package/chunks/{StandaloneSessionPicker-3OF2FS6S.js → StandaloneSessionPicker-3UQHM7GV.js} +29 -26
  11. package/chunks/{acp-startup-profiler-ORIQ2CCQ.js → acp-startup-profiler-B5BYAMYQ.js} +2 -2
  12. package/chunks/{acpAgent-3JCJ6KWG.js → acpAgent-5UWLFV6V.js} +369 -148
  13. package/chunks/{agent-DBSC47CD.js → agent-624T2BLO.js} +13 -10
  14. package/chunks/{agent-headless-ZJHZ7I3S.js → agent-headless-2EE5J2KX.js} +13 -10
  15. package/chunks/{bridge-NFBYT4ZI.js → bridge-JENKGFFP.js} +15 -12
  16. package/chunks/{ca-NYKNH222.js → ca-ZLKAB4K3.js} +6 -0
  17. package/chunks/{channel-management-service-LXSJXQGM.js → channel-management-service-DDWUPHMU.js} +1 -1
  18. package/chunks/{channel-settings-store-LABKDKSI.js → channel-settings-store-SA6JZSPH.js} +21 -18
  19. package/chunks/{channel-worker-group-MTW2AGT3.js → channel-worker-group-E67EN3RV.js} +2 -2
  20. package/chunks/{channel-worker-manager-UU6PTQSI.js → channel-worker-manager-SW4C45CF.js} +2 -2
  21. package/chunks/{chunk-CJXIIILK.js → chunk-2FRY5CRX.js} +1 -1
  22. package/chunks/{chunk-HKCYGZZ4.js → chunk-2ILAOM2I.js} +30 -13
  23. package/chunks/{chunk-LDY4J4G6.js → chunk-2M4K4KYS.js} +176 -119
  24. package/chunks/{chunk-22NBYCPD.js → chunk-3P2LV43B.js} +1 -1
  25. package/chunks/{chunk-XCG76UE6.js → chunk-3PY4LPJF.js} +17 -129
  26. package/chunks/{chunk-26ISE5EG.js → chunk-3SE7J4DR.js} +3 -3
  27. package/chunks/{chunk-APMRLB2H.js → chunk-3WNQOYHQ.js} +12 -12
  28. package/chunks/{chunk-O7VQ3F22.js → chunk-4ALIARFY.js} +1 -1
  29. package/chunks/{chunk-FJ6YHWHZ.js → chunk-4DU3NCHG.js} +47 -54
  30. package/chunks/{chunk-BGG4MBYD.js → chunk-4PYCZH2V.js} +4 -187
  31. package/chunks/{chunk-3HS6Y4UA.js → chunk-4WU6NY7F.js} +2 -2
  32. package/chunks/{chunk-JRIJOZXO.js → chunk-5ZGR6RKJ.js} +3 -3
  33. package/chunks/{chunk-3K7FH2KQ.js → chunk-67N6HB5H.js} +1310 -171
  34. package/chunks/{chunk-ZQGHESAS.js → chunk-6TR7CFXH.js} +1 -1
  35. package/chunks/{chunk-EZ53KMUN.js → chunk-757GB46F.js} +1 -1
  36. package/chunks/{chunk-5YT3Y33M.js → chunk-77QVBFCU.js} +3 -3
  37. package/chunks/{chunk-5PGKKSO6.js → chunk-7DVT4LVV.js} +35 -28
  38. package/chunks/{chunk-IMK3SJ43.js → chunk-7VUERJHS.js} +1066 -597
  39. package/chunks/{chunk-KPMB4JEZ.js → chunk-B52AWKBB.js} +64 -20
  40. package/chunks/{chunk-R2KZWK5Z.js → chunk-BF224XHL.js} +2 -2
  41. package/chunks/{chunk-TSYIQDG7.js → chunk-BF52U4XJ.js} +1 -1
  42. package/chunks/{chunk-LDUGDB5H.js → chunk-C5VWPTGT.js} +1 -1
  43. package/chunks/{chunk-W7U4ESW2.js → chunk-CG3WBKJK.js} +1 -1
  44. package/chunks/chunk-COBO5EBO.js +135 -0
  45. package/chunks/{chunk-ACHMWGC5.js → chunk-DQSDACD2.js} +1 -1
  46. package/chunks/{chunk-VT3VNFVW.js → chunk-DX5W5AON.js} +2 -2
  47. package/chunks/{chunk-JACAHYEN.js → chunk-E4ZBKMSF.js} +4 -4
  48. package/chunks/{chunk-MV7VUCIG.js → chunk-EIVICVHM.js} +4 -4
  49. package/chunks/{chunk-YHEEE624.js → chunk-EN2TKTFH.js} +1 -1
  50. package/chunks/chunk-F6WFNA7U.js +22 -0
  51. package/chunks/{chunk-Z6W3XDLN.js → chunk-FN6YXJOP.js} +1 -1
  52. package/chunks/{chunk-BJKFFPX2.js → chunk-FWBXMANW.js} +3 -3
  53. package/chunks/{chunk-764F335K.js → chunk-FYAXKJK7.js} +314 -63
  54. package/chunks/{chunk-XIDHBXUI.js → chunk-GBDINRIL.js} +3 -3
  55. package/chunks/{chunk-Z5ZAWED3.js → chunk-GOEVOFQI.js} +3 -3
  56. package/chunks/{chunk-ZKUJ4AO7.js → chunk-GQCEQPYQ.js} +3 -3
  57. package/chunks/{chunk-BFSQBXHV.js → chunk-GXSNGY5M.js} +399 -534
  58. package/chunks/{chunk-3ARO4N5G.js → chunk-HA3SAB64.js} +22 -69
  59. package/chunks/{chunk-3ULCB3NE.js → chunk-HV76SFIA.js} +1 -1
  60. package/chunks/{chunk-LMEIS6WW.js → chunk-HWX5HPUG.js} +3 -3
  61. package/chunks/{chunk-VLFX3L3X.js → chunk-IBYULW65.js} +6 -6
  62. package/chunks/{chunk-SDUDZNF4.js → chunk-IUQ52YJK.js} +1 -1
  63. package/chunks/{chunk-H2352CX2.js → chunk-IYES5WOT.js} +2 -2
  64. package/chunks/{chunk-CE5UCTKO.js → chunk-KAQCJO6Y.js} +1 -1
  65. package/chunks/{chunk-DPH3MUAP.js → chunk-KKDVZLGL.js} +1 -1
  66. package/chunks/{chunk-R574ATRM.js → chunk-M2PNLYGY.js} +41 -0
  67. package/chunks/{chunk-P7HUJDBZ.js → chunk-M3STHEMM.js} +11 -16
  68. package/chunks/{chunk-VDS2WYM5.js → chunk-NGYI5EF5.js} +2 -2
  69. package/chunks/{chunk-ALGGS7UH.js → chunk-NPQ5ZKRP.js} +82 -1
  70. package/chunks/{chunk-GUFY6D3E.js → chunk-NPUXXRJI.js} +1 -1
  71. package/chunks/{chunk-4Q6N3SNL.js → chunk-NVRDQFCX.js} +1 -1
  72. package/chunks/{chunk-77WOUGCA.js → chunk-OHKJVAKG.js} +7 -7
  73. package/chunks/{chunk-TAOSTUHI.js → chunk-PG62DFWD.js} +10 -10
  74. package/chunks/{chunk-REHWPCG2.js → chunk-PLFATELK.js} +1 -1
  75. package/chunks/{chunk-APNNM3JC.js → chunk-QGHSP65Z.js} +2 -2
  76. package/chunks/{chunk-HY2INPTA.js → chunk-QQWD7LZV.js} +4 -4
  77. package/chunks/{chunk-P74TZRXD.js → chunk-QXVSWG66.js} +1 -1
  78. package/chunks/{chunk-TX3KSSDN.js → chunk-S3Y3GBFD.js} +1 -1
  79. package/chunks/{chunk-B23P3YWE.js → chunk-SNRT2TJJ.js} +6 -23
  80. package/chunks/chunk-SR7RZ4MS.js +202 -0
  81. package/chunks/{chunk-F3LPXDJP.js → chunk-TE3ZAJE7.js} +13 -3
  82. package/chunks/{chunk-AB4A73VL.js → chunk-TKSZJ5BV.js} +1 -1
  83. package/chunks/{chunk-RZMGG3HP.js → chunk-U5SLIG7E.js} +1 -1
  84. package/chunks/chunk-UA5H3DS2.js +203 -0
  85. package/chunks/{chunk-JSJTZ6GO.js → chunk-VWMUDKLC.js} +3 -3
  86. package/chunks/{chunk-RGTB44BO.js → chunk-VXZ5HAOV.js} +1 -1
  87. package/chunks/{chunk-BCMJPTXV.js → chunk-WG6542MA.js} +1 -1
  88. package/chunks/{chunk-AG3P2RES.js → chunk-WV5J6Q6N.js} +1 -1
  89. package/chunks/{chunk-MIA37QO3.js → chunk-XHD7CRP2.js} +2 -2
  90. package/chunks/{chunk-KKRGVSHC.js → chunk-XZKQT2B2.js} +4 -4
  91. package/chunks/{chunk-4QJJHIZ5.js → chunk-Y4TETC74.js} +5 -5
  92. package/chunks/{chunk-QKJT5K4Q.js → chunk-YEF7XEO2.js} +3 -3
  93. package/chunks/{chunk-UKAYEQDU.js → chunk-YHJFF7KH.js} +131 -38
  94. package/chunks/{chunk-64YLXLMY.js → chunk-YOM7DEGB.js} +2 -2
  95. package/chunks/{chunk-BN3OROB3.js → chunk-ZCLLJARV.js} +9 -9
  96. package/chunks/{chunk-RFA6VDCR.js → chunk-ZHA242R4.js} +2 -2
  97. package/chunks/{chunk-L4OW63GW.js → chunk-ZPLALRXZ.js} +17 -9
  98. package/chunks/{computer-use-QLJ27OCZ.js → computer-use-ESQYJ3JY.js} +13 -10
  99. package/chunks/{config-utils-KIEXWA4F.js → config-utils-XQHBJP7G.js} +2 -2
  100. package/chunks/{contextCommand-JDTOJRBO.js → contextCommand-CX3YF4ZE.js} +15 -12
  101. package/chunks/{core-runtime-MZIAVYQC.js → core-runtime-DIAU7JMG.js} +13 -10
  102. package/chunks/{create-sub-session-YBBCNSHE.js → create-sub-session-HDPD6HOA.js} +13 -10
  103. package/chunks/{daemon-SCTQMM7Z.js → daemon-VZBGJUNL.js} +30 -0
  104. package/chunks/{daemon-status-provider-BZ7RD4ZJ.js → daemon-status-provider-H6O4UQ4F.js} +19 -16
  105. package/chunks/{daemon-trust-policy-2E4C3M7S.js → daemon-trust-policy-BNUXG6MT.js} +20 -17
  106. package/chunks/{daemon-trust-policy-monitor-UYLFH6RW.js → daemon-trust-policy-monitor-E4EQ7GF4.js} +20 -17
  107. package/chunks/{de-VL76CPLV.js → de-LIW4XVLN.js} +5 -0
  108. package/chunks/{deferred-core-runtime-6XZYMJZB.js → deferred-core-runtime-CBMSHPAU.js} +13 -10
  109. package/chunks/{dist-BATY7GI4.js → dist-EEEQGCZA.js} +731 -136
  110. package/chunks/{dist-26RK5XZO.js → dist-MKX5OSFF.js} +4 -3
  111. package/chunks/{earlyInputCapture-LATQCGDC.js → earlyInputCapture-UIOP7OIN.js} +13 -10
  112. package/chunks/{edit-72DP57CD.js → edit-ITMZYFKA.js} +13 -10
  113. package/chunks/{en-IRJ2WN5T.js → en-SY5GTIGX.js} +6 -0
  114. package/chunks/{enter-worktree-B4FY2ZPP.js → enter-worktree-S4PL5UV6.js} +13 -10
  115. package/chunks/{enterPlanMode-TQBWGCPL.js → enterPlanMode-YV52NNJT.js} +13 -10
  116. package/chunks/{environment-MOGZGZDS.js → environment-NGOWPRZV.js} +17 -14
  117. package/chunks/{errors-PGON5GH7.js → errors-BU26DTDX.js} +15 -12
  118. package/chunks/{exit-worktree-EYUD4YP2.js → exit-worktree-XRM6LH5F.js} +13 -10
  119. package/chunks/{exitPlanMode-4Q7BSQXR.js → exitPlanMode-ZLI5F7KR.js} +13 -10
  120. package/chunks/{fast-path-WI7D5MER.js → fast-path-UJWORIED.js} +3 -3
  121. package/chunks/{fast-path-settings-YBRL24DB.js → fast-path-settings-37WQD5B2.js} +6 -3
  122. package/chunks/{fr-GK3HQYVB.js → fr-RQFO7U4P.js} +5 -0
  123. package/chunks/{gemini-ZXURGM6Y.js → gemini-ZSKNDUMU.js} +55 -48
  124. package/chunks/{geminiContentGenerator-EOODO75Y.js → geminiContentGenerator-YGEXOEKD.js} +1 -1
  125. package/chunks/{glob-QNRIUOS6.js → glob-7KZG44BR.js} +13 -10
  126. package/chunks/{goal-tools-QSYW65HV.js → goal-tools-PXWN5VK3.js} +3 -1
  127. package/chunks/{grep-56MTW67B.js → grep-6ZFC7RJ5.js} +13 -10
  128. package/chunks/{handleAutoUpdate-XGFIPVT4.js → handleAutoUpdate-KSEL3TQS.js} +17 -14
  129. package/chunks/{i18n-RZB35L4B.js → i18n-ZIUXBW5V.js} +14 -11
  130. package/chunks/{image-gen-OE2EEKN3.js → image-gen-AUIZJJNK.js} +6 -4
  131. package/chunks/{initializer-YPVMTMKD.js → initializer-7AHY3N6Q.js} +20 -17
  132. package/chunks/{installationInfo-ZTMTMYNW.js → installationInfo-VGBXMYLY.js} +14 -11
  133. package/chunks/{ja-3FA46IKD.js → ja-KOZKHJHZ.js} +5 -0
  134. package/chunks/{list-NIW3WID5.js → list-PSFKQHLB.js} +23 -20
  135. package/chunks/{loadedSettingsAdapter-VSLILTOZ.js → loadedSettingsAdapter-FTMRCTOF.js} +20 -17
  136. package/chunks/{loggingContentGenerator-KFZYVAGV.js → loggingContentGenerator-MZAN52UV.js} +5 -3
  137. package/chunks/{managed-npm-update-WHTA2K5V.js → managed-npm-update-O4NHK45X.js} +14 -11
  138. package/chunks/{mcp-7KGK3CS3.js → mcp-6CFP2AYQ.js} +20 -17
  139. package/chunks/{monitor-FDWEJQWP.js → monitor-DAKD6OU4.js} +13 -10
  140. package/chunks/{nonInteractiveCli-2MVJ6TCS.js → nonInteractiveCli-RC7VIUZL.js} +49 -44
  141. package/chunks/{notebook-edit-ZUVK2XWE.js → notebook-edit-474DPMRL.js} +13 -10
  142. package/chunks/{openaiContentGenerator-TNLWOPH5.js → openaiContentGenerator-2NFY2MWO.js} +6 -3
  143. package/chunks/{pidfile-BB6SKPH2.js → pidfile-KBFVDNQP.js} +13 -10
  144. package/chunks/{processUtils-WKHJOPDH.js → processUtils-6GRYH4Y3.js} +2 -2
  145. package/chunks/{pt-3AOBKPIJ.js → pt-U6AOCTMF.js} +5 -0
  146. package/chunks/{qwenContentGenerator-FZS2DYF7.js → qwenContentGenerator-KAHU6IZY.js} +14 -11
  147. package/chunks/{qwenOAuth2-UYMYRXBB.js → qwenOAuth2-RRQTCP4W.js} +6 -4
  148. package/chunks/{read-file-FMTE6LPA.js → read-file-3M6WXDXP.js} +4 -2
  149. package/chunks/{resumeHistoryUtils-Z34RCZFF.js → resumeHistoryUtils-D6TAY3HX.js} +16 -13
  150. package/chunks/{ripGrep-DUIYUZGM.js → ripGrep-PLPENT3E.js} +13 -10
  151. package/chunks/{ru-VJRAMC4W.js → ru-CMX4UMYP.js} +5 -0
  152. package/chunks/{run-qwen-serve-KOHHR3F4.js → run-qwen-serve-ZAFIJKJC.js} +93 -40
  153. package/chunks/{runtime-K4NTZSAU.js → runtime-ZED7CYOZ.js} +23 -20
  154. package/chunks/{scheduler-6G6AMURS.js → scheduler-MD3AL2W5.js} +13 -10
  155. package/chunks/{serve-NMG2TM5K.js → serve-E3VUDRZN.js} +20 -17
  156. package/chunks/{server-FS7KDELS.js → server-OWMEMAKR.js} +381 -192
  157. package/chunks/{session-XZADUVKJ.js → session-HZ57QK7K.js} +141 -81
  158. package/chunks/{settings-G75R6FOA.js → settings-V7BR3RKP.js} +19 -16
  159. package/chunks/{shell-3D3PMQHE.js → shell-23OMNMW6.js} +13 -10
  160. package/chunks/{skill-TSEYMVQ2.js → skill-6HBDYZRS.js} +4 -2
  161. package/chunks/{skill-settings-HJC2CPBJ.js → skill-settings-HWJLTU7M.js} +19 -16
  162. package/chunks/{spawnChannel-YWCN74G5.js → spawnChannel-N6KKUW5B.js} +13 -10
  163. package/chunks/{standalone-update-HLYOLX6V.js → standalone-update-QGIKHATD.js} +15 -12
  164. package/chunks/{startInteractiveUI-ROUIQ5KU.js → startInteractiveUI-GX2CRL42.js} +269 -118
  165. package/chunks/{team-create-OTP5SSB2.js → team-create-CFFKU7KL.js} +13 -10
  166. package/chunks/{team-plan-approval-TQX5TMXU.js → team-plan-approval-6EFOKR6A.js} +13 -10
  167. package/chunks/{terminal-image-renderer-KF3GKNWW.js → terminal-image-renderer-TLDNACQY.js} +13 -10
  168. package/chunks/{theme-manager-XVWAAGAM.js → theme-manager-5LJ3H7VO.js} +13 -10
  169. package/chunks/{tool-search-7N4D4O56.js → tool-search-UJV3A24H.js} +4 -2
  170. package/chunks/{total-session-admission-ZQ4VKIRW.js → total-session-admission-D63QYXGO.js} +15 -12
  171. package/chunks/{trustedFolders-4XYFPWVV.js → trustedFolders-KZCOB53W.js} +17 -12
  172. package/chunks/{update-relaunch-L4GSBLUU.js → update-relaunch-IFILM3SA.js} +5 -5
  173. package/chunks/{updateCheck-PCUTVRFE.js → updateCheck-YZ2CRCFC.js} +16 -13
  174. package/chunks/{useAutoAcceptIndicator-WMXY7MND.js → useAutoAcceptIndicator-AXEVNA3Q.js} +22 -19
  175. package/chunks/{validateNonInterActiveAuth-5S3U2D56.js → validateNonInterActiveAuth-3WTOJFWA.js} +44 -41
  176. package/chunks/{version-P57IQU2T.js → version-GXK7OHZY.js} +1 -1
  177. package/chunks/{web-fetch-5ZLLLCDD.js → web-fetch-ILB4GAVR.js} +10 -6
  178. package/chunks/{web-search-NELKANTW.js → web-search-HKRPGPZZ.js} +5 -3
  179. package/chunks/{workflow-RXKBF3LO.js → workflow-FXIPRQQA.js} +735 -134
  180. package/chunks/{workspace-providers-status-HAEMNAWC.js → workspace-providers-status-NYHC7HSR.js} +22 -19
  181. package/chunks/{workspace-registration-store-U3U3YM6V.js → workspace-registration-store-AKEB7OMW.js} +1 -1
  182. package/chunks/{workspace-registry-ZFP33GVB.js → workspace-registry-CDAS5TVZ.js} +15 -12
  183. package/chunks/{workspace-service-QMISJBMA.js → workspace-service-PAMUKMAV.js} +23 -20
  184. package/chunks/{workspace-skills-status-K7EOUGXL.js → workspace-skills-status-YQSHCCMS.js} +20 -17
  185. package/chunks/{workspace-trust-reconciler-BFPKULDZ.js → workspace-trust-reconciler-RPTXOIY2.js} +22 -19
  186. package/chunks/{write-file-2F76RRFE.js → write-file-CGS57TS4.js} +13 -10
  187. package/chunks/{zh-ARWDLDLR.js → zh-AGL2FVBI.js} +6 -0
  188. package/chunks/{zh-TW-Y4RGI3P7.js → zh-TW-KI66MHQY.js} +6 -0
  189. package/chunks/{zoom-image-DPR22XWY.js → zoom-image-E7D72GYV.js} +4 -2
  190. package/cli.js +13 -13
  191. package/locales/ca.js +10 -0
  192. package/locales/de.js +9 -0
  193. package/locales/en.js +10 -0
  194. package/locales/fr.js +9 -0
  195. package/locales/ja.js +9 -0
  196. package/locales/pt.js +9 -0
  197. package/locales/ru.js +9 -0
  198. package/locales/zh-TW.js +10 -0
  199. package/locales/zh.js +10 -0
  200. package/package.json +3 -3
  201. package/web-shell/assets/{arc-CunFPPcQ.js → arc-DybZaz32.js} +1 -1
  202. package/web-shell/assets/{architectureDiagram-3BPJPVTR-D3SqCgeM.js → architectureDiagram-3BPJPVTR-jN3qBd19.js} +1 -1
  203. package/web-shell/assets/{blockDiagram-GPEHLZMM-CPRx90S_.js → blockDiagram-GPEHLZMM-Ct5DZPrj.js} +1 -1
  204. package/web-shell/assets/{c4Diagram-AAUBKEIU-CahP9Ue4.js → c4Diagram-AAUBKEIU-CUAFMlUG.js} +1 -1
  205. package/web-shell/assets/channel-BMwLrwLW.js +1 -0
  206. package/web-shell/assets/{chunk-2J33WTMH-DckIWZ12.js → chunk-2J33WTMH-CuV8n90B.js} +1 -1
  207. package/web-shell/assets/{chunk-4BX2VUAB-D2Kfctyn.js → chunk-4BX2VUAB-BUzl_kls.js} +1 -1
  208. package/web-shell/assets/{chunk-55IACEB6-DkI11FTX.js → chunk-55IACEB6-BnDBLX6A.js} +1 -1
  209. package/web-shell/assets/{chunk-727SXJPM-rR-TSCIi.js → chunk-727SXJPM-B83uTOjm.js} +1 -1
  210. package/web-shell/assets/{chunk-AQP2D5EJ-DFGKcGRO.js → chunk-AQP2D5EJ-DM3HLgpT.js} +1 -1
  211. package/web-shell/assets/{chunk-FMBD7UC4-CjWqcTPE.js → chunk-FMBD7UC4-CSQ5hgyb.js} +1 -1
  212. package/web-shell/assets/{chunk-ND2GUHAM-RXe-87UV.js → chunk-ND2GUHAM-BWOF4SxX.js} +1 -1
  213. package/web-shell/assets/{chunk-QZHKN3VN-Dz0c_Yrn.js → chunk-QZHKN3VN-BsOH9LMi.js} +1 -1
  214. package/web-shell/assets/classDiagram-4FO5ZUOK-BGDv98jY.js +1 -0
  215. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BGDv98jY.js +1 -0
  216. package/web-shell/assets/{cose-bilkent-S5V4N54A-ZHF0-jvV.js → cose-bilkent-S5V4N54A-IENqH2iJ.js} +1 -1
  217. package/web-shell/assets/{dagre-BM42HDAG-7Umz_ygJ.js → dagre-BM42HDAG--dyzDTGo.js} +1 -1
  218. package/web-shell/assets/{diagram-2AECGRRQ-DomN8nxq.js → diagram-2AECGRRQ-BE7Dcqof.js} +1 -1
  219. package/web-shell/assets/{diagram-5GNKFQAL-eebvj2OL.js → diagram-5GNKFQAL-Cr8-5OTj.js} +1 -1
  220. package/web-shell/assets/{diagram-KO2AKTUF-IR1mmn9d.js → diagram-KO2AKTUF-Bzey3uAY.js} +1 -1
  221. package/web-shell/assets/{diagram-LMA3HP47-CKysx5KF.js → diagram-LMA3HP47-sErl28Xb.js} +1 -1
  222. package/web-shell/assets/{diagram-OG6HWLK6-cBy5puHn.js → diagram-OG6HWLK6-Dq30ATIo.js} +1 -1
  223. package/web-shell/assets/{erDiagram-TEJ5UH35-B5RJagPG.js → erDiagram-TEJ5UH35-BkCoEfVW.js} +1 -1
  224. package/web-shell/assets/{flowDiagram-I6XJVG4X-CfHgDmPg.js → flowDiagram-I6XJVG4X-DHwO0rrI.js} +1 -1
  225. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DUfFF5nb.js → ganttDiagram-6RSMTGT7-s7vAPxWq.js} +1 -1
  226. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-M9dt57k5.js → gitGraphDiagram-PVQCEYII-CQxhwPOU.js} +1 -1
  227. package/web-shell/assets/{index-B8e-CkuC.css → index-Bckpjr-I.css} +1 -1
  228. package/web-shell/assets/{index-CKjO4myk.js → index-CF4wApWp.js} +1 -1
  229. package/web-shell/assets/{index-Dc-fTO0V.js → index-DwEr9HEW.js} +316 -316
  230. package/web-shell/assets/{infoDiagram-5YYISTIA-CTKMmIro.js → infoDiagram-5YYISTIA-BnFrD0bq.js} +1 -1
  231. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DJIJDP4s.js → ishikawaDiagram-YF4QCWOH-Bf9zK5NK.js} +1 -1
  232. package/web-shell/assets/{journeyDiagram-JHISSGLW-DgRnvn6S.js → journeyDiagram-JHISSGLW-CyGAhsxi.js} +1 -1
  233. package/web-shell/assets/{kanban-definition-UN3LZRKU-VUwO8yrg.js → kanban-definition-UN3LZRKU-CbsK5akB.js} +1 -1
  234. package/web-shell/assets/{linear-BCvgV5I_.js → linear-cQsF4P8D.js} +1 -1
  235. package/web-shell/assets/{mermaid.core-mv_kVV6q.js → mermaid.core-Z4HVqrKY.js} +5 -5
  236. package/web-shell/assets/{mindmap-definition-RKZ34NQL-sfnjMlOd.js → mindmap-definition-RKZ34NQL-CYnrBo_f.js} +1 -1
  237. package/web-shell/assets/{pieDiagram-4H26LBE5-BlhICse4.js → pieDiagram-4H26LBE5-CBzOfhrs.js} +1 -1
  238. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BgTQzwen.js → quadrantDiagram-W4KKPZXB-D4LK1Ebn.js} +1 -1
  239. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CZ-FTrrN.js → requirementDiagram-4Y6WPE33-Bzti2Lcj.js} +1 -1
  240. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-G5Wp_jn3.js → sankeyDiagram-5OEKKPKP-yTBw5Z2s.js} +1 -1
  241. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-C8MKZ3i1.js → sequenceDiagram-3UESZ5HK-D07UVRiZ.js} +1 -1
  242. package/web-shell/assets/{stateDiagram-AJRCARHV-Bo0ZDm7y.js → stateDiagram-AJRCARHV-UE_lHsTn.js} +1 -1
  243. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DC6xgXjX.js +1 -0
  244. package/web-shell/assets/{timeline-definition-PNZ67QCA-M3L9E01f.js → timeline-definition-PNZ67QCA-DRvYdiTs.js} +1 -1
  245. package/web-shell/assets/{vennDiagram-CIIHVFJN-DD4eHCrm.js → vennDiagram-CIIHVFJN-CQLIXs0u.js} +1 -1
  246. package/web-shell/assets/{wardley-L42UT6IY-DNEL_3g4.js → wardley-L42UT6IY-JZz_Xqse.js} +1 -1
  247. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-q484OoqI.js → wardleyDiagram-YWT4CUSO--i7BiJwB.js} +1 -1
  248. package/web-shell/assets/{xychartDiagram-2RQKCTM6-4mcNt1Yg.js → xychartDiagram-2RQKCTM6-Bkc-bW0S.js} +1 -1
  249. package/web-shell/index.html +2 -2
  250. package/chunks/chunk-ALFTV7GA.js +0 -92
  251. package/web-shell/assets/channel-zbv7GWAw.js +0 -1
  252. package/web-shell/assets/classDiagram-4FO5ZUOK-DSjLkJJZ.js +0 -1
  253. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DSjLkJJZ.js +0 -1
  254. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-31TSCPcH.js +0 -1
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  recomputeMcpGating
5
- } from "./chunk-QKJT5K4Q.js";
5
+ } from "./chunk-YEF7XEO2.js";
6
6
  import {
7
7
  classifyApiError,
8
8
  fireSessionDeleteHook
@@ -16,14 +16,14 @@ import {
16
16
  matchMcpServerByRef,
17
17
  parseExtensionRef,
18
18
  parseMcpServerRef
19
- } from "./chunk-BJKFFPX2.js";
19
+ } from "./chunk-FWBXMANW.js";
20
20
  import {
21
21
  getAvailableCommands,
22
22
  handleSlashCommand,
23
23
  insertAfterFunctionResponses,
24
24
  isSlashCommand,
25
25
  normalizePartList
26
- } from "./chunk-UKAYEQDU.js";
26
+ } from "./chunk-YHJFF7KH.js";
27
27
  import {
28
28
  SessionIdConflictError,
29
29
  appEvents,
@@ -31,36 +31,36 @@ import {
31
31
  cleanupReviewWorktreeLeases,
32
32
  loadCliConfig,
33
33
  normalizeDisabledToolList
34
- } from "./chunk-IMK3SJ43.js";
34
+ } from "./chunk-7VUERJHS.js";
35
35
  import {
36
36
  getCommandSubcommandNames
37
- } from "./chunk-4Q6N3SNL.js";
37
+ } from "./chunk-NVRDQFCX.js";
38
38
  import {
39
39
  getEffectiveSupportedModes
40
- } from "./chunk-MIA37QO3.js";
40
+ } from "./chunk-XHD7CRP2.js";
41
41
  import "./chunk-NYX53SV4.js";
42
- import "./chunk-YHEEE624.js";
42
+ import "./chunk-EN2TKTFH.js";
43
43
  import {
44
44
  collectContextData,
45
45
  formatContextUsageText
46
- } from "./chunk-Z5ZAWED3.js";
46
+ } from "./chunk-GOEVOFQI.js";
47
47
  import "./chunk-4WGODMVR.js";
48
- import "./chunk-RFA6VDCR.js";
48
+ import "./chunk-ZHA242R4.js";
49
49
  import "./chunk-YAF2MQZ6.js";
50
50
  import "./chunk-CTJLZLB5.js";
51
51
  import {
52
52
  computeCpuPercent
53
53
  } from "./chunk-LBOVL47Y.js";
54
- import "./chunk-LMEIS6WW.js";
54
+ import "./chunk-HWX5HPUG.js";
55
55
  import "./chunk-6H67XLET.js";
56
56
  import {
57
57
  beginAcpBootstrapConfigProfiling,
58
58
  buildAndFreezeAcpStartupProfile,
59
59
  endAcpBootstrapConfigProfiling,
60
60
  markAcpStartup
61
- } from "./chunk-W7U4ESW2.js";
62
- import "./chunk-MV7VUCIG.js";
63
- import "./chunk-H2352CX2.js";
61
+ } from "./chunk-CG3WBKJK.js";
62
+ import "./chunk-EIVICVHM.js";
63
+ import "./chunk-IYES5WOT.js";
64
64
  import {
65
65
  GENERATION_MAX_PROMPT_BYTES,
66
66
  GENERATION_TIMEOUT_MS,
@@ -83,7 +83,7 @@ import {
83
83
  shouldSuppressRememberErrorDetails,
84
84
  workspaceMemoryFailureCode,
85
85
  workspaceMemoryFailureDiagnostics
86
- } from "./chunk-L4OW63GW.js";
86
+ } from "./chunk-ZPLALRXZ.js";
87
87
  import {
88
88
  HistoryReplayer,
89
89
  MessageEmitter,
@@ -93,9 +93,9 @@ import {
93
93
  goalTerminalEventToHistoryItem,
94
94
  recordGoalStatusItem,
95
95
  restoreGoalFromHistory
96
- } from "./chunk-LDY4J4G6.js";
96
+ } from "./chunk-2M4K4KYS.js";
97
97
  import "./chunk-OWMAZHIX.js";
98
- import "./chunk-O7VQ3F22.js";
98
+ import "./chunk-4ALIARFY.js";
99
99
  import "./chunk-4NFY2S7N.js";
100
100
  import "./chunk-2MIN6GRR.js";
101
101
  import "./chunk-QHTIBUWB.js";
@@ -113,7 +113,7 @@ import {
113
113
  parseAcpModelOption,
114
114
  resolveAcpModelOption,
115
115
  sanitizeProviderBaseUrl
116
- } from "./chunk-XIDHBXUI.js";
116
+ } from "./chunk-GBDINRIL.js";
117
117
  import {
118
118
  mapSkillConfigToStatus
119
119
  } from "./chunk-BGXZBI5B.js";
@@ -123,32 +123,32 @@ import {
123
123
  buildPermissionSettings,
124
124
  normalizePermissionRules,
125
125
  readPermissionRuleSet
126
- } from "./chunk-DPH3MUAP.js";
126
+ } from "./chunk-KKDVZLGL.js";
127
127
  import {
128
128
  MAX_AUDIO_BYTES,
129
129
  sanitizeVoiceErrorMessage,
130
130
  transcribeVoiceAudio
131
- } from "./chunk-ACHMWGC5.js";
131
+ } from "./chunk-DQSDACD2.js";
132
132
  import {
133
133
  readVoiceModel
134
- } from "./chunk-LDUGDB5H.js";
134
+ } from "./chunk-C5VWPTGT.js";
135
135
  import "./chunk-AOHJKPKL.js";
136
136
  import {
137
137
  resolveSkillSettings
138
138
  } from "./chunk-Z4X5MTRT.js";
139
- import "./chunk-JACAHYEN.js";
140
- import "./chunk-HY2INPTA.js";
139
+ import "./chunk-E4ZBKMSF.js";
140
+ import "./chunk-QQWD7LZV.js";
141
141
  import "./chunk-57OAHC2Y.js";
142
142
  import {
143
143
  createLoadedSettingsAdapter
144
- } from "./chunk-AG3P2RES.js";
144
+ } from "./chunk-WV5J6Q6N.js";
145
145
  import "./chunk-VXZBKKQR.js";
146
- import "./chunk-26ISE5EG.js";
146
+ import "./chunk-3SE7J4DR.js";
147
147
  import "./chunk-3SH53ANB.js";
148
148
  import {
149
149
  SESSION_SOURCE_META_KEY,
150
150
  parseSessionSource
151
- } from "./chunk-764F335K.js";
151
+ } from "./chunk-FYAXKJK7.js";
152
152
  import "./chunk-MZSJ43WV.js";
153
153
  import "./chunk-XCGIMOLN.js";
154
154
  import "./chunk-OCPBI7J5.js";
@@ -163,11 +163,16 @@ import {
163
163
  STATUS_SCHEMA_VERSION,
164
164
  mapDomainErrorToErrorKind
165
165
  } from "./chunk-NLREQJFK.js";
166
- import "./chunk-P74TZRXD.js";
166
+ import "./chunk-QXVSWG66.js";
167
167
  import "./chunk-KJZ26VBX.js";
168
- import "./chunk-VDS2WYM5.js";
168
+ import "./chunk-NGYI5EF5.js";
169
169
  import "./chunk-V6WHFGST.js";
170
170
  import {
171
+ ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
172
+ ACTIVE_WORK_HEARTBEAT_META_KEY,
173
+ ACTIVE_WORK_HEARTBEAT_VERSION,
174
+ ACTIVE_WORK_HOLD_CATEGORIES,
175
+ ACTIVE_WORK_NOTIFICATION_METHOD,
171
176
  CHANNEL_STARTUP_PROFILE_META_KEY,
172
177
  CHANNEL_STARTUP_PROFILE_VERSION,
173
178
  CLIENT_MCP_OVER_WS_CONFIG_FLAG,
@@ -185,8 +190,9 @@ import {
185
190
  TODO_STOP_GUARD_CONTINUATION_CLAIM_METHOD,
186
191
  TODO_STOP_GUARD_QUEUE_RELEASE_METHOD,
187
192
  WORKTREE_MCP_DEFER_META_KEY,
193
+ clampActiveWorkIntervalMs,
188
194
  isValidTrustedModelPrompt
189
- } from "./chunk-R574ATRM.js";
195
+ } from "./chunk-M2PNLYGY.js";
190
196
  import {
191
197
  NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
192
198
  isNotCurrentlyGeneratingCancelError
@@ -218,7 +224,7 @@ import {
218
224
  import {
219
225
  assembleMcpServers,
220
226
  loadMcpApprovals
221
- } from "./chunk-4QJJHIZ5.js";
227
+ } from "./chunk-Y4TETC74.js";
222
228
  import {
223
229
  getOutputLanguageFilePath,
224
230
  getPersistScopeForModelSelection,
@@ -226,7 +232,7 @@ import {
226
232
  resolveOutputLanguageOrPreserveAuto,
227
233
  updateOutputLanguageFile,
228
234
  writeOutputLanguageAndRegisterPath
229
- } from "./chunk-77WOUGCA.js";
235
+ } from "./chunk-OHKJVAKG.js";
230
236
  import "./chunk-RKUWKYED.js";
231
237
  import "./chunk-GOXKNSDZ.js";
232
238
  import "./chunk-IDS7MSUP.js";
@@ -234,20 +240,20 @@ import {
234
240
  SUPPORTED_LANGUAGES,
235
241
  getCurrentLanguage,
236
242
  setLanguageAsync
237
- } from "./chunk-TAOSTUHI.js";
243
+ } from "./chunk-PG62DFWD.js";
238
244
  import {
239
245
  reloadEnvironment
240
- } from "./chunk-KPMB4JEZ.js";
241
- import "./chunk-ALFTV7GA.js";
242
- import "./chunk-SDUDZNF4.js";
243
- import "./chunk-Z6W3XDLN.js";
246
+ } from "./chunk-B52AWKBB.js";
247
+ import "./chunk-UA5H3DS2.js";
248
+ import "./chunk-IUQ52YJK.js";
249
+ import "./chunk-FN6YXJOP.js";
244
250
  import "./chunk-VJNBRRZG.js";
245
251
  import {
246
252
  isFolderTrustEnabled,
247
253
  isWorkspaceTrusted,
248
254
  loadTrustedFolders
249
- } from "./chunk-3ARO4N5G.js";
250
- import "./chunk-ALGGS7UH.js";
255
+ } from "./chunk-HA3SAB64.js";
256
+ import "./chunk-NPQ5ZKRP.js";
251
257
  import "./chunk-MR3PXB6E.js";
252
258
  import "./chunk-XFSFZCM5.js";
253
259
  import {
@@ -379,9 +385,8 @@ import {
379
385
  unregisterGoalHook,
380
386
  updateSetting,
381
387
  validatePlanModeShellApproval,
382
- validatePlanModeShellContext,
383
- wrapUserPromptSubmitContext
384
- } from "./chunk-BFSQBXHV.js";
388
+ validatePlanModeShellContext
389
+ } from "./chunk-GXSNGY5M.js";
385
390
  import "./chunk-GOFAQQZA.js";
386
391
  import "./chunk-5M6IDOMF.js";
387
392
  import "./chunk-TWPJO254.js";
@@ -395,7 +400,7 @@ import "./chunk-7MH4J33A.js";
395
400
  import {
396
401
  parsePositiveIntegerEnv
397
402
  } from "./chunk-6PVPNMXU.js";
398
- import "./chunk-RGTB44BO.js";
403
+ import "./chunk-VXZ5HAOV.js";
399
404
  import "./chunk-IRH27ZC2.js";
400
405
  import "./chunk-QHWCP53L.js";
401
406
  import "./chunk-GNPNYXJB.js";
@@ -414,12 +419,14 @@ import {
414
419
  createHookOutput
415
420
  } from "./chunk-GM463R2B.js";
416
421
  import "./chunk-SEZ556DZ.js";
417
- import "./chunk-CJXIIILK.js";
418
- import "./chunk-3K7FH2KQ.js";
422
+ import "./chunk-2FRY5CRX.js";
423
+ import {
424
+ wrapUserPromptSubmitContext
425
+ } from "./chunk-67N6HB5H.js";
419
426
  import {
420
427
  APPROVAL_MODES
421
428
  } from "./chunk-WAUGQKUU.js";
422
- import "./chunk-REHWPCG2.js";
429
+ import "./chunk-PLFATELK.js";
423
430
  import {
424
431
  addToolArgumentsAttributes,
425
432
  addToolCallResultAttributes,
@@ -445,11 +452,12 @@ import "./chunk-EQL65XGA.js";
445
452
  import {
446
453
  clearCachedCredentialFile,
447
454
  qwenOAuth2Events
448
- } from "./chunk-22NBYCPD.js";
455
+ } from "./chunk-3P2LV43B.js";
449
456
  import "./chunk-NAVJD2PQ.js";
450
- import "./chunk-3ULCB3NE.js";
451
- import "./chunk-BGG4MBYD.js";
457
+ import "./chunk-HV76SFIA.js";
458
+ import "./chunk-4PYCZH2V.js";
452
459
  import "./chunk-P3QQPMQA.js";
460
+ import "./chunk-SR7RZ4MS.js";
453
461
  import "./chunk-M6HMMKVG.js";
454
462
  import "./chunk-DGEIYUC3.js";
455
463
  import "./chunk-MPHPFVKK.js";
@@ -483,19 +491,21 @@ import {
483
491
  logUserPrompt,
484
492
  normalizeParts,
485
493
  parseInvocationContext,
486
- runSideQuery,
487
494
  runVisionBridge,
488
495
  runWithInvocationContext,
489
496
  shouldRunVisionBridge,
490
497
  splitImageParts,
491
498
  uiTelemetryService
492
- } from "./chunk-XCG76UE6.js";
499
+ } from "./chunk-3PY4LPJF.js";
493
500
  import "./chunk-WOJZWRAZ.js";
494
501
  import "./chunk-VGC4I5JJ.js";
495
502
  import {
496
503
  getAutoMemoryRoot,
497
504
  getUserAutoMemoryRoot
498
505
  } from "./chunk-FVKHVJZQ.js";
506
+ import {
507
+ runSideQuery
508
+ } from "./chunk-COBO5EBO.js";
499
509
  import "./chunk-6ZRFAKXK.js";
500
510
  import {
501
511
  BaseDeclarativeTool,
@@ -508,7 +518,8 @@ import {
508
518
  import {
509
519
  AuthType,
510
520
  preloadContentGenerator
511
- } from "./chunk-P7HUJDBZ.js";
521
+ } from "./chunk-M3STHEMM.js";
522
+ import "./chunk-F6WFNA7U.js";
512
523
  import "./chunk-46UV252V.js";
513
524
  import {
514
525
  DEFAULT_TOKEN_LIMIT,
@@ -536,10 +547,10 @@ import {
536
547
  isSubpath
537
548
  } from "./chunk-OIVKILPI.js";
538
549
  import "./chunk-VOQXFAY5.js";
539
- import "./chunk-TSYIQDG7.js";
550
+ import "./chunk-BF52U4XJ.js";
540
551
  import {
541
552
  runExitCleanup
542
- } from "./chunk-ZQGHESAS.js";
553
+ } from "./chunk-6TR7CFXH.js";
543
554
  import {
544
555
  writeStderrLine,
545
556
  writeStderrLineSafe
@@ -2904,10 +2915,11 @@ async function buildAvailableCommandsSnapshot(config, abortSignal = AbortSignal.
2904
2915
  }
2905
2916
  __name(buildAvailableCommandsSnapshot, "buildAvailableCommandsSnapshot");
2906
2917
  var Session = class {
2907
- constructor(id, config, client, settings) {
2918
+ constructor(id, config, client, settings, onActiveWorkChanged) {
2908
2919
  this.config = config;
2909
2920
  this.client = client;
2910
2921
  this.settings = settings;
2922
+ this.onActiveWorkChanged = onActiveWorkChanged;
2911
2923
  this.sessionId = id;
2912
2924
  this.runtimeBaseDir = config.storage.getRuntimeBaseDir();
2913
2925
  const todoStopGuardEnabled = this.settings.merged.experimental?.todoStopGuard === true && !this.config.getBareMode() && !this.config.isSafeMode();
@@ -3002,8 +3014,10 @@ var Session = class {
3002
3014
  notificationProcessing = false;
3003
3015
  notificationAbortController = null;
3004
3016
  notificationCompletion = null;
3017
+ currentAgentNotificationTaskId = null;
3005
3018
  persistedBackgroundNotificationTaskIds = /* @__PURE__ */ new Set();
3006
3019
  backgroundNotificationAcceptances = /* @__PURE__ */ new Map();
3020
+ activeAgentNotificationAcceptances = /* @__PURE__ */ new Set();
3007
3021
  // Set true in dispose(). Guards #drainCronQueue and #drainNotificationQueue
3008
3022
  // against the race where #drainNotificationQueue's finally block kicks off
3009
3023
  // #drainCronQueue after the session has already been disposed (e.g. /clear
@@ -3014,6 +3028,9 @@ var Session = class {
3014
3028
  closeGateCompletion = null;
3015
3029
  resolveCloseGate = null;
3016
3030
  unsubscribeChatRecordingFailure;
3031
+ /** The exact status-change callback this Session installed, so dispose can
3032
+ * retract its own and nobody else's. */
3033
+ #statusChangeCallback;
3017
3034
  workflowApprovalAbortController = new AbortController();
3018
3035
  activeTodoPlanRevision;
3019
3036
  // Modular components
@@ -3651,7 +3668,51 @@ var Session = class {
3651
3668
  }
3652
3669
  }
3653
3670
  isIdle() {
3654
- return !this.closing && !this.#hasActiveTurn();
3671
+ return !this.closing && !this.#hasActiveTurn() && this.collectActiveWorkHolds().length === 0;
3672
+ }
3673
+ /**
3674
+ * The Session's current active-work holds, derived on every call.
3675
+ *
3676
+ * Nothing here is bookkeeping kept in parallel with the real work: agent
3677
+ * holds come straight out of the registry's unfinalized set, notification
3678
+ * holds out of the queue and the in-flight acceptance/continuation state.
3679
+ * A hold therefore cannot leak past the work it names, and the daemon's
3680
+ * cached copy converges on whatever these owners actually say.
3681
+ *
3682
+ * `hasUnfinalizedTasks()`'s predicate — not `hasRunningTasks()`' — backs the
3683
+ * agent category on purpose: an agent that has been cancelled still owes its
3684
+ * terminal task-notification, and treating it as finished would let the
3685
+ * daemon reap the Session inside the cancel → finalizeCancelled() window and
3686
+ * strand that notification.
3687
+ *
3688
+ * Prompts are absent by design. The daemon accepts, queues, dispatches, and
3689
+ * settles them itself, so its own count is both authoritative and strictly
3690
+ * wider than anything reported from here (it covers prompts still waiting in
3691
+ * the FIFO, which the child cannot see).
3692
+ */
3693
+ collectActiveWorkHolds() {
3694
+ if (this.disposed) return [];
3695
+ const holds = [];
3696
+ for (const agentId of this.config.getBackgroundTaskRegistry().listUnfinalizedBackgroundAgentIds()) {
3697
+ holds.push({ category: "agent", id: agentId });
3698
+ }
3699
+ const notificationIds = /* @__PURE__ */ new Set();
3700
+ for (const item of this.notificationQueue) {
3701
+ if (item.kind === "agent") notificationIds.add(item.taskId);
3702
+ }
3703
+ for (const taskId of this.activeAgentNotificationAcceptances) {
3704
+ notificationIds.add(taskId);
3705
+ }
3706
+ if (this.currentAgentNotificationTaskId !== null) {
3707
+ notificationIds.add(this.currentAgentNotificationTaskId);
3708
+ }
3709
+ for (const taskId of notificationIds) {
3710
+ holds.push({ category: "notification", id: taskId });
3711
+ }
3712
+ return holds;
3713
+ }
3714
+ #activeWorkChanged() {
3715
+ this.onActiveWorkChanged?.();
3655
3716
  }
3656
3717
  #hasActiveTurn() {
3657
3718
  return Boolean(
@@ -3761,6 +3822,10 @@ var Session = class {
3761
3822
  }
3762
3823
  this.config.getBackgroundTaskRegistry().abortAll({ notify: false });
3763
3824
  this.config.getBackgroundTaskRegistry().setNotificationCallback(void 0);
3825
+ if (this.#statusChangeCallback) {
3826
+ this.config.getBackgroundTaskRegistry().clearStatusChangeCallback(this.#statusChangeCallback);
3827
+ this.#statusChangeCallback = void 0;
3828
+ }
3764
3829
  this.config.getMonitorRegistry().setNotificationCallback(void 0);
3765
3830
  this.config.getBackgroundShellRegistry().setNotificationCallback(void 0);
3766
3831
  this.config.getChatRecordingService()?.setTitleRecordedCallback(void 0);
@@ -3985,6 +4050,7 @@ var Session = class {
3985
4050
  }
3986
4051
  this.notificationQueue = [];
3987
4052
  this.notificationProcessing = false;
4053
+ this.#activeWorkChanged();
3988
4054
  const scheduler = this.config.isCronEnabled() ? this.config.getCronScheduler() : null;
3989
4055
  if (scheduler) {
3990
4056
  const summary = scheduler.getExitSummary();
@@ -6454,6 +6520,10 @@ ${this.pendingRecoveredAgentsNotice}
6454
6520
  }
6455
6521
  #registerBackgroundNotificationCallbacks() {
6456
6522
  const backgroundRegistry = this.config.getBackgroundTaskRegistry();
6523
+ this.#statusChangeCallback = () => {
6524
+ this.#activeWorkChanged();
6525
+ };
6526
+ backgroundRegistry.setStatusChangeCallback(this.#statusChangeCallback);
6457
6527
  backgroundRegistry.setNotificationCallback(
6458
6528
  (displayText, modelText, meta) => {
6459
6529
  this.#enqueueBackgroundNotification({
@@ -6548,6 +6618,7 @@ ${this.pendingRecoveredAgentsNotice}
6548
6618
  );
6549
6619
  }
6550
6620
  this.notificationQueue.push(item);
6621
+ this.#activeWorkChanged();
6551
6622
  void this.#drainNotificationQueue();
6552
6623
  }
6553
6624
  async enqueueBackgroundNotification(item) {
@@ -6558,11 +6629,19 @@ ${this.pendingRecoveredAgentsNotice}
6558
6629
  if (existing) return { accepted: await existing };
6559
6630
  const acceptance = this.#persistDaemonBackgroundNotification(item);
6560
6631
  this.backgroundNotificationAcceptances.set(item.taskId, acceptance);
6632
+ if (item.kind === "agent") {
6633
+ this.activeAgentNotificationAcceptances.add(item.taskId);
6634
+ this.#activeWorkChanged();
6635
+ }
6561
6636
  try {
6562
6637
  return { accepted: await acceptance };
6563
6638
  } finally {
6564
6639
  if (this.backgroundNotificationAcceptances.get(item.taskId) === acceptance) {
6565
6640
  this.backgroundNotificationAcceptances.delete(item.taskId);
6641
+ if (item.kind === "agent") {
6642
+ this.activeAgentNotificationAcceptances.delete(item.taskId);
6643
+ this.#activeWorkChanged();
6644
+ }
6566
6645
  }
6567
6646
  }
6568
6647
  }
@@ -6633,18 +6712,26 @@ ${this.pendingRecoveredAgentsNotice}
6633
6712
  if (nextIndex < 0) break;
6634
6713
  const [item] = this.notificationQueue.splice(nextIndex, 1);
6635
6714
  if (!item) break;
6636
- await runWithInvocationContext(
6637
- void 0,
6638
- () => sessionIdContext.run(
6639
- this.config.getSessionId(),
6640
- () => this.#executeBackgroundNotificationPromptInner(item)
6641
- )
6642
- );
6715
+ this.currentAgentNotificationTaskId = item.kind === "agent" ? item.taskId : null;
6716
+ this.#activeWorkChanged();
6717
+ try {
6718
+ await runWithInvocationContext(
6719
+ void 0,
6720
+ () => sessionIdContext.run(
6721
+ this.config.getSessionId(),
6722
+ () => this.#executeBackgroundNotificationPromptInner(item)
6723
+ )
6724
+ );
6725
+ } finally {
6726
+ this.currentAgentNotificationTaskId = null;
6727
+ this.#activeWorkChanged();
6728
+ }
6643
6729
  }
6644
6730
  } finally {
6645
6731
  this.notificationProcessing = false;
6646
6732
  resolveCompletion();
6647
6733
  this.notificationCompletion = null;
6734
+ this.#activeWorkChanged();
6648
6735
  void this.#drainCronQueue();
6649
6736
  if (this.notificationQueue.length > 0 && !this.pendingPrompt && !this.cronProcessing && !this.cronAbortController) {
6650
6737
  void this.#drainNotificationQueue();
@@ -9645,6 +9732,98 @@ ${contextPart.text}`
9645
9732
  }
9646
9733
  };
9647
9734
 
9735
+ // packages/cli/src/acp-integration/active-work-reporter.ts
9736
+ init_esbuild_shims();
9737
+ var debugLogger6 = createDebugLogger("ACTIVE_WORK");
9738
+ var ActiveWorkReporter = class {
9739
+ constructor(send, listSources, intervalMs) {
9740
+ this.send = send;
9741
+ this.listSources = listSources;
9742
+ this.intervalMs = intervalMs;
9743
+ this.#timer = setInterval(() => {
9744
+ this.#publish();
9745
+ }, intervalMs);
9746
+ this.#timer.unref?.();
9747
+ this.#publish();
9748
+ }
9749
+ static {
9750
+ __name(this, "ActiveWorkReporter");
9751
+ }
9752
+ #seq = 0;
9753
+ #tail = Promise.resolve();
9754
+ #coalescing = false;
9755
+ #timer;
9756
+ #disposed = false;
9757
+ /**
9758
+ * Note that some Session's derived state may have changed. Coalesced to
9759
+ * one snapshot per microtask so a burst of transitions (an agent finishing
9760
+ * and its terminal notification enqueuing in the same tick) produces a
9761
+ * single message that already reflects the settled state.
9762
+ */
9763
+ notifyChanged() {
9764
+ if (this.#disposed || this.#coalescing) return;
9765
+ this.#coalescing = true;
9766
+ queueMicrotask(() => {
9767
+ if (!this.#coalescing) return;
9768
+ this.#coalescing = false;
9769
+ this.#publish();
9770
+ });
9771
+ }
9772
+ /**
9773
+ * Publish now and resolve once the snapshot has been handed to the
9774
+ * transport.
9775
+ *
9776
+ * Callers use this to order a snapshot ahead of an RPC response on the same
9777
+ * stream. The prompt path needs it: the daemon drops its own
9778
+ * `pendingPromptCount` the moment the prompt response lands, so a hold
9779
+ * taken during that prompt (a background agent it started) has to be on the
9780
+ * wire *first* or the daemon briefly sees neither fact and may reap the
9781
+ * Session.
9782
+ */
9783
+ async flush() {
9784
+ this.#coalescing = false;
9785
+ this.#publish();
9786
+ await this.#tail.catch(() => void 0);
9787
+ }
9788
+ dispose() {
9789
+ this.#disposed = true;
9790
+ this.#coalescing = false;
9791
+ if (this.#timer) {
9792
+ clearInterval(this.#timer);
9793
+ this.#timer = void 0;
9794
+ }
9795
+ }
9796
+ #publish() {
9797
+ if (this.#disposed) return;
9798
+ let sessions;
9799
+ try {
9800
+ sessions = [];
9801
+ for (const source of this.listSources()) {
9802
+ sessions.push({
9803
+ sessionId: source.sessionId,
9804
+ holds: source.collectActiveWorkHolds()
9805
+ });
9806
+ }
9807
+ } catch (error) {
9808
+ debugLogger6.warn(
9809
+ `active-work snapshot collection failed; skipping this report: ${error instanceof Error ? error.message : String(error)}`
9810
+ );
9811
+ return;
9812
+ }
9813
+ const snapshot = {
9814
+ v: ACTIVE_WORK_HEARTBEAT_VERSION,
9815
+ seq: ++this.#seq,
9816
+ sessions
9817
+ };
9818
+ this.#tail = this.#tail.then(
9819
+ () => this.#disposed ? void 0 : this.send(
9820
+ ACTIVE_WORK_NOTIFICATION_METHOD,
9821
+ snapshot
9822
+ )
9823
+ ).catch(() => void 0);
9824
+ }
9825
+ };
9826
+
9648
9827
  // packages/cli/src/acp-integration/session/tasksSnapshot.ts
9649
9828
  init_esbuild_shims();
9650
9829
  function runtimeMs(entry, now) {
@@ -9756,7 +9935,7 @@ function runWithAcpRuntimeOutputDir(settings, cwd, fn) {
9756
9935
  __name(runWithAcpRuntimeOutputDir, "runWithAcpRuntimeOutputDir");
9757
9936
 
9758
9937
  // packages/cli/src/acp-integration/acpAgent.ts
9759
- var debugLogger6 = createDebugLogger("ACP_AGENT");
9938
+ var debugLogger7 = createDebugLogger("ACP_AGENT");
9760
9939
  var QWEN_ACP_LOCAL_READ_ROOTS_ENV = "QWEN_ACP_LOCAL_READ_ROOTS";
9761
9940
  var POSIX_TMP_LOCAL_READ_ROOT = "/tmp";
9762
9941
  var BTW_CHILD_TIMEOUT_MS = 55e3;
@@ -9891,7 +10070,7 @@ async function beginSessionCloseAfterCurrentGate(session, timeoutMs) {
9891
10070
  }
9892
10071
  }
9893
10072
  __name(beginSessionCloseAfterCurrentGate, "beginSessionCloseAfterCurrentGate");
9894
- var logWorkspaceMemoryExtractionError = createWorkspaceMemoryExtractionErrorLogger(debugLogger6);
10073
+ var logWorkspaceMemoryExtractionError = createWorkspaceMemoryExtractionErrorLogger(debugLogger7);
9895
10074
  function parseAcpLocalReadRootsEnv(raw = process.env[QWEN_ACP_LOCAL_READ_ROOTS_ENV]) {
9896
10075
  if (!raw) return [];
9897
10076
  return raw.split(path3.delimiter).map((entry) => entry.trim()).filter((entry) => entry.length > 0 && path3.isAbsolute(entry));
@@ -10724,7 +10903,7 @@ async function downloadGitHubSkillDirectory(githubUrl, directoryPath) {
10724
10903
  githubUrl,
10725
10904
  directoryPath
10726
10905
  ).catch((error) => {
10727
- debugLogger6.warn(
10906
+ debugLogger7.warn(
10728
10907
  "GitHub API directory listing failed, falling back to archive download:",
10729
10908
  error
10730
10909
  );
@@ -11290,7 +11469,7 @@ function readMcpServers(source, scope) {
11290
11469
  const server = toMcpServerConfig(value);
11291
11470
  return server ? { name, scope, server: redactMcpServerSecrets(server) } : void 0;
11292
11471
  } catch (error) {
11293
- debugLogger6.warn(
11472
+ debugLogger7.warn(
11294
11473
  `Skipping malformed MCP server config [${scope}:${name}]:`,
11295
11474
  error
11296
11475
  );
@@ -11386,7 +11565,7 @@ function readHooks(source, scope, extensionName) {
11386
11565
  extensionName
11387
11566
  });
11388
11567
  } catch (error) {
11389
- debugLogger6.warn(
11568
+ debugLogger7.warn(
11390
11569
  `Skipping malformed hook entry [${scope}:${event}:${index}]:`,
11391
11570
  error
11392
11571
  );
@@ -11688,7 +11867,7 @@ async function runAcpAgent(config, settings, argv, options) {
11688
11867
  void preloadContentGenerator(
11689
11868
  session.getConfig().getContentGenerator()
11690
11869
  ).catch((error) => {
11691
- debugLogger6.debug(
11870
+ debugLogger7.debug(
11692
11871
  `[ACP] Session provider preload failed for ${sessionId}: ${error instanceof Error ? error.message : String(error)}`
11693
11872
  );
11694
11873
  });
@@ -11729,7 +11908,7 @@ async function runAcpAgent(config, settings, argv, options) {
11729
11908
  try {
11730
11909
  await agentInstance.shutdownMcpPool(8e3);
11731
11910
  } catch (err) {
11732
- debugLogger6.error(`[ACP] MCP pool drain (${label}) error:`, err);
11911
+ debugLogger7.error(`[ACP] MCP pool drain (${label}) error:`, err);
11733
11912
  if (strict) throw err;
11734
11913
  }
11735
11914
  }, "drainPoolBeforeExit");
@@ -11762,7 +11941,7 @@ async function runAcpAgent(config, settings, argv, options) {
11762
11941
  await hookSystem.fireSessionEndEvent(reason);
11763
11942
  } catch (err) {
11764
11943
  if (managedConfigs) failures.push(err);
11765
- debugLogger6.warn(
11944
+ debugLogger7.warn(
11766
11945
  `SessionEnd hook failed: ${err instanceof Error ? err.message : String(err)}`
11767
11946
  );
11768
11947
  }
@@ -11786,7 +11965,7 @@ async function runAcpAgent(config, settings, argv, options) {
11786
11965
  await terminal.writerShutdown;
11787
11966
  } catch (error) {
11788
11967
  failures.push(error);
11789
- debugLogger6.error("[ACP] Managed writer shutdown error:", error);
11968
+ debugLogger7.error("[ACP] Managed writer shutdown error:", error);
11790
11969
  const retainedLockPaths = terminal.configs.flatMap((config2) => {
11791
11970
  if (typeof config2.getSessionRuntimeBaseDir !== "function" || typeof config2.getSessionId !== "function") {
11792
11971
  return [];
@@ -11813,7 +11992,7 @@ async function runAcpAgent(config, settings, argv, options) {
11813
11992
  await agent.finishManagedShutdown(terminal.configs);
11814
11993
  } catch (error) {
11815
11994
  failures.push(error);
11816
- debugLogger6.error("[ACP] Managed resource shutdown error:", error);
11995
+ debugLogger7.error("[ACP] Managed resource shutdown error:", error);
11817
11996
  }
11818
11997
  try {
11819
11998
  await drainPoolBeforeExit(label, true);
@@ -11824,7 +12003,7 @@ async function runAcpAgent(config, settings, argv, options) {
11824
12003
  await runExitCleanup();
11825
12004
  } catch (error) {
11826
12005
  failures.push(error);
11827
- debugLogger6.error("[ACP] Cleanup error:", error);
12006
+ debugLogger7.error("[ACP] Cleanup error:", error);
11828
12007
  }
11829
12008
  if (failures.length > 0) {
11830
12009
  throw new AggregateError(failures, "Managed ACP shutdown failed");
@@ -11835,14 +12014,14 @@ async function runAcpAgent(config, settings, argv, options) {
11835
12014
  const shutdownHandler = /* @__PURE__ */ __name(async () => {
11836
12015
  if (shuttingDown) return;
11837
12016
  shuttingDown = true;
11838
- debugLogger6.debug("[ACP] Shutdown signal received, closing streams");
12017
+ debugLogger7.debug("[ACP] Shutdown signal received, closing streams");
11839
12018
  if (agentInstance?.isTrustedManagedParent()) {
11840
12019
  let exitCode = 0;
11841
12020
  try {
11842
12021
  await shutdownManagedAgent("other" /* Other */, "signal");
11843
12022
  } catch (err) {
11844
12023
  exitCode = 1;
11845
- debugLogger6.error("[ACP] Managed shutdown error:", err);
12024
+ debugLogger7.error("[ACP] Managed shutdown error:", err);
11846
12025
  } finally {
11847
12026
  eventLoopMonitor.dispose();
11848
12027
  }
@@ -11867,12 +12046,12 @@ async function runAcpAgent(config, settings, argv, options) {
11867
12046
  }
11868
12047
  await drainPoolBeforeExit("signal");
11869
12048
  } catch (err) {
11870
- debugLogger6.error("[ACP] Shutdown error:", err);
12049
+ debugLogger7.error("[ACP] Shutdown error:", err);
11871
12050
  } finally {
11872
12051
  eventLoopMonitor.dispose();
11873
12052
  }
11874
12053
  runExitCleanup().catch((err) => {
11875
- debugLogger6.error("[ACP] Cleanup error:", err);
12054
+ debugLogger7.error("[ACP] Cleanup error:", err);
11876
12055
  }).finally(() => {
11877
12056
  process.exit(0);
11878
12057
  });
@@ -12073,6 +12252,8 @@ var QwenAgent = class {
12073
12252
  initializingConfigs = /* @__PURE__ */ new Set();
12074
12253
  managedShuttingDown = false;
12075
12254
  clientCapabilities;
12255
+ /** Set once the daemon negotiates active-work reporting; one per channel. */
12256
+ activeWorkReporter;
12076
12257
  privateParentState = "uninitialized";
12077
12258
  // CPU-usage delta baseline for the daemon's `workspaceResource` extMethod
12078
12259
  // (Daemon Status child-resource chart). The daemon polls this at a fixed
@@ -12145,12 +12326,12 @@ var QwenAgent = class {
12145
12326
  try {
12146
12327
  session.beginCloseIfAvailable();
12147
12328
  } catch (error) {
12148
- debugLogger6.debug(
12329
+ debugLogger7.debug(
12149
12330
  `Session ${session.getId()} admission close during managed shutdown failed: ${error instanceof Error ? error.message : String(error)}`
12150
12331
  );
12151
12332
  }
12152
12333
  void session.cancelPendingPrompt().catch((error) => {
12153
- debugLogger6.debug(
12334
+ debugLogger7.debug(
12154
12335
  `Session ${session.getId()} cancel during managed shutdown failed: ${error instanceof Error ? error.message : String(error)}`
12155
12336
  );
12156
12337
  });
@@ -12298,7 +12479,7 @@ var QwenAgent = class {
12298
12479
  await run();
12299
12480
  }).catch((err) => {
12300
12481
  this.workspaceMcpDiscoveryError = err instanceof Error ? err.message : String(err);
12301
- debugLogger6.error(
12482
+ debugLogger7.error(
12302
12483
  `Workspace MCP ${label} failed: ${err instanceof Error ? err.message : String(err)}`
12303
12484
  );
12304
12485
  }).finally(() => {
@@ -12485,7 +12666,7 @@ var QwenAgent = class {
12485
12666
  try {
12486
12667
  const result = await this.mcpPool.drainAll({ force: true, timeoutMs });
12487
12668
  if (result.forced > 0 || result.errors.length > 0) {
12488
- debugLogger6.warn(
12669
+ debugLogger7.warn(
12489
12670
  `MCP pool drain: ${result.drained} clean, ${result.forced} timed out, ${result.errors.length} errors`
12490
12671
  );
12491
12672
  throw new Error(
@@ -12493,7 +12674,7 @@ var QwenAgent = class {
12493
12674
  );
12494
12675
  }
12495
12676
  } catch (err) {
12496
- debugLogger6.error(
12677
+ debugLogger7.error(
12497
12678
  `MCP pool drainAll failed: ${err instanceof Error ? err.message : String(err)}`
12498
12679
  );
12499
12680
  throw err;
@@ -12529,8 +12710,9 @@ var QwenAgent = class {
12529
12710
  cleanupErrors.push(error);
12530
12711
  }
12531
12712
  this.sessions.delete(sessionId);
12713
+ this.activeWorkReporter?.notifyChanged();
12532
12714
  if (cleanupErrors.length > 0) {
12533
- debugLogger6.warn(
12715
+ debugLogger7.warn(
12534
12716
  `Session ${sessionId} closed after ${cleanupErrors.length} cleanup failure(s): ${cleanupErrors.map(
12535
12717
  (error) => error instanceof Error ? error.message : String(error)
12536
12718
  ).join("; ")}`
@@ -12584,7 +12766,7 @@ var QwenAgent = class {
12584
12766
  try {
12585
12767
  await cleanup();
12586
12768
  } catch (cleanupError) {
12587
- debugLogger6.warn(
12769
+ debugLogger7.warn(
12588
12770
  `Session cleanup failed while preserving the original request error: ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`
12589
12771
  );
12590
12772
  }
@@ -12608,7 +12790,7 @@ var QwenAgent = class {
12608
12790
  await this.cleanupUnstoredConfig(config);
12609
12791
  } catch (error) {
12610
12792
  if (config.getSessionId() === requiredSessionId) throw error;
12611
- debugLogger6.warn(
12793
+ debugLogger7.warn(
12612
12794
  `Deferred Config cleanup retry failed for session ${config.getSessionId()}: ${error instanceof Error ? error.message : String(error)}`
12613
12795
  );
12614
12796
  }
@@ -12618,7 +12800,7 @@ var QwenAgent = class {
12618
12800
  const session = this.sessions.get(sessionId);
12619
12801
  if (!session) {
12620
12802
  this.mcpPool?.releaseSession(sessionId);
12621
- return;
12803
+ return { closed: true, holds: [] };
12622
12804
  }
12623
12805
  const recorder = session.getConfig().getChatRecordingService();
12624
12806
  const requireFlush = opts?.requireFlush === true;
@@ -12627,6 +12809,13 @@ var QwenAgent = class {
12627
12809
  }
12628
12810
  const drainTimeoutMs = opts?.drainTimeoutMs ?? SESSION_DRAIN_TIMEOUT_MS;
12629
12811
  const cancelClose = opts?.waitForCloseGate ? await beginSessionCloseAfterCurrentGate(session, drainTimeoutMs) : session.beginClose();
12812
+ if (opts?.onlyIfUnheld) {
12813
+ const holds = session.collectActiveWorkHolds();
12814
+ if (holds.length > 0) {
12815
+ cancelClose();
12816
+ return { closed: false, holds };
12817
+ }
12818
+ }
12630
12819
  for (const [requestId, generation] of this.generationControllers) {
12631
12820
  if (generation.sessionId !== sessionId) continue;
12632
12821
  generation.controller.abort();
@@ -12639,7 +12828,7 @@ var QwenAgent = class {
12639
12828
  try {
12640
12829
  await session.cancelPendingPrompt();
12641
12830
  } catch (err) {
12642
- debugLogger6.debug(
12831
+ debugLogger7.debug(
12643
12832
  `Session ${sessionId} cancel during close failed: ${err instanceof Error ? err.message : String(err)}`
12644
12833
  );
12645
12834
  }
@@ -12677,6 +12866,7 @@ var QwenAgent = class {
12677
12866
  } finally {
12678
12867
  if (!removedFromStore) cancelClose();
12679
12868
  }
12869
+ return { closed: true, holds: [] };
12680
12870
  }
12681
12871
  async discardStoredSessionIfCurrent(sessionId, session, opts) {
12682
12872
  if (this.sessions.get(sessionId) !== session) {
@@ -12685,6 +12875,8 @@ var QwenAgent = class {
12685
12875
  await this.closeStoredSession(sessionId, opts);
12686
12876
  }
12687
12877
  async disposeSessions() {
12878
+ this.activeWorkReporter?.dispose();
12879
+ this.activeWorkReporter = void 0;
12688
12880
  for (const generation of this.generationControllers.values()) {
12689
12881
  generation.controller.abort();
12690
12882
  }
@@ -12743,7 +12935,7 @@ var QwenAgent = class {
12743
12935
  scope: "workspace",
12744
12936
  ...event
12745
12937
  }).catch((err) => {
12746
- debugLogger6.debug(
12938
+ debugLogger7.debug(
12747
12939
  `MCP workspace budget event delivery to session ${sid} failed (kind=${event.kind}): ${err instanceof Error ? err.message : String(err)}`
12748
12940
  );
12749
12941
  });
@@ -12778,7 +12970,7 @@ var QwenAgent = class {
12778
12970
  }
12779
12971
  this.clientCapabilities = args.clientCapabilities;
12780
12972
  const authMethods = buildAuthMethods();
12781
- const version = "0.21.7-nightly.20260808.4ec0371e6";
12973
+ const version = "0.21.8";
12782
12974
  const response = {
12783
12975
  protocolVersion: PROTOCOL_VERSION,
12784
12976
  agentInfo: {
@@ -12817,11 +13009,31 @@ var QwenAgent = class {
12817
13009
  }
12818
13010
  const requestedProfile = args._meta?.[CHANNEL_STARTUP_PROFILE_META_KEY];
12819
13011
  const profileRequested = requestedProfile !== null && typeof requestedProfile === "object" && !Array.isArray(requestedProfile) && requestedProfile["v"] === CHANNEL_STARTUP_PROFILE_VERSION;
13012
+ const requestedActiveWork = args._meta?.[ACTIVE_WORK_HEARTBEAT_META_KEY];
13013
+ const activeWorkRequested = requestedActiveWork !== null && typeof requestedActiveWork === "object" && !Array.isArray(requestedActiveWork) && requestedActiveWork["v"] === ACTIVE_WORK_HEARTBEAT_VERSION;
13014
+ const activeWorkIntervalMs = activeWorkRequested ? clampActiveWorkIntervalMs(
13015
+ requestedActiveWork["intervalMs"]
13016
+ ) : void 0;
13017
+ if (activeWorkIntervalMs !== void 0) {
13018
+ this.activeWorkReporter?.dispose();
13019
+ this.activeWorkReporter = new ActiveWorkReporter(
13020
+ (method, params) => this.connection.extNotification(method, params),
13021
+ () => this.sessions.values(),
13022
+ activeWorkIntervalMs
13023
+ );
13024
+ }
12820
13025
  const responseMeta = {
12821
13026
  ...this.managedToolInvocationGuard ? {
12822
13027
  [EXTERNAL_TOOL_GUARD_READY_META_KEY]: EXTERNAL_TOOL_GUARD_REQUIRED_VALUE
12823
13028
  } : {},
12824
- ...profileRequested && startupProfile ? { [CHANNEL_STARTUP_PROFILE_META_KEY]: startupProfile } : {}
13029
+ ...profileRequested && startupProfile ? { [CHANNEL_STARTUP_PROFILE_META_KEY]: startupProfile } : {},
13030
+ ...activeWorkIntervalMs !== void 0 ? {
13031
+ [ACTIVE_WORK_HEARTBEAT_META_KEY]: {
13032
+ v: ACTIVE_WORK_HEARTBEAT_VERSION,
13033
+ intervalMs: activeWorkIntervalMs,
13034
+ categories: [...ACTIVE_WORK_HOLD_CATEGORIES]
13035
+ }
13036
+ } : {}
12825
13037
  };
12826
13038
  return Object.keys(responseMeta).length > 0 ? { ...response, _meta: responseMeta } : response;
12827
13039
  }
@@ -12941,7 +13153,7 @@ var QwenAgent = class {
12941
13153
  records: replayPage.records,
12942
13154
  gaps: sessionData2.historyGaps,
12943
13155
  cumulativeUsage: createReplayCumulativeUsage(),
12944
- logger: debugLogger6
13156
+ logger: debugLogger7
12945
13157
  });
12946
13158
  if (!bulkReplay2) {
12947
13159
  try {
@@ -13028,7 +13240,7 @@ var QwenAgent = class {
13028
13240
  gaps: sessionData?.historyGaps,
13029
13241
  cumulativeUsage: replayUsage,
13030
13242
  supersedeUnrestorableGoal: true,
13031
- logger: debugLogger6
13243
+ logger: debugLogger7
13032
13244
  });
13033
13245
  replayUpdates = replay.updates;
13034
13246
  copyCumulativeUsage(createdSession.cumulativeUsage, replayUsage);
@@ -13172,7 +13384,7 @@ var QwenAgent = class {
13172
13384
  session.pendingWorktreeNotice = restored.contextMessage;
13173
13385
  }
13174
13386
  } catch (error) {
13175
- debugLogger6.warn(`ACP worktree restore failed: ${error}`);
13387
+ debugLogger7.warn(`ACP worktree restore failed: ${error}`);
13176
13388
  }
13177
13389
  }
13178
13390
  async #restoreBackgroundAgentsOnResume(config, session) {
@@ -13205,7 +13417,7 @@ var QwenAgent = class {
13205
13417
  config
13206
13418
  );
13207
13419
  if (restored.restored) {
13208
- debugLogger6.info(
13420
+ debugLogger7.info(
13209
13421
  `ACP goal restored sessionId=${config.getSessionId()} condition=${restored.condition}`
13210
13422
  );
13211
13423
  } else if (restored.blockedBy && restored.blockedBy !== "condition-invalid") {
@@ -13365,6 +13577,7 @@ var QwenAgent = class {
13365
13577
  this.activePromptCalls.delete(params.sessionId);
13366
13578
  }
13367
13579
  settleCall();
13580
+ await this.activeWorkReporter?.flush();
13368
13581
  }
13369
13582
  }
13370
13583
  async cancel(params) {
@@ -13398,7 +13611,7 @@ var QwenAgent = class {
13398
13611
  await extensionManager.refreshCache();
13399
13612
  extensions = extensionManager.getLoadedExtensions();
13400
13613
  } catch (error) {
13401
- debugLogger6.warn(
13614
+ debugLogger7.warn(
13402
13615
  "Extension loading failed, continuing without extensions:",
13403
13616
  error
13404
13617
  );
@@ -13524,7 +13737,7 @@ var QwenAgent = class {
13524
13737
  pm.addPersistentRule(rule, ruleType);
13525
13738
  }
13526
13739
  } catch (error) {
13527
- debugLogger6.warn(
13740
+ debugLogger7.warn(
13528
13741
  `Failed to sync permission rules to a live session: ${error instanceof Error ? error.message : String(error)}`
13529
13742
  );
13530
13743
  }
@@ -14082,7 +14295,7 @@ var QwenAgent = class {
14082
14295
  if (!changed) return;
14083
14296
  await config.getSkillManager()?.refreshCache();
14084
14297
  } catch (error) {
14085
- debugLogger6.warn("Extension source revalidation failed:", error);
14298
+ debugLogger7.warn("Extension source revalidation failed:", error);
14086
14299
  }
14087
14300
  }
14088
14301
  async buildWorkspaceSkillsStatus(config) {
@@ -15537,7 +15750,7 @@ var QwenAgent = class {
15537
15750
  config,
15538
15751
  finalizeDangling: !activePromptBeforeRead && !this.activePromptCalls.has(sessionId),
15539
15752
  encodeCursor: /* @__PURE__ */ __name((state) => encodeSessionTranscriptCursor(state, cwd), "encodeCursor"),
15540
- logger: debugLogger6
15753
+ logger: debugLogger7
15541
15754
  });
15542
15755
  return {
15543
15756
  v: 1,
@@ -15733,7 +15946,7 @@ var QwenAgent = class {
15733
15946
  );
15734
15947
  if (childSignal.aborted) {
15735
15948
  const timeoutCode = "remember_timeout";
15736
- debugLogger6.error("Workspace memory remember timed out:", {
15949
+ debugLogger7.error("Workspace memory remember timed out:", {
15737
15950
  projectRoot,
15738
15951
  code: timeoutCode,
15739
15952
  details: diagnostics.debugDetails,
@@ -15745,7 +15958,7 @@ var QwenAgent = class {
15745
15958
  workspaceMemoryErrorData(timeoutCode, diagnostics)
15746
15959
  );
15747
15960
  }
15748
- debugLogger6.error("Workspace memory remember failed:", {
15961
+ debugLogger7.error("Workspace memory remember failed:", {
15749
15962
  projectRoot,
15750
15963
  code,
15751
15964
  details: diagnostics.debugDetails,
@@ -15819,7 +16032,7 @@ var QwenAgent = class {
15819
16032
  );
15820
16033
  if (childSignal.aborted) {
15821
16034
  const timeoutCode = "forget_timeout";
15822
- debugLogger6.error("Workspace memory forget timed out:", {
16035
+ debugLogger7.error("Workspace memory forget timed out:", {
15823
16036
  projectRoot,
15824
16037
  code: timeoutCode,
15825
16038
  details: diagnostics.debugDetails,
@@ -15831,7 +16044,7 @@ var QwenAgent = class {
15831
16044
  workspaceMemoryErrorData(timeoutCode, diagnostics)
15832
16045
  );
15833
16046
  }
15834
- debugLogger6.error("Workspace memory forget failed:", {
16047
+ debugLogger7.error("Workspace memory forget failed:", {
15835
16048
  projectRoot,
15836
16049
  code,
15837
16050
  details: diagnostics.debugDetails,
@@ -15899,7 +16112,7 @@ var QwenAgent = class {
15899
16112
  );
15900
16113
  if (childSignal.aborted) {
15901
16114
  const timeoutCode = "dream_timeout";
15902
- debugLogger6.error("Workspace memory dream timed out:", {
16115
+ debugLogger7.error("Workspace memory dream timed out:", {
15903
16116
  projectRoot,
15904
16117
  code: timeoutCode,
15905
16118
  details: diagnostics.debugDetails,
@@ -15911,7 +16124,7 @@ var QwenAgent = class {
15911
16124
  workspaceMemoryErrorData(timeoutCode, diagnostics)
15912
16125
  );
15913
16126
  }
15914
- debugLogger6.error("Workspace memory dream failed:", {
16127
+ debugLogger7.error("Workspace memory dream failed:", {
15915
16128
  projectRoot,
15916
16129
  code,
15917
16130
  details: diagnostics.debugDetails,
@@ -16321,7 +16534,7 @@ var QwenAgent = class {
16321
16534
  error: error instanceof Error ? error.message : String(error)
16322
16535
  });
16323
16536
  rejectStarted(error);
16324
- debugLogger6.warn(
16537
+ debugLogger7.warn(
16325
16538
  `MCP OAuth authentication failed for ${serverName}:`,
16326
16539
  error
16327
16540
  );
@@ -16333,7 +16546,7 @@ var QwenAgent = class {
16333
16546
  "discover"
16334
16547
  );
16335
16548
  } catch (error) {
16336
- debugLogger6.warn(
16549
+ debugLogger7.warn(
16337
16550
  `MCP OAuth authenticated for ${serverName}, but tool synchronization failed:`,
16338
16551
  error
16339
16552
  );
@@ -16741,11 +16954,12 @@ var QwenAgent = class {
16741
16954
  "Invalid session close drain timeout"
16742
16955
  );
16743
16956
  }
16744
- await this.closeStoredSession(sessionId, {
16957
+ const outcome = await this.closeStoredSession(sessionId, {
16745
16958
  requireFlush: params["requireFlush"] === true,
16959
+ onlyIfUnheld: params[ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM] === true,
16746
16960
  ...typeof rawDrainTimeoutMs === "number" ? { drainTimeoutMs: rawDrainTimeoutMs } : {}
16747
16961
  });
16748
- return { sessionId, closed: true };
16962
+ return outcome.closed ? { sessionId, closed: true } : { sessionId, closed: false, holds: outcome.holds };
16749
16963
  }
16750
16964
  case SERVE_CONTROL_EXT_METHODS.sessionCd: {
16751
16965
  const sessionId = params["sessionId"];
@@ -17022,7 +17236,7 @@ var QwenAgent = class {
17022
17236
  try {
17023
17237
  await setLanguageAsync(language);
17024
17238
  } catch (err) {
17025
- debugLogger6.warn("setLanguageAsync failed:", err);
17239
+ debugLogger7.warn("setLanguageAsync failed:", err);
17026
17240
  throw new RequestError(
17027
17241
  -32603,
17028
17242
  `Failed to switch UI language: ${err instanceof Error ? err.message : String(err)}`
@@ -17036,7 +17250,7 @@ var QwenAgent = class {
17036
17250
  language
17037
17251
  );
17038
17252
  } catch (err) {
17039
- debugLogger6.warn("Failed to persist UI language setting:", err);
17253
+ debugLogger7.warn("Failed to persist UI language setting:", err);
17040
17254
  }
17041
17255
  let outputLanguage = null;
17042
17256
  let refreshed = false;
@@ -17050,7 +17264,7 @@ var QwenAgent = class {
17050
17264
  );
17051
17265
  fileWriteOk = true;
17052
17266
  } catch (err) {
17053
- debugLogger6.warn("Failed to write output-language.md:", err);
17267
+ debugLogger7.warn("Failed to write output-language.md:", err);
17054
17268
  }
17055
17269
  if (fileWriteOk) {
17056
17270
  try {
@@ -17060,7 +17274,7 @@ var QwenAgent = class {
17060
17274
  settingValue
17061
17275
  );
17062
17276
  } catch (err) {
17063
- debugLogger6.warn(
17277
+ debugLogger7.warn(
17064
17278
  "Failed to persist output language setting:",
17065
17279
  err
17066
17280
  );
@@ -17080,7 +17294,7 @@ var QwenAgent = class {
17080
17294
  writeOutputLanguageAndRegisterPath(settingValue, cfg);
17081
17295
  }
17082
17296
  } catch (err) {
17083
- debugLogger6.warn(
17297
+ debugLogger7.warn(
17084
17298
  `Failed to write output-language.md for session ${s.getId()} (path=${sessionPath ?? "global-default"}):`,
17085
17299
  err
17086
17300
  );
@@ -17093,7 +17307,7 @@ var QwenAgent = class {
17093
17307
  (r) => r.status === "rejected"
17094
17308
  ).length;
17095
17309
  if (failedCount > 0) {
17096
- debugLogger6.warn(
17310
+ debugLogger7.warn(
17097
17311
  `Language refresh failed for ${failedCount}/${results.length} session(s)`
17098
17312
  );
17099
17313
  }
@@ -17111,14 +17325,14 @@ var QwenAgent = class {
17111
17325
  "Invalid or missing sessionId"
17112
17326
  );
17113
17327
  }
17114
- debugLogger6.debug(`recap ext-method received for session=${sessionId}`);
17328
+ debugLogger7.debug(`recap ext-method received for session=${sessionId}`);
17115
17329
  const session = this.sessionOrThrow(sessionId);
17116
17330
  const config = session.getConfig();
17117
17331
  const recap = await generateSessionRecap(
17118
17332
  config,
17119
17333
  new AbortController().signal
17120
17334
  );
17121
- debugLogger6.debug(
17335
+ debugLogger7.debug(
17122
17336
  `recap ext-method completed for session=${sessionId} result=${recap ? `len=${recap.length}` : "null"}`
17123
17337
  );
17124
17338
  return { sessionId, recap };
@@ -17200,7 +17414,7 @@ var QwenAgent = class {
17200
17414
  const config = session.getConfig();
17201
17415
  const cacheSafeParams = buildBtwCacheSafeParams(config);
17202
17416
  if (!cacheSafeParams) {
17203
- debugLogger6.debug(`btw: no cacheSafeParams for session=${sessionId}`);
17417
+ debugLogger7.debug(`btw: no cacheSafeParams for session=${sessionId}`);
17204
17418
  return { sessionId, answer: null };
17205
17419
  }
17206
17420
  const childSignal = AbortSignal.timeout(BTW_CHILD_TIMEOUT_MS);
@@ -17254,7 +17468,7 @@ var QwenAgent = class {
17254
17468
  try {
17255
17469
  hasHistory = (config.getGeminiClient().getHistoryShallow() ?? []).length > 0;
17256
17470
  } catch (error) {
17257
- debugLogger6.debug("Failed to read history before /fork:", error);
17471
+ debugLogger7.debug("Failed to read history before /fork:", error);
17258
17472
  }
17259
17473
  if (!hasHistory) {
17260
17474
  throw RequestError.invalidParams(
@@ -17296,7 +17510,7 @@ var QwenAgent = class {
17296
17510
  ]
17297
17511
  });
17298
17512
  } catch (error) {
17299
- debugLogger6.debug("Failed to record fork event in history:", error);
17513
+ debugLogger7.debug("Failed to record fork event in history:", error);
17300
17514
  }
17301
17515
  return { sessionId, description, launched: true };
17302
17516
  }
@@ -17359,7 +17573,7 @@ ${outputText}
17359
17573
  'taskKind must be "agent", "shell", or "monitor"'
17360
17574
  );
17361
17575
  }
17362
- debugLogger6.info(
17576
+ debugLogger7.info(
17363
17577
  `sessionTaskCancel requested sessionId=${sessionId} taskId=${taskId} taskKind=${taskKind}`
17364
17578
  );
17365
17579
  const session = this.sessionOrThrow(sessionId);
@@ -17369,7 +17583,7 @@ ${outputText}
17369
17583
  const task = config.getBackgroundTaskRegistry().get(taskId);
17370
17584
  if (!task || task.status !== "running" && task.status !== "paused") {
17371
17585
  const reason = task ? "not_running" : "not_found";
17372
- debugLogger6.info(
17586
+ debugLogger7.info(
17373
17587
  `sessionTaskCancel skipped sessionId=${sessionId} taskId=${taskId} taskKind=${taskKind} reason=${reason} status=${task?.status ?? "missing"}`
17374
17588
  );
17375
17589
  return { cancelled: false, reason, status: task?.status };
@@ -17379,7 +17593,7 @@ ${outputText}
17379
17593
  } else {
17380
17594
  config.getBackgroundTaskRegistry().cancel(taskId);
17381
17595
  }
17382
- debugLogger6.info(
17596
+ debugLogger7.info(
17383
17597
  `sessionTaskCancel completed sessionId=${sessionId} taskId=${taskId} taskKind=${taskKind} status=${task.status}`
17384
17598
  );
17385
17599
  return { cancelled: true, status: task.status };
@@ -17388,13 +17602,13 @@ ${outputText}
17388
17602
  const task = config.getBackgroundShellRegistry().get(taskId);
17389
17603
  if (!task || task.status !== "running") {
17390
17604
  const reason = task ? "not_running" : "not_found";
17391
- debugLogger6.info(
17605
+ debugLogger7.info(
17392
17606
  `sessionTaskCancel skipped sessionId=${sessionId} taskId=${taskId} taskKind=${taskKind} reason=${reason} status=${task?.status ?? "missing"}`
17393
17607
  );
17394
17608
  return { cancelled: false, reason, status: task?.status };
17395
17609
  }
17396
17610
  config.getBackgroundShellRegistry().requestCancel(taskId);
17397
- debugLogger6.info(
17611
+ debugLogger7.info(
17398
17612
  `sessionTaskCancel completed sessionId=${sessionId} taskId=${taskId} taskKind=${taskKind} status=${task.status}`
17399
17613
  );
17400
17614
  return { cancelled: true, status: task.status };
@@ -17403,13 +17617,13 @@ ${outputText}
17403
17617
  const task = config.getMonitorRegistry().get(taskId);
17404
17618
  if (!task || task.status !== "running") {
17405
17619
  const reason = task ? "not_running" : "not_found";
17406
- debugLogger6.info(
17620
+ debugLogger7.info(
17407
17621
  `sessionTaskCancel skipped sessionId=${sessionId} taskId=${taskId} taskKind=${taskKind} reason=${reason} status=${task?.status ?? "missing"}`
17408
17622
  );
17409
17623
  return { cancelled: false, reason, status: task?.status };
17410
17624
  }
17411
17625
  config.getMonitorRegistry().cancel(taskId);
17412
- debugLogger6.info(
17626
+ debugLogger7.info(
17413
17627
  `sessionTaskCancel completed sessionId=${sessionId} taskId=${taskId} taskKind=${taskKind} status=${task.status}`
17414
17628
  );
17415
17629
  return { cancelled: true, status: task.status };
@@ -17439,7 +17653,7 @@ ${outputText}
17439
17653
  durationMs: Date.now() - cleared.setAt
17440
17654
  });
17441
17655
  }
17442
- debugLogger6.info(
17656
+ debugLogger7.info(
17443
17657
  `sessionGoalClear sessionId=${sessionId} cleared=${!!cleared} condition=${cleared?.condition ?? "(none)"}`
17444
17658
  );
17445
17659
  return {
@@ -17478,7 +17692,7 @@ ${outputText}
17478
17692
  }
17479
17693
  const session = this.sessionOrThrow(sessionId);
17480
17694
  const result = await session.continueLastTurn();
17481
- debugLogger6.info(
17695
+ debugLogger7.info(
17482
17696
  `sessionContinue sessionId=${sessionId} accepted=${result.accepted} interruption=${result.interruption}`
17483
17697
  );
17484
17698
  return result;
@@ -17500,7 +17714,7 @@ ${outputText}
17500
17714
  request.runtimeClientId
17501
17715
  );
17502
17716
  } catch (sessionErr) {
17503
- debugLogger6.warn(
17717
+ debugLogger7.warn(
17504
17718
  `workspaceMcpRuntimeAdd: failed to add runtime MCP server '${request.name}' to active session ${session.getConfig().getSessionId()}: ${sessionErr instanceof Error ? sessionErr.message : String(sessionErr)}`
17505
17719
  );
17506
17720
  }
@@ -17523,7 +17737,7 @@ ${outputText}
17523
17737
  request.runtimeClientId
17524
17738
  );
17525
17739
  } catch (sessionErr) {
17526
- debugLogger6.warn(
17740
+ debugLogger7.warn(
17527
17741
  `workspaceMcpRuntimeRemove: failed to remove runtime MCP server '${request.name}' from active session ${session.getConfig().getSessionId()}: ${sessionErr instanceof Error ? sessionErr.message : String(sessionErr)}`
17528
17742
  );
17529
17743
  }
@@ -17632,7 +17846,7 @@ ${outputText}
17632
17846
  }
17633
17847
  );
17634
17848
  if (success) {
17635
- fireSessionDeleteHook(this.config, sessionId, debugLogger6);
17849
+ fireSessionDeleteHook(this.config, sessionId, debugLogger7);
17636
17850
  }
17637
17851
  return { success };
17638
17852
  }
@@ -17758,7 +17972,7 @@ ${outputText}
17758
17972
  filesFailed = fileResult.filesFailed;
17759
17973
  } catch (err) {
17760
17974
  const reason = err instanceof Error ? err.message : String(err);
17761
- debugLogger6.error(
17975
+ debugLogger7.error(
17762
17976
  `[ACP] File-history rewind failed for session=${sessionId} promptId=${promptId}: ${reason}`
17763
17977
  );
17764
17978
  filesFailed = [`file-history-rewind: ${reason}`];
@@ -17790,7 +18004,7 @@ ${outputText}
17790
18004
  } catch (err) {
17791
18005
  const reason = err instanceof Error ? err.message : String(err);
17792
18006
  artifactSnapshotUnavailable = "artifact snapshot unavailable after rewind";
17793
- debugLogger6.warn(
18007
+ debugLogger7.warn(
17794
18008
  `[ACP] Failed to rebuild artifact snapshot after rewind for session=${sessionId}: ${reason}`
17795
18009
  );
17796
18010
  }
@@ -17846,7 +18060,7 @@ ${outputText}
17846
18060
  records: sessionData.conversation.messages,
17847
18061
  gaps: sessionData.historyGaps,
17848
18062
  cumulativeUsage: createReplayCumulativeUsage(),
17849
- logger: debugLogger6
18063
+ logger: debugLogger7
17850
18064
  });
17851
18065
  return {
17852
18066
  updates: replay.updates,
@@ -18202,7 +18416,7 @@ ${outputText}
18202
18416
  newMerged.providerProtocol ?? {}
18203
18417
  );
18204
18418
  } catch (err) {
18205
- debugLogger6.warn(
18419
+ debugLogger7.warn(
18206
18420
  `reload: reloadModelProvidersConfig failed for session ${id}: ${err}`
18207
18421
  );
18208
18422
  }
@@ -18212,7 +18426,7 @@ ${outputText}
18212
18426
  try {
18213
18427
  await config.switchModel(authType, newModelName);
18214
18428
  } catch (err) {
18215
- debugLogger6.warn(
18429
+ debugLogger7.warn(
18216
18430
  `reload: switchModel failed for session ${id}: ${err}`
18217
18431
  );
18218
18432
  }
@@ -18220,7 +18434,7 @@ ${outputText}
18220
18434
  try {
18221
18435
  await config.refreshAuth(authType);
18222
18436
  } catch (err) {
18223
- debugLogger6.warn(
18437
+ debugLogger7.warn(
18224
18438
  `reload: refreshAuth failed for session ${id}: ${err}`
18225
18439
  );
18226
18440
  }
@@ -18239,7 +18453,7 @@ ${outputText}
18239
18453
  session.clearTodoStopGuardTrust();
18240
18454
  }
18241
18455
  } catch (err) {
18242
- debugLogger6.warn(
18456
+ debugLogger7.warn(
18243
18457
  `reload: setApprovalMode failed for session ${id}: ${err}`
18244
18458
  );
18245
18459
  }
@@ -18248,14 +18462,14 @@ ${outputText}
18248
18462
  try {
18249
18463
  await config.refreshHierarchicalMemory();
18250
18464
  } catch (err) {
18251
- debugLogger6.warn(
18465
+ debugLogger7.warn(
18252
18466
  `reload: refreshHierarchicalMemory failed for session ${id}: ${err}`
18253
18467
  );
18254
18468
  }
18255
18469
  try {
18256
18470
  await config.getGeminiClient()?.refreshSystemInstruction();
18257
18471
  } catch (err) {
18258
- debugLogger6.warn(
18472
+ debugLogger7.warn(
18259
18473
  `reload: refreshSystemInstruction failed for session ${id}: ${err}`
18260
18474
  );
18261
18475
  }
@@ -18265,7 +18479,7 @@ ${outputText}
18265
18479
  for (let i = 0; i < results.length; i++) {
18266
18480
  if (results[i].status === "rejected") {
18267
18481
  const reason = results[i].reason;
18268
- debugLogger6.warn(
18482
+ debugLogger7.warn(
18269
18483
  `Session ${sessions[i][0]} reload failed: ${reason}`
18270
18484
  );
18271
18485
  skipped.push(sessions[i][0]);
@@ -18310,7 +18524,7 @@ ${outputText}
18310
18524
  );
18311
18525
  for (const result of configResults) {
18312
18526
  if (result.status === "rejected") {
18313
- debugLogger6.warn(`Skill config refresh failed: ${result.reason}`);
18527
+ debugLogger7.warn(`Skill config refresh failed: ${result.reason}`);
18314
18528
  }
18315
18529
  }
18316
18530
  }
@@ -18329,7 +18543,7 @@ ${outputText}
18329
18543
  for (let i = 0; i < results.length; i++) {
18330
18544
  if (results[i].status === "rejected") {
18331
18545
  const reason2 = results[i].reason;
18332
- debugLogger6.warn(
18546
+ debugLogger7.warn(
18333
18547
  `Session ${sessions[i].getId()} skill refresh failed: ${reason2}`
18334
18548
  );
18335
18549
  }
@@ -18373,12 +18587,12 @@ ${outputText}
18373
18587
  disposeTranscriptReplayConfig(config) {
18374
18588
  try {
18375
18589
  void Promise.resolve(config.getToolRegistry()?.stop()).catch((err) => {
18376
- debugLogger6.debug(
18590
+ debugLogger7.debug(
18377
18591
  `Transcript replay config tool registry stop failed: ${err instanceof Error ? err.message : String(err)}`
18378
18592
  );
18379
18593
  });
18380
18594
  } catch (err) {
18381
- debugLogger6.debug(
18595
+ debugLogger7.debug(
18382
18596
  `Transcript replay config tool registry stop failed: ${err instanceof Error ? err.message : String(err)}`
18383
18597
  );
18384
18598
  }
@@ -18626,7 +18840,7 @@ ${outputText}
18626
18840
  sessionId: sid,
18627
18841
  ...event
18628
18842
  }).catch((err) => {
18629
- debugLogger6.debug(
18843
+ debugLogger7.debug(
18630
18844
  `MCP budget extNotification dropped (session=${sid}, kind=${event.kind}): ${err instanceof Error ? err.message : String(err)}`
18631
18845
  );
18632
18846
  });
@@ -18656,7 +18870,7 @@ ${outputText}
18656
18870
  try {
18657
18871
  await config.waitForMcpReady();
18658
18872
  } catch (err) {
18659
- debugLogger6.error(
18873
+ debugLogger7.error(
18660
18874
  `MCP discovery readiness failed: ${err instanceof Error ? err.message : String(err)}`
18661
18875
  );
18662
18876
  return;
@@ -18680,7 +18894,7 @@ ${outputText}
18680
18894
  try {
18681
18895
  await config.refreshAuth(selectedType, true);
18682
18896
  } catch (e) {
18683
- debugLogger6.error(`Authentication failed: ${e}`);
18897
+ debugLogger7.error(`Authentication failed: ${e}`);
18684
18898
  throw RequestError.authRequired(
18685
18899
  {
18686
18900
  authMethods: pickAuthMethodsForAuthRequired(selectedType)
@@ -18714,8 +18928,15 @@ ${outputText}
18714
18928
  if (this.sessions.has(sessionId)) {
18715
18929
  throw new Error(`Session ${sessionId} is already active.`);
18716
18930
  }
18717
- const session = new Session(sessionId, config, this.connection, settings);
18931
+ const session = new Session(
18932
+ sessionId,
18933
+ config,
18934
+ this.connection,
18935
+ settings,
18936
+ () => this.activeWorkReporter?.notifyChanged()
18937
+ );
18718
18938
  this.sessions.set(sessionId, session);
18939
+ this.activeWorkReporter?.notifyChanged();
18719
18940
  this.initializingConfigs.delete(config);
18720
18941
  try {
18721
18942
  if (options.enableLiveScreenContext) {