@qwen-code/qwen-code 0.20.2-headless-image-routing.1 → 0.21.0

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 (370) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +5 -0
  2. package/bundled/qc-helper/docs/features/sub-agents.md +23 -5
  3. package/bundled/qc-helper/docs/integration-github-action.md +9 -9
  4. package/bundled/review/SKILL.md +7 -3
  5. package/chunks/MaxSizedBox-5DPPWPGT.js +85 -0
  6. package/chunks/{StandaloneSessionPicker-PLQQB22E.js → StandaloneSessionPicker-BIRMPLRD.js} +66 -59
  7. package/chunks/{acp-startup-profiler-N3RHHXJ3.js → acp-startup-profiler-RV3IV562.js} +2 -2
  8. package/chunks/{acpAgent-AIVK2EM5.js → acpAgent-6J2U72PQ.js} +705 -182
  9. package/chunks/agent-6ODUANDO.js +81 -0
  10. package/chunks/agent-headless-7BYQTMHW.js +75 -0
  11. package/chunks/{anthropicContentGenerator-HGWAHO24.js → anthropicContentGenerator-75BKLTSP.js} +117 -43
  12. package/chunks/{artifact-tool-56T5IMBP.js → artifact-tool-Y5T7GG7F.js} +3 -3
  13. package/chunks/{askUserQuestion-E25OBIC2.js → askUserQuestion-2H6747FR.js} +3 -3
  14. package/chunks/bridge-ZUB64FAE.js +90 -0
  15. package/chunks/{build-GHIZ4MSZ.js → build-RV63TIRH.js} +2 -3
  16. package/chunks/{ca-N6VVUFVB.js → ca-25EDXPFZ.js} +2 -0
  17. package/chunks/{channel-worker-group-QZV2SP5U.js → channel-worker-group-2ZD7TVAT.js} +8 -7
  18. package/chunks/{channel-worker-manager-3GMAU45H.js → channel-worker-manager-4OA4BCGB.js} +190 -30
  19. package/chunks/{channel-worker-supervisor-QCXSXCRY.js → channel-worker-supervisor-V7KCFJTS.js} +7 -6
  20. package/chunks/{chunk-TYQMGACW.js → chunk-22C7BQ6D.js} +508 -10967
  21. package/chunks/chunk-2JZBVYTU.js +452 -0
  22. package/chunks/{chunk-H2XVO6NE.js → chunk-2MIN6GRR.js} +1 -1
  23. package/chunks/{chunk-4DWTDZGS.js → chunk-2NH6DYI4.js} +12 -12
  24. package/chunks/chunk-2SCDWPXI.js +246 -0
  25. package/chunks/{chunk-QE4KFTBS.js → chunk-2X55UKQE.js} +3 -3
  26. package/chunks/{chunk-QBUDF33N.js → chunk-3QMGYBFN.js} +1 -1
  27. package/chunks/{chunk-3OAKYHRG.js → chunk-3RN6GBKS.js} +1 -1
  28. package/chunks/{chunk-QR6U5QPP.js → chunk-3SJ43L4W.js} +4 -0
  29. package/chunks/chunk-46UV252V.js +128 -0
  30. package/chunks/{chunk-GHRSKGHF.js → chunk-4WIZGAH3.js} +7 -7
  31. package/chunks/{chunk-CAS7CB3T.js → chunk-55DJUCI2.js} +87 -29
  32. package/chunks/{chunk-QNLNLENL.js → chunk-5I2IWRSH.js} +2 -2
  33. package/chunks/{chunk-H24SOJIQ.js → chunk-5NBDS5S6.js} +147 -7
  34. package/chunks/{chunk-E4IMU4Y5.js → chunk-63P4EL5V.js} +1 -1
  35. package/chunks/chunk-6FGBXPWM.js +293 -0
  36. package/chunks/{chunk-FFFM6NJV.js → chunk-6GMVPFB2.js} +155 -73
  37. package/chunks/{chunk-KWK7UE6L.js → chunk-6OUGMXDC.js} +6 -6
  38. package/chunks/{chunk-QRUIS3DN.js → chunk-6PEXNQTX.js} +22 -1
  39. package/chunks/{chunk-FZPTCQY7.js → chunk-7JURR4JT.js} +1 -1
  40. package/chunks/{chunk-Q6NAKZTA.js → chunk-7MVVZO4N.js} +4 -4
  41. package/chunks/{chunk-6ZBPS62S.js → chunk-7ZCNENPP.js} +1 -1
  42. package/chunks/{chunk-6X4GWOPW.js → chunk-A5L3JMUA.js} +1 -1
  43. package/chunks/{chunk-YO2XRXY6.js → chunk-ACY3A37B.js} +3 -3
  44. package/chunks/chunk-AMDSOFFV.js +10860 -0
  45. package/chunks/{chunk-RV4C2ZFG.js → chunk-BIQWWWJN.js} +1 -1
  46. package/chunks/{chunk-ZHERRXZJ.js → chunk-BJX6ZSUK.js} +4 -4
  47. package/chunks/chunk-BK2UNYWD.js +29 -0
  48. package/chunks/{chunk-FRPDJNK3.js → chunk-BKHWX6I2.js} +3 -3
  49. package/chunks/chunk-BPJSQIJX.js +100 -0
  50. package/chunks/{chunk-M7WBGLYP.js → chunk-BULDBTYC.js} +2 -0
  51. package/chunks/{chunk-ZDP2Y2AL.js → chunk-CIKQ7KKO.js} +4625 -8645
  52. package/chunks/{chunk-PEJWA3QQ.js → chunk-D3UEZIQH.js} +4 -2
  53. package/chunks/chunk-DHHOYAPR.js +1462 -0
  54. package/chunks/{chunk-LESHKUWF.js → chunk-DLWL3Z7A.js} +5 -3
  55. package/chunks/{chunk-XHATNRQA.js → chunk-DP3IHZGG.js} +0 -2
  56. package/chunks/chunk-E5TUC6CA.js +479 -0
  57. package/chunks/{chunk-JC26SJ5Y.js → chunk-EBJQ6AXW.js} +13 -12
  58. package/chunks/{chunk-RCWKCN2Z.js → chunk-EPDRMGT4.js} +164 -17
  59. package/chunks/{chunk-FUFCALSJ.js → chunk-ETSW4KLJ.js} +2 -2
  60. package/chunks/{chunk-KHOVYUHX.js → chunk-FNQ6T3CV.js} +20 -3
  61. package/chunks/{chunk-SP5WRGVG.js → chunk-FQK6JAFG.js} +72 -23
  62. package/chunks/{chunk-NWZY2SPY.js → chunk-FSITMZJH.js} +8 -8
  63. package/chunks/{chunk-6RLROE6G.js → chunk-GLWP3FDB.js} +80 -15
  64. package/chunks/{chunk-KPBVP6SL.js → chunk-GSN55ZRI.js} +5 -5
  65. package/chunks/{chunk-MLYGPZGU.js → chunk-H4SBPHSA.js} +3 -3
  66. package/chunks/chunk-H5FFA6TH.js +902 -0
  67. package/chunks/{chunk-TDKQP3M6.js → chunk-HIJQF5B5.js} +1 -1
  68. package/chunks/{chunk-5G3ZVADU.js → chunk-IJTOWOD7.js} +17 -6
  69. package/chunks/chunk-IKCX4CCL.js +469 -0
  70. package/chunks/{chunk-LPEONXNV.js → chunk-IKYJHJNF.js} +3 -3
  71. package/chunks/{chunk-DTZY2SH2.js → chunk-IO3IX5Q4.js} +1 -1
  72. package/chunks/{chunk-RS7MT2QG.js → chunk-IPUUTYMV.js} +2 -4
  73. package/chunks/{chunk-XU457J4V.js → chunk-IRH27ZC2.js} +2 -2
  74. package/chunks/{chunk-46DK772E.js → chunk-J24WCGIN.js} +4 -4
  75. package/chunks/{chunk-4LVZNIDO.js → chunk-J56UI34H.js} +4 -13
  76. package/chunks/{chunk-TJTKSVIV.js → chunk-JLU636DO.js} +5 -1
  77. package/chunks/{chunk-RKWX4CMO.js → chunk-JVPM2ULZ.js} +6 -6
  78. package/chunks/{chunk-ENPCQK44.js → chunk-JXJFVC6E.js} +37 -18
  79. package/chunks/{chunk-NABLFI57.js → chunk-JZA3JUDJ.js} +1 -1
  80. package/chunks/{chunk-CGLQAVZE.js → chunk-K36B6G2O.js} +5 -5
  81. package/chunks/{chunk-GPSKDNEE.js → chunk-K4XWPEWB.js} +4 -4
  82. package/chunks/{chunk-QOZOIPSF.js → chunk-KIM5GUMA.js} +650 -113
  83. package/chunks/{chunk-JZSM2IZ3.js → chunk-KMQ33DO4.js} +7 -5
  84. package/chunks/{chunk-E2UVIFI2.js → chunk-KRXPRVGL.js} +0 -1
  85. package/chunks/{chunk-WHGVTP7Q.js → chunk-L26JL52R.js} +3 -3
  86. package/chunks/{chunk-7Z6JQEL6.js → chunk-L5UHQJTJ.js} +1 -1
  87. package/chunks/{chunk-O2XSCRCS.js → chunk-LB6DUZ26.js} +259 -67
  88. package/chunks/chunk-LEH5C7FV.js +232 -0
  89. package/chunks/{chunk-RWV32G2M.js → chunk-LH2BYDQ5.js} +6 -4
  90. package/chunks/{chunk-QKTHJXCS.js → chunk-LK7CHLVP.js} +79 -2
  91. package/chunks/{chunk-VRRF3GW5.js → chunk-LKEJ26GS.js} +11 -11
  92. package/chunks/{chunk-SQFXI7VK.js → chunk-LQIW3YFY.js} +227 -41
  93. package/chunks/chunk-LS77BEZP.js +405 -0
  94. package/chunks/{chunk-BSHD62QJ.js → chunk-M4FMGVY4.js} +3 -3
  95. package/chunks/{chunk-57FIIFJN.js → chunk-M5JM7OSF.js} +1 -1
  96. package/chunks/{chunk-7362QS5B.js → chunk-MB4MZHMJ.js} +80 -37
  97. package/chunks/{chunk-4K56OJFJ.js → chunk-MUP3T3AD.js} +1 -1
  98. package/chunks/{chunk-3HFNGB2O.js → chunk-MVSUYZDT.js} +4 -4
  99. package/chunks/{chunk-T5IO6FZ4.js → chunk-MZAXJAUM.js} +1 -1
  100. package/chunks/{chunk-QKNXKTZX.js → chunk-NH6KE4JX.js} +3 -3
  101. package/chunks/chunk-NIBLUX3Y.js +934 -0
  102. package/chunks/{chunk-OQB4EXO4.js → chunk-NL7LTRLR.js} +1 -1
  103. package/chunks/{chunk-CS2FSS7W.js → chunk-OFDOK3VM.js} +5 -5
  104. package/chunks/{chunk-LIZRAKPB.js → chunk-OHNBB4XR.js} +1 -1
  105. package/chunks/{chunk-MDZTPSXO.js → chunk-OKY7HXPG.js} +2 -2
  106. package/chunks/{chunk-NHDKSOEY.js → chunk-P3QQPMQA.js} +5 -5
  107. package/chunks/{chunk-7THPNISK.js → chunk-PC6JANNU.js} +5 -5
  108. package/chunks/{chunk-OTQ6PSZC.js → chunk-PHOF65IG.js} +3498 -1030
  109. package/chunks/{chunk-OQ5SYCPE.js → chunk-PJIZUQVC.js} +2 -2
  110. package/chunks/{chunk-5DTTYNB7.js → chunk-PQNHRFJC.js} +16 -3
  111. package/chunks/{chunk-YM3SZTH4.js → chunk-PR75REBZ.js} +18 -1
  112. package/chunks/{chunk-RECUEJ7B.js → chunk-PSOO6YXD.js} +18 -15
  113. package/chunks/{chunk-X6N25LXS.js → chunk-PWTZEM3C.js} +2 -2
  114. package/chunks/{chunk-5NJTNQUW.js → chunk-PWVFN2LF.js} +1 -1
  115. package/chunks/{chunk-7AUH6A4T.js → chunk-Q4M4MDQ4.js} +2 -2
  116. package/chunks/{chunk-EZPB6S2I.js → chunk-QAF7NMK7.js} +1 -1
  117. package/chunks/{chunk-5GI55PF5.js → chunk-R5AFZNQW.js} +5 -5
  118. package/chunks/{chunk-T5B5NQZX.js → chunk-RF3EXIHJ.js} +47 -60
  119. package/chunks/{chunk-4K7VDKAD.js → chunk-RHLZR4E5.js} +1 -1
  120. package/chunks/{chunk-TJDW42MV.js → chunk-RIBKPMRP.js} +220 -141
  121. package/chunks/{chunk-RVLZCXEE.js → chunk-RWTEFFPU.js} +82 -3
  122. package/chunks/{chunk-L5QZGCRH.js → chunk-RZIX2G32.js} +1 -1
  123. package/chunks/{chunk-LLKWRXSS.js → chunk-SQCQ4KO2.js} +350 -418
  124. package/chunks/{chunk-THJNPLI4.js → chunk-TARRHLLG.js} +1 -0
  125. package/chunks/{chunk-XCXYRDHB.js → chunk-TEHGS6UP.js} +47 -18
  126. package/chunks/{chunk-PQIVAWXN.js → chunk-TGILQ3YH.js} +8 -8
  127. package/chunks/{chunk-Q2YKNMLS.js → chunk-TOFQCPDC.js} +43 -10
  128. package/chunks/{chunk-L3KUB6XM.js → chunk-TPRQ7RZH.js} +586 -242
  129. package/chunks/{chunk-T4TZQJ7W.js → chunk-TWPJO254.js} +5 -16
  130. package/chunks/{chunk-HIP6TVWA.js → chunk-U7M2DMGW.js} +3 -3
  131. package/chunks/{chunk-ACW3VNUE.js → chunk-UDX5OBWR.js} +41 -9
  132. package/chunks/{chunk-LW2FUYBN.js → chunk-USTWD7QV.js} +6 -4
  133. package/chunks/{chunk-NPQDJGKU.js → chunk-UUUTRMI2.js} +1 -1
  134. package/chunks/chunk-UW5EOVUN.js +249 -0
  135. package/chunks/{chunk-6IL7KRLE.js → chunk-VAK25FTU.js} +1 -1
  136. package/chunks/{chunk-O4BHWVUD.js → chunk-VIA5XA4U.js} +5 -2
  137. package/chunks/{chunk-EBXZ2YGV.js → chunk-VRYUBFMC.js} +1 -1
  138. package/chunks/{chunk-TWVE5ZS5.js → chunk-VULLI6WQ.js} +172 -6
  139. package/chunks/{chunk-LNDD3IML.js → chunk-WCXCRJYB.js} +1 -1
  140. package/chunks/{chunk-2LI23QA6.js → chunk-X5XDDSSH.js} +1 -1
  141. package/chunks/{chunk-Q35QUZDQ.js → chunk-Y34KJKDC.js} +1 -1
  142. package/chunks/{chunk-7NR2AIK6.js → chunk-YBL3QUDD.js} +2 -2
  143. package/chunks/{chunk-H4AR2JQF.js → chunk-YH6G52F2.js} +3 -3
  144. package/chunks/{chunk-MBOJHHPI.js → chunk-YPE6A4GC.js} +2 -2
  145. package/chunks/{chunk-3EK5ZOUQ.js → chunk-YX324OPW.js} +1 -1
  146. package/chunks/{chunk-4PTLZ3NX.js → chunk-Z2BC6UJ5.js} +3 -3
  147. package/chunks/{chunk-QLJUC7TG.js → chunk-ZD6UTE4A.js} +1 -1
  148. package/chunks/{chunk-LX3COOXF.js → chunk-ZFDTEDCF.js} +6 -6
  149. package/chunks/chunk-ZJHVAS7M.js +289 -0
  150. package/chunks/{chunk-4OWXOUYF.js → chunk-ZNAUOR2I.js} +15 -12
  151. package/chunks/{chunk-T2L47JJK.js → chunk-ZOIFNCKL.js} +4 -4
  152. package/chunks/{computer-use-2VIV73WK.js → computer-use-SOQ4E3VX.js} +43 -35
  153. package/chunks/{config-utils-FYTBZLCJ.js → config-utils-7V7GGIW6.js} +3 -3
  154. package/chunks/contextCommand-JLHYA34Z.js +80 -0
  155. package/chunks/{create-sub-session-AZ77LBL3.js → create-sub-session-IWW2IZ2T.js} +3 -3
  156. package/chunks/{create-sub-session-XDHHC2P4.js → create-sub-session-QRJLW5BV.js} +43 -35
  157. package/chunks/{cron-create-KTWJM7QT.js → cron-create-YIID5XAW.js} +6 -6
  158. package/chunks/{cron-delete-2P3I5ULL.js → cron-delete-ZVHYCEP2.js} +5 -5
  159. package/chunks/{cron-list-PXDPGEDQ.js → cron-list-XEGS463Q.js} +5 -5
  160. package/chunks/{daemon-RAPSDJH7.js → daemon-YO6433NF.js} +350 -53
  161. package/chunks/daemon-status-provider-2233Q37D.js +89 -0
  162. package/chunks/{de-4IBXM7CN.js → de-HGRCYDEJ.js} +1 -0
  163. package/chunks/{dist-UIFWIFRO.js → dist-46NQKLTW.js} +2 -2
  164. package/chunks/{dist-XRYV6TJP.js → dist-AIKFMUKK.js} +50 -4
  165. package/chunks/{dist-XBJVSWS2.js → dist-BBLXMS3N.js} +14 -2
  166. package/chunks/{dist-OMW6WDEO.js → dist-F6IBUDR4.js} +40 -9
  167. package/chunks/{dist-PJLG2XYX.js → dist-WEAHOXDM.js} +1 -1
  168. package/chunks/{dist-OAV7LJGJ.js → dist-YFNEUWSE.js} +26 -2
  169. package/chunks/earlyInputCapture-A7NDU3PF.js +82 -0
  170. package/chunks/{edit-CS6SFEXC.js → edit-OBDSQURM.js} +43 -35
  171. package/chunks/{en-USMCCJAJ.js → en-MTWBNGDO.js} +15 -0
  172. package/chunks/{enter-worktree-LMAL75DY.js → enter-worktree-U6MRPQ2P.js} +43 -35
  173. package/chunks/{enterPlanMode-WVJB4DSS.js → enterPlanMode-BC5QUZZ2.js} +43 -35
  174. package/chunks/{environment-6YHC4JAJ.js → environment-W5UFC2CH.js} +46 -38
  175. package/chunks/errors-M7CLORXH.js +88 -0
  176. package/chunks/{exit-worktree-KPFD742L.js → exit-worktree-DGNYMECB.js} +43 -35
  177. package/chunks/{exitPlanMode-UEJS6CDY.js → exitPlanMode-GXTBWQAR.js} +43 -35
  178. package/chunks/{fast-path-G2N4NRCA.js → fast-path-JJZFJANL.js} +6 -6
  179. package/chunks/{fast-path-settings-DAOVFADC.js → fast-path-settings-WQJU2LAT.js} +2 -2
  180. package/chunks/{fr-WVHEBDDB.js → fr-45RLL55O.js} +1 -0
  181. package/chunks/{gemini-2MDVIOVT.js → gemini-QS36EBZV.js} +132 -102
  182. package/chunks/{geminiContentGenerator-ZXTDBMFR.js → geminiContentGenerator-AG4KB6CV.js} +14 -8
  183. package/chunks/{getMachineId-bsd-QFVLPUPT.js → getMachineId-bsd-V7W3GODC.js} +1 -1
  184. package/chunks/{getMachineId-darwin-DGMQQE2E.js → getMachineId-darwin-TDO75DQP.js} +1 -1
  185. package/chunks/{getMachineId-linux-R4Z6CSWC.js → getMachineId-linux-TF43WQT2.js} +1 -1
  186. package/chunks/{getMachineId-unsupported-Z3SBVBUV.js → getMachineId-unsupported-ZGUO3TXT.js} +1 -1
  187. package/chunks/{getMachineId-win-SCK5UFDT.js → getMachineId-win-ECFYZZFQ.js} +1 -1
  188. package/chunks/{glob-562XFLIZ.js → glob-V7R3PSK3.js} +43 -35
  189. package/chunks/{grep-MGEFBDQK.js → grep-QYPSK7OP.js} +43 -35
  190. package/chunks/handleAutoUpdate-6DBEZYPV.js +81 -0
  191. package/chunks/{i18n-R6HJENXA.js → i18n-VUJJZIMU.js} +44 -36
  192. package/chunks/image-gen-Z3VPGKRC.js +240 -0
  193. package/chunks/initializer-UWAK5U5O.js +86 -0
  194. package/chunks/installationInfo-6O2YAA52.js +80 -0
  195. package/chunks/{ja-KY4ROZTE.js → ja-B7DF7DFG.js} +1 -0
  196. package/chunks/{keychain-token-storage-6ACJDYIB.js → keychain-token-storage-MDTG3WRM.js} +3 -3
  197. package/chunks/{kittyProtocolDetector-HCNNKJTI.js → kittyProtocolDetector-MBRTDRBK.js} +5 -3
  198. package/chunks/list-GB4ESM3T.js +89 -0
  199. package/chunks/list-agents-5KJJHR6I.js +80 -0
  200. package/chunks/loadedSettingsAdapter-OT6JVQ7U.js +83 -0
  201. package/chunks/loggingContentGenerator-HS3S5H3Q.js +1077 -0
  202. package/chunks/{loop-wakeup-RNMRVA66.js → loop-wakeup-FXKNNYSY.js} +7 -7
  203. package/chunks/{ls-J2ZI5XYK.js → ls-NTK6VOQJ.js} +5 -5
  204. package/chunks/{lsp-UMS3NUB5.js → lsp-2JI24STP.js} +3 -3
  205. package/chunks/{managed-npm-update-4KNYSOYC.js → managed-npm-update-JYEMMXA3.js} +94 -38
  206. package/chunks/mcp-6DBDJPFU.js +83 -0
  207. package/chunks/{monitor-DMHKE4SW.js → monitor-R3ODH5U6.js} +45 -36
  208. package/chunks/node-UUDY34IG.js +305 -0
  209. package/chunks/nonInteractiveCli-MOYCYBBU.js +141 -0
  210. package/chunks/{notebook-edit-35SJGEOR.js → notebook-edit-BNOK452R.js} +43 -35
  211. package/chunks/{openaiContentGenerator-5LPAFXPF.js → openaiContentGenerator-WMCU3O2H.js} +27 -17
  212. package/chunks/pidfile-TFRZZZIO.js +86 -0
  213. package/chunks/{processUtils-GM2I55KF.js → processUtils-RT7UNCC2.js} +2 -2
  214. package/chunks/{pt-OK455PLH.js → pt-22Q3FP73.js} +1 -0
  215. package/chunks/{qwenContentGenerator-HKOYNP7H.js → qwenContentGenerator-HHCRK4SX.js} +56 -42
  216. package/chunks/{qwenOAuth2-NUUYC3V5.js → qwenOAuth2-OWLB5AKH.js} +14 -27
  217. package/chunks/read-file-APMO3PSX.js +31 -0
  218. package/chunks/{read-mcp-resource-F6HYMDUY.js → read-mcp-resource-4DKQWGHD.js} +3 -3
  219. package/chunks/{record-artifact-7GCFLDD7.js → record-artifact-RQKFYO5B.js} +3 -3
  220. package/chunks/resumeHistoryUtils-6KRYEAWZ.js +91 -0
  221. package/chunks/ripGrep-BEJDEDXW.js +73 -0
  222. package/chunks/{ru-7SPDGMGD.js → ru-FZCNZHDC.js} +1 -0
  223. package/chunks/{run-qwen-serve-5VH3F4NW.js → run-qwen-serve-FU6HEM4J.js} +271 -57
  224. package/chunks/{runtime-OH77YH7W.js → runtime-XXRRTNP6.js} +55 -45
  225. package/chunks/{scheduler-WJQSLCSV.js → scheduler-G2ZS2Z7E.js} +43 -35
  226. package/chunks/{sdk-exporters-grpc-ETLH47EP.js → sdk-exporters-grpc-AK3LGHNO.js} +3 -3
  227. package/chunks/{sdk-exporters-http-T3POX73F.js → sdk-exporters-http-FYBSUCPD.js} +6 -6
  228. package/chunks/{sdk-impl-NSLPDH6I.js → sdk-impl-GMVPB7NB.js} +6 -6
  229. package/chunks/{send-message-PYIJ2PZL.js → send-message-Q6OOR6BR.js} +46 -9
  230. package/chunks/serve-7BSTXJ4T.js +89 -0
  231. package/chunks/{server-E4N4AI6Z.js → server-4UMH7OIZ.js} +2362 -411
  232. package/chunks/{session-5YUWIOQE.js → session-K3O3Q2SV.js} +105 -87
  233. package/chunks/{settings-YY7ZSFO7.js → settings-CR2EWTBA.js} +53 -45
  234. package/chunks/shell-HH3PF3A2.js +83 -0
  235. package/chunks/{skill-PAIDX3EU.js → skill-I3SDA4MB.js} +17 -16
  236. package/chunks/spawnChannel-RWNDBXGA.js +82 -0
  237. package/chunks/{src-IZXLJI5M.js → src-GE4TTTML.js} +302 -184
  238. package/chunks/{standalone-update-X675JVBL.js → standalone-update-Q6WFRZZQ.js} +45 -37
  239. package/chunks/{startInteractiveUI-ND2IVBU3.js → startInteractiveUI-SLZGHRPH.js} +747 -310
  240. package/chunks/{syntheticOutput-H7RTI5KL.js → syntheticOutput-I3757IWH.js} +4 -4
  241. package/chunks/{task-create-7474AJJD.js → task-create-N7WQSGYA.js} +10 -10
  242. package/chunks/{task-list-633HGOIB.js → task-list-FOPULZEP.js} +7 -7
  243. package/chunks/{task-stop-MNUGHPIA.js → task-stop-H6RHXFVQ.js} +4 -4
  244. package/chunks/{task-update-66GQB5LI.js → task-update-M57TFZJT.js} +10 -10
  245. package/chunks/{team-create-2DEYNMMN.js → team-create-YJALH5D2.js} +46 -38
  246. package/chunks/{team-delete-BB3CG3QF.js → team-delete-QE2UXJL7.js} +7 -7
  247. package/chunks/{team-plan-approval-65AVAOCT.js → team-plan-approval-34QFYKGN.js} +43 -35
  248. package/chunks/theme-manager-SWRILQHI.js +77 -0
  249. package/chunks/{todoWrite-KRAUN54W.js → todoWrite-VQ7FKOHL.js} +5 -5
  250. package/chunks/{tool-search-ZQP3SMTV.js → tool-search-NF7GB6LE.js} +16 -16
  251. package/chunks/total-session-admission-DLHHHLD3.js +84 -0
  252. package/chunks/{tree-sitter-FS4VPMZA.js → tree-sitter-4D7QS7F6.js} +1 -1
  253. package/chunks/{tree-sitter-bash-6B46JJCV.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
  254. package/chunks/{trustedFolders-LURI52LP.js → trustedFolders-KHXHY6PY.js} +44 -36
  255. package/chunks/{update-relaunch-BPWFIDLM.js → update-relaunch-WBUZJC5O.js} +5 -5
  256. package/chunks/updateCheck-RKL6M5XN.js +92 -0
  257. package/chunks/useAutoAcceptIndicator-CFQ5BUJL.js +93 -0
  258. package/chunks/{validateNonInterActiveAuth-HWD6Y22I.js → validateNonInterActiveAuth-3R223G3R.js} +89 -80
  259. package/chunks/{version-OD4JAFG7.js → version-HS7YSFHV.js} +1 -1
  260. package/chunks/{web-fetch-RFBKNU24.js → web-fetch-NKCSG7ZE.js} +18 -16
  261. package/chunks/{web-search-AKTVS5YZ.js → web-search-S62WAP4S.js} +13 -27
  262. package/chunks/{workflow-VZVCOSZN.js → workflow-QAGU5RU4.js} +44 -36
  263. package/chunks/workspace-providers-status-QSVZUETE.js +86 -0
  264. package/chunks/{workspace-registration-store-Q5SFJSX4.js → workspace-registration-store-24JMHDGF.js} +2 -2
  265. package/chunks/workspace-registry-UT4RBNBM.js +88 -0
  266. package/chunks/workspace-service-JFWRUS4V.js +98 -0
  267. package/chunks/workspace-skills-status-ZBBKJOI2.js +85 -0
  268. package/chunks/write-file-VHIXW5M7.js +73 -0
  269. package/chunks/{zh-WY5DWYZD.js → zh-LUIGBD55.js} +15 -0
  270. package/chunks/{zh-TW-BM47YBFH.js → zh-TW-F5KG2IYD.js} +15 -0
  271. package/cli-entry.js +10 -1
  272. package/cli.js +13 -13
  273. package/locales/ca.js +2 -0
  274. package/locales/de.js +1 -0
  275. package/locales/en.js +25 -0
  276. package/locales/fr.js +1 -0
  277. package/locales/ja.js +1 -0
  278. package/locales/pt.js +1 -0
  279. package/locales/ru.js +1 -0
  280. package/locales/zh-TW.js +23 -0
  281. package/locales/zh.js +23 -0
  282. package/package.json +3 -3
  283. package/web-shell/assets/{arc-BWFm0SI0.js → arc-DcbWnB9T.js} +1 -1
  284. package/web-shell/assets/{architectureDiagram-3BPJPVTR-CZ_yL-DQ.js → architectureDiagram-3BPJPVTR-kMMF5sud.js} +1 -1
  285. package/web-shell/assets/{blockDiagram-GPEHLZMM-B9F9mJvG.js → blockDiagram-GPEHLZMM-Htl9vTJS.js} +1 -1
  286. package/web-shell/assets/{c4Diagram-AAUBKEIU-BUdwJW5f.js → c4Diagram-AAUBKEIU-BnZnm0mQ.js} +1 -1
  287. package/web-shell/assets/channel-Cq7YKtfC.js +1 -0
  288. package/web-shell/assets/{chunk-2J33WTMH-w4cF-qlF.js → chunk-2J33WTMH-DziB7kDG.js} +1 -1
  289. package/web-shell/assets/{chunk-4BX2VUAB-BXwURxHJ.js → chunk-4BX2VUAB-CmkD8daw.js} +1 -1
  290. package/web-shell/assets/{chunk-55IACEB6-Gem3LalC.js → chunk-55IACEB6-CHAd9A_U.js} +1 -1
  291. package/web-shell/assets/{chunk-727SXJPM-A3ddVojI.js → chunk-727SXJPM-Dqaam3fE.js} +1 -1
  292. package/web-shell/assets/{chunk-AQP2D5EJ-CjHZ5L_R.js → chunk-AQP2D5EJ-D_-saBYM.js} +1 -1
  293. package/web-shell/assets/{chunk-FMBD7UC4-CKgdgcpv.js → chunk-FMBD7UC4-B9r_veWD.js} +1 -1
  294. package/web-shell/assets/{chunk-ND2GUHAM-Cn2Dykjb.js → chunk-ND2GUHAM-B3EaCSpL.js} +1 -1
  295. package/web-shell/assets/{chunk-QZHKN3VN--0SyraC5.js → chunk-QZHKN3VN-CYq8x9mn.js} +1 -1
  296. package/web-shell/assets/classDiagram-4FO5ZUOK-CQ9aC1Tg.js +1 -0
  297. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ9aC1Tg.js +1 -0
  298. package/web-shell/assets/{cose-bilkent-S5V4N54A-CphhAity.js → cose-bilkent-S5V4N54A-D0ng4uiB.js} +1 -1
  299. package/web-shell/assets/{dagre-BM42HDAG-DU--jiKp.js → dagre-BM42HDAG-DCZollQv.js} +1 -1
  300. package/web-shell/assets/{diagram-2AECGRRQ-BzvuZw1Y.js → diagram-2AECGRRQ-Dfk2pWS0.js} +1 -1
  301. package/web-shell/assets/{diagram-5GNKFQAL-D84-49Y0.js → diagram-5GNKFQAL-kX38ltWR.js} +1 -1
  302. package/web-shell/assets/{diagram-KO2AKTUF-DQTq-3_3.js → diagram-KO2AKTUF-CJz2vsXh.js} +1 -1
  303. package/web-shell/assets/{diagram-LMA3HP47-8FTrshzN.js → diagram-LMA3HP47-BvMLZm_7.js} +1 -1
  304. package/web-shell/assets/{diagram-OG6HWLK6-BCjpDBCm.js → diagram-OG6HWLK6-l7kfStkO.js} +1 -1
  305. package/web-shell/assets/{erDiagram-TEJ5UH35-BtRObkmg.js → erDiagram-TEJ5UH35-BSVa8GGT.js} +1 -1
  306. package/web-shell/assets/{flowDiagram-I6XJVG4X-DTrW6oxy.js → flowDiagram-I6XJVG4X-CoawKIXH.js} +1 -1
  307. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BgPNSW6j.js → ganttDiagram-6RSMTGT7-DFUDH0zF.js} +1 -1
  308. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BTclNgGV.js → gitGraphDiagram-PVQCEYII-Y2pvpT4e.js} +1 -1
  309. package/web-shell/assets/{index-CxA7AqY6.js → index-D0GX0zZf.js} +1 -1
  310. package/web-shell/assets/index-D9haPt0X.css +5 -0
  311. package/web-shell/assets/index-ckX9Pq5k.js +1230 -0
  312. package/web-shell/assets/{infoDiagram-5YYISTIA-DCE4AJt2.js → infoDiagram-5YYISTIA-CU8_zLiX.js} +1 -1
  313. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-C8iE6q4Y.js → ishikawaDiagram-YF4QCWOH-AVQiV0DU.js} +1 -1
  314. package/web-shell/assets/{journeyDiagram-JHISSGLW-C_dxdyEc.js → journeyDiagram-JHISSGLW-DQ0VSKa3.js} +1 -1
  315. package/web-shell/assets/{kanban-definition-UN3LZRKU-Dw3n1u3w.js → kanban-definition-UN3LZRKU-BqnWqsE_.js} +1 -1
  316. package/web-shell/assets/{linear-C2BF2zJ9.js → linear-BkoihsaA.js} +1 -1
  317. package/web-shell/assets/{mermaid.core-CGTQU3MA.js → mermaid.core-5RJs-31j.js} +5 -5
  318. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BVFZm9ZC.js → mindmap-definition-RKZ34NQL-D33Bxnpd.js} +1 -1
  319. package/web-shell/assets/{pieDiagram-4H26LBE5-Cc-TNN3n.js → pieDiagram-4H26LBE5-BuEAw3BH.js} +1 -1
  320. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CgW3Rzsi.js → quadrantDiagram-W4KKPZXB-Kox_usEq.js} +1 -1
  321. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BAaj0Y3B.js → requirementDiagram-4Y6WPE33-CNjeUif0.js} +1 -1
  322. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-XJWmekxS.js → sankeyDiagram-5OEKKPKP-BCd2OL_U.js} +1 -1
  323. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CtRc_0wf.js → sequenceDiagram-3UESZ5HK-CF2ZTsz0.js} +1 -1
  324. package/web-shell/assets/{stateDiagram-AJRCARHV-WCnvMGy5.js → stateDiagram-AJRCARHV-qenSzHtm.js} +1 -1
  325. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B7W4zlCr.js +1 -0
  326. package/web-shell/assets/{timeline-definition-PNZ67QCA-C9cRx49L.js → timeline-definition-PNZ67QCA-B5DyWdgs.js} +1 -1
  327. package/web-shell/assets/{vennDiagram-CIIHVFJN-BvXOCEt-.js → vennDiagram-CIIHVFJN-DqP4I_o_.js} +1 -1
  328. package/web-shell/assets/{wardley-L42UT6IY-ByafGtzu.js → wardley-L42UT6IY-CJe2e4mg.js} +1 -1
  329. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-CozAnw8x.js → wardleyDiagram-YWT4CUSO-BMDSw-Rr.js} +1 -1
  330. package/web-shell/assets/{xychartDiagram-2RQKCTM6-Camu9Qvq.js → xychartDiagram-2RQKCTM6-BTVZYkxD.js} +1 -1
  331. package/web-shell/index.html +17 -13
  332. package/chunks/MaxSizedBox-3XQIBACV.js +0 -78
  333. package/chunks/agent-QXD5NSKA.js +0 -73
  334. package/chunks/agent-headless-4VXR2TBK.js +0 -67
  335. package/chunks/bridge-GIBRSPE6.js +0 -81
  336. package/chunks/chunk-CBOQ3HY7.js +0 -2019
  337. package/chunks/chunk-MA6GYKK7.js +0 -6928
  338. package/chunks/contextCommand-XQU7KLIH.js +0 -72
  339. package/chunks/daemon-status-provider-KQVNB4VA.js +0 -80
  340. package/chunks/earlyInputCapture-WP5SA3KH.js +0 -74
  341. package/chunks/errors-JEYPXX4S.js +0 -80
  342. package/chunks/handleAutoUpdate-2VJPAW43.js +0 -73
  343. package/chunks/initializer-UOX67ZFQ.js +0 -78
  344. package/chunks/installationInfo-NQNY34X3.js +0 -72
  345. package/chunks/list-2Z7KS7ZF.js +0 -81
  346. package/chunks/loadedSettingsAdapter-LIYY3LE4.js +0 -75
  347. package/chunks/mcp-AJ4QW3JA.js +0 -75
  348. package/chunks/nonInteractiveCli-PUSO5QF6.js +0 -134
  349. package/chunks/pidfile-EH2JW2PB.js +0 -78
  350. package/chunks/read-file-JZ5VXILQ.js +0 -31
  351. package/chunks/resumeHistoryUtils-Z3HG4WKM.js +0 -84
  352. package/chunks/ripGrep-JNLJCT2B.js +0 -65
  353. package/chunks/serve-NN5FXWR6.js +0 -81
  354. package/chunks/shell-FXT3NVC6.js +0 -75
  355. package/chunks/spawnChannel-XAWLXNOD.js +0 -74
  356. package/chunks/theme-manager-2WZHPK2M.js +0 -69
  357. package/chunks/total-session-admission-HULB2TEQ.js +0 -75
  358. package/chunks/updateCheck-D4ESCHBJ.js +0 -88
  359. package/chunks/useAutoAcceptIndicator-CBNLOF2P.js +0 -86
  360. package/chunks/workspace-providers-status-TJTVHORI.js +0 -78
  361. package/chunks/workspace-registry-H6VM5WXK.js +0 -79
  362. package/chunks/workspace-service-ZNKD3I2J.js +0 -90
  363. package/chunks/workspace-skills-status-OOBIXADG.js +0 -77
  364. package/chunks/write-file-CAKK5IAO.js +0 -65
  365. package/web-shell/assets/channel-DiLlxxIf.js +0 -1
  366. package/web-shell/assets/classDiagram-4FO5ZUOK-CkylTdM4.js +0 -1
  367. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CkylTdM4.js +0 -1
  368. package/web-shell/assets/index-CGtQqOIa.css +0 -5
  369. package/web-shell/assets/index-TtM0hVjU.js +0 -1207
  370. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-D1gzH2Ue.js +0 -1
@@ -1,8 +1,5 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import {
4
- recomputeMcpGating
5
- } from "./chunk-CS2FSS7W.js";
6
3
  import {
7
4
  classifyApiError
8
5
  } from "./chunk-V7RNNPGC.js";
@@ -15,37 +12,49 @@ import {
15
12
  matchMcpServerByRef,
16
13
  parseExtensionRef,
17
14
  parseMcpServerRef
18
- } from "./chunk-TWVE5ZS5.js";
15
+ } from "./chunk-VULLI6WQ.js";
19
16
  import {
20
17
  getAvailableCommands,
21
18
  handleSlashCommand,
22
19
  insertAfterFunctionResponses,
23
20
  isSlashCommand,
24
21
  normalizePartList
25
- } from "./chunk-O2XSCRCS.js";
22
+ } from "./chunk-LB6DUZ26.js";
23
+ import {
24
+ collectContextData,
25
+ formatContextUsageText
26
+ } from "./chunk-R5AFZNQW.js";
27
+ import {
28
+ recomputeMcpGating
29
+ } from "./chunk-OFDOK3VM.js";
26
30
  import {
27
31
  appEvents,
28
32
  buildDisabledSkillNamesProvider,
29
33
  loadCliConfig,
30
34
  normalizeDisabledToolList
31
- } from "./chunk-L3KUB6XM.js";
35
+ } from "./chunk-TPRQ7RZH.js";
32
36
  import {
33
37
  getCommandSubcommandNames
34
- } from "./chunk-L5QZGCRH.js";
38
+ } from "./chunk-RZIX2G32.js";
35
39
  import {
36
40
  getEffectiveSupportedModes
37
- } from "./chunk-HIP6TVWA.js";
38
- import "./chunk-5DTTYNB7.js";
39
- import "./chunk-4LVZNIDO.js";
40
- import {
41
- collectContextData,
42
- formatContextUsageText
43
- } from "./chunk-5GI55PF5.js";
41
+ } from "./chunk-U7M2DMGW.js";
42
+ import "./chunk-J56UI34H.js";
44
43
  import "./chunk-4WGODMVR.js";
45
- import "./chunk-Q6NAKZTA.js";
46
- import "./chunk-BSHD62QJ.js";
44
+ import "./chunk-PQNHRFJC.js";
45
+ import "./chunk-M4FMGVY4.js";
46
+ import "./chunk-L5UHQJTJ.js";
47
+ import "./chunk-GSN55ZRI.js";
48
+ import "./chunk-6H67XLET.js";
49
+ import {
50
+ beginAcpBootstrapConfigProfiling,
51
+ buildAndFreezeAcpStartupProfile,
52
+ endAcpBootstrapConfigProfiling,
53
+ markAcpStartup
54
+ } from "./chunk-HIJQF5B5.js";
55
+ import "./chunk-7MVVZO4N.js";
56
+ import "./chunk-IKYJHJNF.js";
47
57
  import "./chunk-YAF2MQZ6.js";
48
- import "./chunk-7Z6JQEL6.js";
49
58
  import {
50
59
  GENERATION_MAX_PROMPT_BYTES,
51
60
  GENERATION_TIMEOUT_MS,
@@ -58,13 +67,14 @@ import {
58
67
  executeGeneration,
59
68
  formatWorkspaceMemoryForgetSummary,
60
69
  isValidServerName,
70
+ normalizeChannelDeliveryText,
61
71
  redactMcpServerSecrets,
62
72
  replayTranscriptRecordPage,
63
73
  restoreRedactedMcpSecrets,
64
74
  shouldSuppressRememberErrorDetails,
65
75
  workspaceMemoryFailureCode,
66
76
  workspaceMemoryFailureDiagnostics
67
- } from "./chunk-TJDW42MV.js";
77
+ } from "./chunk-RIBKPMRP.js";
68
78
  import {
69
79
  HistoryReplayer,
70
80
  MessageEmitter,
@@ -74,92 +84,83 @@ import {
74
84
  goalTerminalEventToHistoryItem,
75
85
  recordGoalStatusItem,
76
86
  restoreGoalFromHistory
77
- } from "./chunk-JC26SJ5Y.js";
78
- import "./chunk-4K7VDKAD.js";
79
- import "./chunk-LNDD3IML.js";
80
- import "./chunk-RS7MT2QG.js";
81
- import "./chunk-H2XVO6NE.js";
87
+ } from "./chunk-EBJQ6AXW.js";
88
+ import "./chunk-RHLZR4E5.js";
89
+ import "./chunk-IPUUTYMV.js";
90
+ import "./chunk-WCXCRJYB.js";
91
+ import "./chunk-2MIN6GRR.js";
82
92
  import "./chunk-QHTIBUWB.js";
83
93
  import {
84
94
  isTerminalGoalStatusKind
85
95
  } from "./chunk-QTERJVPZ.js";
86
96
  import "./chunk-3Z43GZUQ.js";
87
- import {
88
- computeCpuPercent
89
- } from "./chunk-HGT6JR3U.js";
90
- import "./chunk-RXFQM6FQ.js";
91
- import "./chunk-KPBVP6SL.js";
92
- import "./chunk-6H67XLET.js";
93
- import {
94
- beginAcpBootstrapConfigProfiling,
95
- buildAndFreezeAcpStartupProfile,
96
- endAcpBootstrapConfigProfiling,
97
- markAcpStartup
98
- } from "./chunk-TDKQP3M6.js";
99
- import "./chunk-LPEONXNV.js";
100
- import "./chunk-LXXMOYPL.js";
101
- import "./chunk-3HFNGB2O.js";
102
- import "./chunk-E5Z2AVNV.js";
103
- import {
104
- ACP_ROUTE_ID_PREFIX,
105
- buildAcpModelOptions,
106
- getCurrentAcpModelId,
107
- parseAcpBaseModelId,
108
- parseAcpModelOption,
109
- resolveAcpModelOption,
110
- sanitizeProviderBaseUrl
111
- } from "./chunk-JZSM2IZ3.js";
112
- import {
113
- mapSkillConfigToStatus
114
- } from "./chunk-2W3OOD4W.js";
115
97
  import {
116
98
  PERMISSION_RULE_TYPES,
117
99
  PermissionRulesValidationError,
118
100
  buildPermissionSettings,
119
101
  normalizePermissionRules,
120
102
  readPermissionRuleSet
121
- } from "./chunk-EBXZ2YGV.js";
103
+ } from "./chunk-VRYUBFMC.js";
122
104
  import {
123
105
  MAX_AUDIO_BYTES,
124
106
  sanitizeVoiceErrorMessage,
125
107
  transcribeVoiceAudio
126
- } from "./chunk-MLYGPZGU.js";
108
+ } from "./chunk-H4SBPHSA.js";
127
109
  import {
128
110
  readVoiceModel
129
- } from "./chunk-7NR2AIK6.js";
130
- import "./chunk-QLJUC7TG.js";
111
+ } from "./chunk-YBL3QUDD.js";
112
+ import "./chunk-ZD6UTE4A.js";
113
+ import {
114
+ computeCpuPercent
115
+ } from "./chunk-HGT6JR3U.js";
116
+ import "./chunk-RXFQM6FQ.js";
117
+ import "./chunk-PSOO6YXD.js";
118
+ import "./chunk-PC6JANNU.js";
119
+ import "./chunk-57OAHC2Y.js";
120
+ import {
121
+ createLoadedSettingsAdapter
122
+ } from "./chunk-IO3IX5Q4.js";
123
+ import "./chunk-LXXMOYPL.js";
124
+ import "./chunk-MVSUYZDT.js";
125
+ import "./chunk-E5Z2AVNV.js";
131
126
  import {
132
127
  parseSessionSource
133
- } from "./chunk-QOZOIPSF.js";
134
- import "./chunk-6RLROE6G.js";
128
+ } from "./chunk-KIM5GUMA.js";
129
+ import "./chunk-GLWP3FDB.js";
130
+ import {
131
+ NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
132
+ isNotCurrentlyGeneratingCancelError
133
+ } from "./chunk-UH3WSE5L.js";
135
134
  import "./chunk-COH43MRJ.js";
136
135
  import {
137
136
  CHANNEL_STARTUP_PROFILE_META_KEY,
138
137
  CHANNEL_STARTUP_PROFILE_VERSION,
139
138
  CLIENT_MCP_OVER_WS_CONFIG_FLAG,
139
+ DAEMON_CHANNEL_DELIVERY_META_KEY,
140
140
  LOAD_REPLAY_BULK_MODE,
141
141
  LOAD_REPLAY_META_KEY,
142
142
  LOAD_REPLAY_MODE_META_KEY,
143
143
  LOAD_REPLAY_PAGE_SIZE_META_KEY,
144
144
  LOAD_REPLAY_VERSION,
145
145
  MID_TURN_QUEUE_DRAIN_METHOD,
146
+ PROMPT_CANCEL_METHOD,
146
147
  TODO_STOP_GUARD_QUEUE_RELEASE_METHOD
147
- } from "./chunk-QR6U5QPP.js";
148
+ } from "./chunk-3SJ43L4W.js";
148
149
  import {
149
- NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE
150
- } from "./chunk-UH3WSE5L.js";
151
- import "./chunk-RECUEJ7B.js";
152
- import "./chunk-7THPNISK.js";
153
- import "./chunk-57OAHC2Y.js";
154
- import "./chunk-GHRSKGHF.js";
155
- import "./chunk-6ZBPS62S.js";
156
- import "./chunk-V6WHFGST.js";
150
+ ndJsonStream
151
+ } from "./chunk-7JURR4JT.js";
157
152
  import {
158
- createLoadedSettingsAdapter
159
- } from "./chunk-DTZY2SH2.js";
153
+ ACP_ROUTE_ID_PREFIX,
154
+ buildAcpModelOptions,
155
+ getCurrentAcpModelId,
156
+ parseAcpBaseModelId,
157
+ parseAcpModelOption,
158
+ resolveAcpModelOption,
159
+ sanitizeProviderBaseUrl
160
+ } from "./chunk-KMQ33DO4.js";
160
161
  import {
161
- ndJsonStream
162
- } from "./chunk-FZPTCQY7.js";
162
+ mapSkillConfigToStatus
163
+ } from "./chunk-2W3OOD4W.js";
163
164
  import {
164
165
  ACP_PREFLIGHT_KINDS,
165
166
  IDLE_HOOK_EVENTS,
@@ -167,23 +168,28 @@ import {
167
168
  SERVE_STATUS_EXT_METHODS,
168
169
  STATUS_SCHEMA_VERSION,
169
170
  mapDomainErrorToErrorKind
170
- } from "./chunk-O4BHWVUD.js";
171
+ } from "./chunk-VIA5XA4U.js";
172
+ import "./chunk-X5XDDSSH.js";
173
+ import "./chunk-4WIZGAH3.js";
174
+ import "./chunk-7ZCNENPP.js";
175
+ import "./chunk-V6WHFGST.js";
176
+ import {
177
+ assembleMcpServers,
178
+ loadMcpApprovals
179
+ } from "./chunk-JVPM2ULZ.js";
180
+ import "./chunk-ZNAUOR2I.js";
171
181
  import "./chunk-2RFKHEXL.js";
172
- import "./chunk-QKTHJXCS.js";
173
- import "./chunk-TJTKSVIV.js";
182
+ import "./chunk-LK7CHLVP.js";
183
+ import "./chunk-JLU636DO.js";
184
+ import "./chunk-BK2UNYWD.js";
174
185
  import "./chunk-M5GB774H.js";
175
- import "./chunk-RV4C2ZFG.js";
176
- import "./chunk-2LI23QA6.js";
177
- import "./chunk-RVLZCXEE.js";
186
+ import "./chunk-RWTEFFPU.js";
178
187
  import {
179
188
  AgentSideConnection,
180
189
  PROTOCOL_VERSION,
181
190
  RequestError
182
191
  } from "./chunk-UDXSXLER.js";
183
- import {
184
- assembleMcpServers,
185
- loadMcpApprovals
186
- } from "./chunk-RKWX4CMO.js";
192
+ import "./chunk-BIQWWWJN.js";
187
193
  import {
188
194
  getOutputLanguageFilePath,
189
195
  getPersistScopeForModelSelection,
@@ -192,39 +198,38 @@ import {
192
198
  resolveOutputLanguageOrPreserveAuto,
193
199
  updateOutputLanguageFile,
194
200
  writeOutputLanguageAndRegisterPath
195
- } from "./chunk-XCXYRDHB.js";
201
+ } from "./chunk-TEHGS6UP.js";
196
202
  import "./chunk-RKUWKYED.js";
203
+ import "./chunk-GOXKNSDZ.js";
204
+ import {
205
+ getSystemDefaultsPath,
206
+ getSystemSettingsPath
207
+ } from "./chunk-IDS7MSUP.js";
197
208
  import {
198
209
  SUPPORTED_LANGUAGES,
199
210
  getCurrentLanguage,
200
211
  setLanguageAsync
201
- } from "./chunk-VRRF3GW5.js";
212
+ } from "./chunk-LKEJ26GS.js";
202
213
  import {
203
214
  findEnvFiles,
204
215
  preResolveHomeEnvOverrides,
205
216
  reloadEnvironment
206
- } from "./chunk-RWV32G2M.js";
207
- import "./chunk-4OWXOUYF.js";
208
- import "./chunk-GOXKNSDZ.js";
209
- import {
210
- getSystemDefaultsPath,
211
- getSystemSettingsPath
212
- } from "./chunk-IDS7MSUP.js";
213
- import "./chunk-QRUIS3DN.js";
214
- import "./chunk-XFSFZCM5.js";
215
- import "./chunk-3EK5ZOUQ.js";
217
+ } from "./chunk-LH2BYDQ5.js";
218
+ import "./chunk-6PEXNQTX.js";
219
+ import "./chunk-YX324OPW.js";
216
220
  import "./chunk-VJNBRRZG.js";
217
221
  import {
218
222
  isFolderTrustEnabled,
219
223
  isWorkspaceTrusted,
220
224
  loadTrustedFolders
221
- } from "./chunk-4PTLZ3NX.js";
225
+ } from "./chunk-Z2BC6UJ5.js";
222
226
  import "./chunk-ALGGS7UH.js";
223
227
  import "./chunk-MR3PXB6E.js";
224
228
  import {
225
229
  writeStderrLine,
226
230
  writeStderrLineSafe
227
231
  } from "./chunk-OWAK7LMW.js";
232
+ import "./chunk-XFSFZCM5.js";
228
233
  import {
229
234
  ALL_PROVIDERS,
230
235
  APPROVAL_MODE_INFO,
@@ -347,62 +352,77 @@ import {
347
352
  updateSetting,
348
353
  validatePlanModeShellApproval,
349
354
  validatePlanModeShellContext
350
- } from "./chunk-OTQ6PSZC.js";
351
- import "./chunk-T4TZQJ7W.js";
355
+ } from "./chunk-PHOF65IG.js";
356
+ import "./chunk-5M6IDOMF.js";
357
+ import "./chunk-TWPJO254.js";
352
358
  import {
353
359
  external_exports
354
360
  } from "./chunk-H6XPXXMH.js";
355
- import "./chunk-5M6IDOMF.js";
356
- import "./chunk-T2L47JJK.js";
357
- import "./chunk-GPSKDNEE.js";
358
- import "./chunk-X6N25LXS.js";
359
- import "./chunk-E2UVIFI2.js";
360
- import "./chunk-T5IO6FZ4.js";
361
- import "./chunk-Q2YKNMLS.js";
362
- import "./chunk-XU457J4V.js";
361
+ import "./chunk-K4XWPEWB.js";
362
+ import "./chunk-TOFQCPDC.js";
363
+ import "./chunk-IRH27ZC2.js";
363
364
  import "./chunk-VDDGDZMA.js";
364
- import "./chunk-KHOVYUHX.js";
365
- import "./chunk-SZRN75WQ.js";
365
+ import "./chunk-FNQ6T3CV.js";
366
+ import "./chunk-ZOIFNCKL.js";
367
+ import "./chunk-PWTZEM3C.js";
368
+ import "./chunk-KRXPRVGL.js";
366
369
  import {
367
370
  parsePositiveIntegerEnv
368
371
  } from "./chunk-6PVPNMXU.js";
372
+ import "./chunk-MZAXJAUM.js";
373
+ import "./chunk-SZRN75WQ.js";
374
+ import "./chunk-HTO4JFDZ.js";
369
375
  import "./chunk-CPBF7KYF.js";
370
- import "./chunk-NABLFI57.js";
371
- import {
372
- HookEventName,
373
- createHookOutput
374
- } from "./chunk-QBUDF33N.js";
375
- import "./chunk-LIZRAKPB.js";
376
376
  import {
377
377
  APPROVAL_MODES,
378
378
  FORK_SUBAGENT_TYPE,
379
379
  getStartupContextLength,
380
380
  isSystemReminderContent,
381
381
  runWithRuntimeContentGenerator
382
- } from "./chunk-WHGVTP7Q.js";
382
+ } from "./chunk-L26JL52R.js";
383
383
  import "./chunk-6AM5D4ME.js";
384
+ import "./chunk-JZA3JUDJ.js";
385
+ import {
386
+ HookEventName,
387
+ createHookOutput
388
+ } from "./chunk-3QMGYBFN.js";
384
389
  import "./chunk-JCW2R7WC.js";
385
- import "./chunk-57FIIFJN.js";
386
- import "./chunk-HTO4JFDZ.js";
390
+ import "./chunk-M5JM7OSF.js";
391
+ import "./chunk-OHNBB4XR.js";
392
+ import "./chunk-E5TUC6CA.js";
387
393
  import {
388
394
  clearCachedCredentialFile,
389
395
  qwenOAuth2Events
390
- } from "./chunk-RCWKCN2Z.js";
396
+ } from "./chunk-EPDRMGT4.js";
391
397
  import "./chunk-JESCGQM3.js";
392
- import "./chunk-QKNXKTZX.js";
393
- import "./chunk-LW2FUYBN.js";
398
+ import "./chunk-NH6KE4JX.js";
399
+ import "./chunk-USTWD7QV.js";
394
400
  import "./chunk-XVNQMZ2I.js";
395
401
  import "./chunk-FODK6UMO.js";
396
402
  import "./chunk-GLNBDYUX.js";
397
403
  import "./chunk-DJ2GSRLV.js";
404
+ import "./chunk-ZJHVAS7M.js";
405
+ import {
406
+ extractDaemonTraceContext,
407
+ registerAcpEventLoopLagGauge,
408
+ startEventLoopLagMonitor,
409
+ withDaemonSpan
410
+ } from "./chunk-NIBLUX3Y.js";
411
+ import "./chunk-BPJSQIJX.js";
412
+ import "./chunk-P3QQPMQA.js";
413
+ import "./chunk-6FGBXPWM.js";
414
+ import {
415
+ getToolCallPreparations
416
+ } from "./chunk-LS77BEZP.js";
398
417
  import {
399
- AuthType,
400
418
  ConversationFinishedEvent,
401
419
  DiscoveredMCPTool,
420
+ INVOCATION_CONTEXT_META_KEY,
402
421
  LoopDetectedEvent,
422
+ PRIVATE_ACP_CAPABILITY_ENV,
423
+ PRIVATE_PARENT_CAPABILITY_META_KEY,
403
424
  PromptSuggestionEvent,
404
425
  UserPromptEvent,
405
- extractDaemonTraceContext,
406
426
  formatFullTurnVisionNotice,
407
427
  formatVisionBridgeNotice,
408
428
  getAllGeminiMdFilenames,
@@ -416,64 +436,66 @@ import {
416
436
  logToolCall,
417
437
  logUserPrompt,
418
438
  normalizeParts,
419
- registerAcpEventLoopLagGauge,
439
+ parseInvocationContext,
420
440
  runSideQuery,
421
441
  runVisionBridge,
442
+ runWithInvocationContext,
422
443
  shouldRunVisionBridge,
423
444
  splitImageParts,
424
- startEventLoopLagMonitor,
425
- uiTelemetryService,
426
- withDaemonSpan
427
- } from "./chunk-ZDP2Y2AL.js";
445
+ uiTelemetryService
446
+ } from "./chunk-CIKQ7KKO.js";
428
447
  import "./chunk-VGC4I5JJ.js";
429
448
  import {
430
449
  getAutoMemoryRoot,
431
450
  getUserAutoMemoryRoot
432
- } from "./chunk-4K56OJFJ.js";
451
+ } from "./chunk-MUP3T3AD.js";
433
452
  import {
434
- DEFAULT_TOKEN_LIMIT,
435
- getToolCallPreparations,
436
- tokenLimit
437
- } from "./chunk-CBOQ3HY7.js";
453
+ AuthType
454
+ } from "./chunk-IKCX4CCL.js";
455
+ import "./chunk-46UV252V.js";
438
456
  import "./chunk-A4UCTEB5.js";
439
457
  import "./chunk-XWRJCPHC.js";
440
- import "./chunk-QNLNLENL.js";
441
- import "./chunk-6X4GWOPW.js";
442
- import "./chunk-TYQMGACW.js";
443
- import "./chunk-TYAMGABM.js";
444
- import "./chunk-FCMNKVXT.js";
458
+ import {
459
+ DEFAULT_TOKEN_LIMIT,
460
+ tokenLimit
461
+ } from "./chunk-UW5EOVUN.js";
462
+ import "./chunk-2JZBVYTU.js";
463
+ import "./chunk-5I2IWRSH.js";
464
+ import "./chunk-A5L3JMUA.js";
445
465
  import {
446
466
  endToolExecutionSpan,
447
467
  endToolSpan,
468
+ initializeTelemetry,
448
469
  runInToolSpanContext,
449
470
  startToolExecutionSpan,
450
471
  startToolSpan,
451
472
  withInteractionSpan
452
- } from "./chunk-7362QS5B.js";
473
+ } from "./chunk-MB4MZHMJ.js";
453
474
  import "./chunk-HTR4WV6U.js";
454
- import "./chunk-M7WBGLYP.js";
475
+ import "./chunk-BULDBTYC.js";
455
476
  import "./chunk-U7ZFW55U.js";
456
- import "./chunk-NPQDJGKU.js";
477
+ import "./chunk-UUUTRMI2.js";
457
478
  import {
458
479
  ToolConfirmationOutcome,
459
480
  ToolNames,
460
481
  isShellProgressData
461
- } from "./chunk-YM3SZTH4.js";
482
+ } from "./chunk-PR75REBZ.js";
462
483
  import {
463
484
  Storage,
464
485
  createDebugLogger,
465
486
  getErrorMessage,
466
487
  getErrorStatus,
467
488
  isSubpath
468
- } from "./chunk-OQB4EXO4.js";
469
- import "./chunk-EZPB6S2I.js";
489
+ } from "./chunk-NL7LTRLR.js";
490
+ import "./chunk-QAF7NMK7.js";
470
491
  import {
471
492
  runExitCleanup
472
- } from "./chunk-5NJTNQUW.js";
493
+ } from "./chunk-PWVFN2LF.js";
473
494
  import "./chunk-75DOP5OR.js";
474
495
  import "./chunk-DMTGGOSA.js";
475
496
  import "./chunk-YQ3U5MUC.js";
476
- import "./chunk-THJNPLI4.js";
497
+ import "./chunk-AMDSOFFV.js";
498
+ import "./chunk-TARRHLLG.js";
477
499
  import {
478
500
  init_esbuild_shims
479
501
  } from "./chunk-5O2XNYP6.js";
@@ -483,7 +505,7 @@ import {
483
505
 
484
506
  // packages/cli/src/acp-integration/acpAgent.ts
485
507
  init_esbuild_shims();
486
- import { randomUUID as randomUUID2 } from "node:crypto";
508
+ import { randomUUID as randomUUID2, timingSafeEqual } from "node:crypto";
487
509
  import { performance } from "node:perf_hooks";
488
510
 
489
511
  // packages/cli/src/acp-integration/authMethods.ts
@@ -2208,6 +2230,43 @@ var MidTurnDrainTimeoutError = class extends Error {
2208
2230
  );
2209
2231
  }
2210
2232
  };
2233
+ function beginChannelDeliveryResponseBlock(capture) {
2234
+ if (!capture) return void 0;
2235
+ capture.finalText = "";
2236
+ return [];
2237
+ }
2238
+ __name(beginChannelDeliveryResponseBlock, "beginChannelDeliveryResponseBlock");
2239
+ function commitChannelDeliveryResponseBlock(capture, responseBlock, hasFunctionCalls) {
2240
+ if (capture && responseBlock && !hasFunctionCalls) {
2241
+ capture.finalText = responseBlock.join("");
2242
+ }
2243
+ }
2244
+ __name(commitChannelDeliveryResponseBlock, "commitChannelDeliveryResponseBlock");
2245
+ function parsePromptChannelDelivery(params) {
2246
+ const meta = params._meta;
2247
+ const value = meta?.[DAEMON_CHANNEL_DELIVERY_META_KEY];
2248
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
2249
+ return void 0;
2250
+ }
2251
+ const delivery = value;
2252
+ const target = delivery["target"];
2253
+ if (typeof delivery["deliveryId"] !== "string" || delivery["deliveryId"].length === 0 || typeof target !== "object" || target === null || Array.isArray(target)) {
2254
+ return void 0;
2255
+ }
2256
+ const targetRecord = target;
2257
+ if (typeof targetRecord["channelName"] !== "string" || targetRecord["channelName"].length === 0 || targetRecord["type"] !== "user" && targetRecord["type"] !== "chat" || typeof targetRecord["id"] !== "string" || targetRecord["id"].length === 0) {
2258
+ return void 0;
2259
+ }
2260
+ return {
2261
+ deliveryId: delivery["deliveryId"],
2262
+ target: {
2263
+ channelName: targetRecord["channelName"],
2264
+ type: targetRecord["type"],
2265
+ id: targetRecord["id"]
2266
+ }
2267
+ };
2268
+ }
2269
+ __name(parsePromptChannelDelivery, "parsePromptChannelDelivery");
2211
2270
  var MAX_NOTIFICATION_QUEUE = 20;
2212
2271
  var MAX_DEFERRED_UNRELATED_CRON_QUEUE = 20;
2213
2272
  function isExistingFile(resolved, fileExists = existsSync2, statFile = statSync2) {
@@ -2543,6 +2602,8 @@ var Session = class {
2543
2602
  * that produces this string.
2544
2603
  */
2545
2604
  pendingWorktreeNotice = null;
2605
+ /** One-shot model notice for background agents restored with the session. */
2606
+ pendingRecoveredAgentsNotice = null;
2546
2607
  // Implement SessionContext interface
2547
2608
  sessionId;
2548
2609
  #prepareTodoStopGuardForPrompt(params) {
@@ -2884,6 +2945,7 @@ var Session = class {
2884
2945
  if (this.config.isCronEnabled()) {
2885
2946
  this.#stopCronSchedulerInRuntime();
2886
2947
  }
2948
+ this.config.getBackgroundTaskRegistry().abortAll({ notify: false });
2887
2949
  this.config.getBackgroundTaskRegistry().setNotificationCallback(void 0);
2888
2950
  this.config.getMonitorRegistry().setNotificationCallback(void 0);
2889
2951
  this.config.getBackgroundShellRegistry().setNotificationCallback(void 0);
@@ -3103,15 +3165,31 @@ var Session = class {
3103
3165
  }
3104
3166
  }
3105
3167
  }
3106
- async prompt(params) {
3168
+ async prompt(params, invocationContext, admissionCancellation) {
3107
3169
  if (this.closing) {
3108
3170
  throw RequestError.invalidParams(void 0, "Session is closing");
3109
3171
  }
3110
3172
  await this.assertCanStartTurn();
3173
+ if (admissionCancellation?.aborted) {
3174
+ return { stopReason: "cancelled" };
3175
+ }
3111
3176
  const todoStopGuardPreparation = this.#prepareTodoStopGuardForPrompt(params);
3112
3177
  this.pendingPrompt?.abort();
3113
3178
  const pendingSend = new AbortController();
3179
+ const cancelPendingSend = /* @__PURE__ */ __name(() => pendingSend.abort(USER_CANCEL_ABORT_REASON), "cancelPendingSend");
3180
+ if (admissionCancellation) {
3181
+ admissionCancellation.addEventListener("abort", cancelPendingSend, {
3182
+ once: true
3183
+ });
3184
+ if (admissionCancellation.aborted) cancelPendingSend();
3185
+ }
3114
3186
  this.pendingPrompt = pendingSend;
3187
+ const releasePendingSend = /* @__PURE__ */ __name(() => {
3188
+ admissionCancellation?.removeEventListener("abort", cancelPendingSend);
3189
+ if (this.pendingPrompt === pendingSend) {
3190
+ this.pendingPrompt = null;
3191
+ }
3192
+ }, "releasePendingSend");
3115
3193
  if (this.followupAbort) {
3116
3194
  this.followupAbort.abort();
3117
3195
  this.followupAbort = null;
@@ -3148,6 +3226,8 @@ var Session = class {
3148
3226
  }
3149
3227
  }
3150
3228
  if (pendingSend.signal.aborted) {
3229
+ releasePendingSend();
3230
+ this.todoStopGuard.suspend();
3151
3231
  return { stopReason: "cancelled" };
3152
3232
  }
3153
3233
  if (todoStopGuardPreparation.startsWorkChain) {
@@ -3156,16 +3236,35 @@ var Session = class {
3156
3236
  this.todoStopGuardBackgroundBaseline = this.#captureTodoStopGuardBackgroundBaseline();
3157
3237
  }
3158
3238
  this.duplicateProviderToolCallResponseIds.clear();
3239
+ const channelDelivery = parsePromptChannelDelivery(params);
3240
+ const channelDeliveryCapture = channelDelivery ? { finalText: "" } : void 0;
3159
3241
  let resolveCompletion;
3160
3242
  this.pendingPromptCompletion = new Promise((resolve5) => {
3161
3243
  resolveCompletion = resolve5;
3162
3244
  });
3163
3245
  try {
3164
- const result = await this.#executePrompt(params, pendingSend);
3165
- this.pendingPrompt = null;
3246
+ const result = await this.#executePrompt(
3247
+ params,
3248
+ pendingSend,
3249
+ channelDeliveryCapture,
3250
+ invocationContext
3251
+ );
3252
+ releasePendingSend();
3166
3253
  void this.#drainCronQueue();
3167
3254
  void this.#drainNotificationQueue();
3168
3255
  this.#maybeEmitFollowupSuggestion(result);
3256
+ if (channelDelivery && result.stopReason === "end_turn") {
3257
+ this.#scheduleChannelDelivery({
3258
+ sessionId: this.sessionId,
3259
+ deliveryId: channelDelivery.deliveryId,
3260
+ source: "prompt",
3261
+ target: channelDelivery.target,
3262
+ text: normalizeChannelDeliveryText(
3263
+ channelDeliveryCapture?.finalText ?? ""
3264
+ ),
3265
+ promptId: channelDelivery.deliveryId
3266
+ });
3267
+ }
3169
3268
  return result;
3170
3269
  } catch (error) {
3171
3270
  if (error instanceof SessionWriterError) {
@@ -3175,7 +3274,7 @@ var Session = class {
3175
3274
  }
3176
3275
  throw error;
3177
3276
  } finally {
3178
- this.pendingPrompt = null;
3277
+ releasePendingSend();
3179
3278
  const shouldDrainAutomaticQueues = todoStopGuardPreparation.drainSupersededAutomaticQueues || this.todoStopGuardDrainAutomaticQueuesWhenIdle || this.todoStopGuard.blocksUnrelatedAutomaticTurns || this.todoStopGuard.hasCommittedContinuation || this.todoStopGuardQueuedPromptPriority;
3180
3279
  this.todoStopGuardDrainAutomaticQueuesWhenIdle = false;
3181
3280
  if (shouldDrainAutomaticQueues) {
@@ -3305,13 +3404,23 @@ var Session = class {
3305
3404
  }
3306
3405
  })();
3307
3406
  }
3308
- async #executePrompt(params, pendingSend) {
3309
- return sessionIdContext.run(
3310
- this.config.getSessionId(),
3311
- () => this.#executePromptInner(params, pendingSend)
3407
+ async #executePrompt(params, pendingSend, channelDeliveryCapture, invocationContext) {
3408
+ const sessionId = this.config.getSessionId();
3409
+ if (invocationContext !== void 0 && invocationContext.sessionId !== sessionId) {
3410
+ throw RequestError.invalidParams(
3411
+ void 0,
3412
+ "Invocation context session does not match the active session"
3413
+ );
3414
+ }
3415
+ return runWithInvocationContext(
3416
+ invocationContext,
3417
+ () => sessionIdContext.run(
3418
+ sessionId,
3419
+ () => this.#executePromptInner(params, pendingSend, channelDeliveryCapture)
3420
+ )
3312
3421
  );
3313
3422
  }
3314
- async #executePromptInner(params, pendingSend) {
3423
+ async #executePromptInner(params, pendingSend, channelDeliveryCapture) {
3315
3424
  return Storage.runWithRuntimeBaseDir(
3316
3425
  this.runtimeBaseDir,
3317
3426
  this.config.getWorkingDir(),
@@ -3383,6 +3492,7 @@ var Session = class {
3383
3492
  (block) => block.type === "text"
3384
3493
  );
3385
3494
  const inputText = firstTextBlock?.text || "";
3495
+ const isSlashInput = !isContinue && isSlashCommand(inputText);
3386
3496
  let parts;
3387
3497
  let fullTurnModelOverride;
3388
3498
  const onFullTurnModel = /* @__PURE__ */ __name((model) => {
@@ -3394,7 +3504,7 @@ var Session = class {
3394
3504
  }, "onFullTurnModel");
3395
3505
  if (isContinue) {
3396
3506
  parts = continuationParts;
3397
- } else if (isSlashCommand(inputText)) {
3507
+ } else if (isSlashInput) {
3398
3508
  const slashCommandResult = await handleSlashCommand(
3399
3509
  inputText,
3400
3510
  pendingSend,
@@ -3478,6 +3588,17 @@ ${this.pendingWorktreeNotice}
3478
3588
  parts = insertAfterFunctionResponses(parts, [noticePart]);
3479
3589
  this.pendingWorktreeNotice = null;
3480
3590
  }
3591
+ if (this.pendingRecoveredAgentsNotice && !isContinue && !isSlashInput) {
3592
+ const noticePart = {
3593
+ text: `<system-reminder>
3594
+ ${this.pendingRecoveredAgentsNotice}
3595
+ </system-reminder>
3596
+
3597
+ `
3598
+ };
3599
+ parts = insertAfterFunctionResponses(parts, [noticePart]);
3600
+ this.pendingRecoveredAgentsNotice = null;
3601
+ }
3481
3602
  let nextMessage = { role: "user", parts };
3482
3603
  let turnCount = 0;
3483
3604
  const toolLoopState = createDaemonToolLoopState();
@@ -3498,6 +3619,7 @@ ${this.pendingWorktreeNotice}
3498
3619
  const messageDisplay = this.#createMessageDisplayDispatcher(
3499
3620
  pendingSend.signal
3500
3621
  );
3622
+ let channelDeliveryResponseBlock;
3501
3623
  try {
3502
3624
  const sendResult = await this.#sendMessageStreamWithAutoCompression(
3503
3625
  promptId,
@@ -3515,6 +3637,8 @@ ${this.pendingWorktreeNotice}
3515
3637
  }
3516
3638
  const responseStream = sendResult.responseStream;
3517
3639
  nextMessage = null;
3640
+ channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(channelDeliveryCapture);
3641
+ const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
3518
3642
  let streamFailed = false;
3519
3643
  try {
3520
3644
  for await (const resp of responseStream) {
@@ -3534,6 +3658,7 @@ ${this.pendingWorktreeNotice}
3534
3658
  part.thought
3535
3659
  );
3536
3660
  if (!part.thought) {
3661
+ channelDeliveryResponseBlock?.push(part.text);
3537
3662
  messageDisplay?.addChunk(part.text);
3538
3663
  }
3539
3664
  }
@@ -3549,6 +3674,11 @@ ${this.pendingWorktreeNotice}
3549
3674
  }
3550
3675
  }
3551
3676
  if (resp.type === "retry" /* RETRY */ || resp.type === "model_fallback" /* MODEL_FALLBACK */) {
3677
+ if (resp.type === "model_fallback" /* MODEL_FALLBACK */ || !resp.isContinuation) {
3678
+ if (channelDeliveryResponseBlock) {
3679
+ channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
3680
+ }
3681
+ }
3552
3682
  await finalizeToolCallPreparations(
3553
3683
  preparationTracker,
3554
3684
  true,
@@ -3602,6 +3732,11 @@ ${this.pendingWorktreeNotice}
3602
3732
  } finally {
3603
3733
  await messageDisplay?.finish();
3604
3734
  }
3735
+ commitChannelDeliveryResponseBlock(
3736
+ channelDeliveryCapture,
3737
+ channelDeliveryResponseBlock,
3738
+ functionCalls.length > 0
3739
+ );
3605
3740
  if (usageMetadata) {
3606
3741
  this.#recordPromptTokenCount(usageMetadata);
3607
3742
  if (this.messageRewriter) {
@@ -3665,7 +3800,8 @@ ${this.pendingWorktreeNotice}
3665
3800
  hooksEnabled,
3666
3801
  messageBus,
3667
3802
  true,
3668
- fullTurnModelOverride
3803
+ fullTurnModelOverride,
3804
+ channelDeliveryCapture
3669
3805
  );
3670
3806
  } finally {
3671
3807
  logConversationFinishedEvent(
@@ -3682,7 +3818,7 @@ ${this.pendingWorktreeNotice}
3682
3818
  }
3683
3819
  );
3684
3820
  }
3685
- async #handleStopHookLoop(pendingSend, promptId, hooksEnabled, messageBus, allowExternalHooks = true, modelOverride) {
3821
+ async #handleStopHookLoop(pendingSend, promptId, hooksEnabled, messageBus, allowExternalHooks = true, modelOverride, channelDeliveryCapture) {
3686
3822
  const stopHookBlockingCap = this.config.getStopHookBlockingCap();
3687
3823
  let stopHookIterationCount = 0;
3688
3824
  let stopHookReasons = [];
@@ -3724,7 +3860,8 @@ ${this.pendingWorktreeNotice}
3724
3860
  false,
3725
3861
  {
3726
3862
  onFullTurnModel,
3727
- getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride")
3863
+ getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride"),
3864
+ channelDeliveryCapture
3728
3865
  }
3729
3866
  );
3730
3867
  if (continuation2.kind === "terminal") {
@@ -3786,7 +3923,8 @@ ${this.pendingWorktreeNotice}
3786
3923
  false,
3787
3924
  {
3788
3925
  onFullTurnModel,
3789
- getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride")
3926
+ getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride"),
3927
+ channelDeliveryCapture
3790
3928
  }
3791
3929
  );
3792
3930
  if (continuation2.kind === "terminal") {
@@ -3867,7 +4005,8 @@ ${this.pendingWorktreeNotice}
3867
4005
  ), "onAutomaticContinuationValidated")
3868
4006
  } : {},
3869
4007
  onFullTurnModel,
3870
- getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride")
4008
+ getModelOverride: /* @__PURE__ */ __name(() => modelOverride, "getModelOverride"),
4009
+ channelDeliveryCapture
3871
4010
  }
3872
4011
  );
3873
4012
  if (continuation.supersededAutomaticContinuation && externalReason) {
@@ -3910,6 +4049,7 @@ ${this.pendingWorktreeNotice}
3910
4049
  const messageDisplay = this.#createMessageDisplayDispatcher(
3911
4050
  pendingSend.signal
3912
4051
  );
4052
+ let channelDeliveryResponseBlock;
3913
4053
  try {
3914
4054
  const sendResult = await this.#sendMessageStreamWithAutoCompression(
3915
4055
  promptIdForSend,
@@ -4041,6 +4181,10 @@ ${this.pendingWorktreeNotice}
4041
4181
  }
4042
4182
  const responseStream = sendResult.responseStream;
4043
4183
  nextMessage = null;
4184
+ channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(
4185
+ options.channelDeliveryCapture
4186
+ );
4187
+ const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
4044
4188
  initialSend = false;
4045
4189
  if (guardForThisSend) {
4046
4190
  const guardCommitted = this.todoStopGuard.commitContinuation(
@@ -4071,7 +4215,10 @@ ${this.pendingWorktreeNotice}
4071
4215
  "assistant",
4072
4216
  part.thought
4073
4217
  );
4074
- if (!part.thought) messageDisplay?.addChunk(part.text);
4218
+ if (!part.thought) {
4219
+ channelDeliveryResponseBlock?.push(part.text);
4220
+ messageDisplay?.addChunk(part.text);
4221
+ }
4075
4222
  }
4076
4223
  }
4077
4224
  if (response.type === "chunk" /* CHUNK */ && response.value.usageMetadata) {
@@ -4085,6 +4232,11 @@ ${this.pendingWorktreeNotice}
4085
4232
  }
4086
4233
  }
4087
4234
  if (response.type === "retry" /* RETRY */ || response.type === "model_fallback" /* MODEL_FALLBACK */) {
4235
+ if (response.type === "model_fallback" /* MODEL_FALLBACK */ || !response.isContinuation) {
4236
+ if (channelDeliveryResponseBlock) {
4237
+ channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
4238
+ }
4239
+ }
4088
4240
  await finalizeToolCallPreparations(
4089
4241
  preparationTracker,
4090
4242
  true,
@@ -4123,6 +4275,11 @@ ${this.pendingWorktreeNotice}
4123
4275
  await messageDisplay?.finish();
4124
4276
  }
4125
4277
  }
4278
+ commitChannelDeliveryResponseBlock(
4279
+ options.channelDeliveryCapture,
4280
+ channelDeliveryResponseBlock,
4281
+ functionCalls.length > 0
4282
+ );
4126
4283
  if (usageMetadata) {
4127
4284
  this.#recordPromptTokenCount(usageMetadata);
4128
4285
  const durationMs = Date.now() - streamStartTime;
@@ -4242,6 +4399,19 @@ ${this.pendingWorktreeNotice}
4242
4399
  };
4243
4400
  await this.client.sessionUpdate(params);
4244
4401
  }
4402
+ #scheduleChannelDelivery(params) {
4403
+ const timer = setTimeout(() => {
4404
+ void this.client.extMethod(SERVE_CONTROL_EXT_METHODS.channelDelivery, params).catch((error) => {
4405
+ try {
4406
+ debugLogger6.warn(
4407
+ `Channel delivery submission failed: ${error instanceof Error ? error.message : String(error)}`
4408
+ );
4409
+ } catch {
4410
+ }
4411
+ });
4412
+ }, 0);
4413
+ timer.unref();
4414
+ }
4245
4415
  #getCurrentChat() {
4246
4416
  return this.config.getGeminiClient().getChat();
4247
4417
  }
@@ -4689,7 +4859,9 @@ ${this.pendingWorktreeNotice}
4689
4859
  this.#enqueueCronPrompt({
4690
4860
  prompt: job.prompt,
4691
4861
  source: job.cronExpr === "@wakeup" ? "loop" : "cron",
4692
- ...job.id ? { taskId: job.id } : {}
4862
+ ...job.id ? { taskId: job.id } : {},
4863
+ ...job.lastFiredAt !== void 0 ? { firedAt: job.lastFiredAt } : {},
4864
+ ...job.delivery ? { delivery: job.delivery } : {}
4693
4865
  });
4694
4866
  void this.#drainCronQueue();
4695
4867
  });
@@ -4816,9 +4988,12 @@ ${this.pendingWorktreeNotice}
4816
4988
  * `_meta.source='cron'`, streams the model response, and handles tool calls.
4817
4989
  */
4818
4990
  async #executeCronPrompt(item) {
4819
- return sessionIdContext.run(
4820
- this.config.getSessionId(),
4821
- () => this.#executeCronPromptInner(item)
4991
+ return runWithInvocationContext(
4992
+ void 0,
4993
+ () => sessionIdContext.run(
4994
+ this.config.getSessionId(),
4995
+ () => this.#executeCronPromptInner(item)
4996
+ )
4822
4997
  );
4823
4998
  }
4824
4999
  async #executeCronPromptInner(item) {
@@ -4834,6 +5009,8 @@ ${this.pendingWorktreeNotice}
4834
5009
  );
4835
5010
  const promptId = this.config.getSessionId() + "########cron" + Date.now();
4836
5011
  let cronHadError = false;
5012
+ let cronCompleted = false;
5013
+ const channelDeliveryCapture = item.delivery ? { finalText: "" } : void 0;
4837
5014
  await withInteractionSpan(
4838
5015
  this.config,
4839
5016
  {
@@ -4934,6 +5111,8 @@ ${this.pendingWorktreeNotice}
4934
5111
  return;
4935
5112
  }
4936
5113
  const responseStream = sendResult.responseStream;
5114
+ const channelDeliveryResponseBlock = beginChannelDeliveryResponseBlock(channelDeliveryCapture);
5115
+ const channelDeliveryCheckpoint = channelDeliveryResponseBlock?.length ?? 0;
4937
5116
  if (loopTick && turnCount === 1) {
4938
5117
  this.loopTickResolver?.markDelivered();
4939
5118
  }
@@ -4958,6 +5137,7 @@ ${this.pendingWorktreeNotice}
4958
5137
  part.thought
4959
5138
  );
4960
5139
  if (!part.thought) {
5140
+ channelDeliveryResponseBlock?.push(part.text);
4961
5141
  messageDisplay?.addChunk(part.text);
4962
5142
  }
4963
5143
  }
@@ -4973,6 +5153,11 @@ ${this.pendingWorktreeNotice}
4973
5153
  }
4974
5154
  }
4975
5155
  if (resp.type === "retry" /* RETRY */ || resp.type === "model_fallback" /* MODEL_FALLBACK */) {
5156
+ if (resp.type === "model_fallback" /* MODEL_FALLBACK */ || !resp.isContinuation) {
5157
+ if (channelDeliveryResponseBlock) {
5158
+ channelDeliveryResponseBlock.length = channelDeliveryCheckpoint;
5159
+ }
5160
+ }
4976
5161
  await finalizeToolCallPreparations(
4977
5162
  preparationTracker,
4978
5163
  true,
@@ -4995,6 +5180,11 @@ ${this.pendingWorktreeNotice}
4995
5180
  await messageDisplay?.finish();
4996
5181
  }
4997
5182
  }
5183
+ commitChannelDeliveryResponseBlock(
5184
+ channelDeliveryCapture,
5185
+ channelDeliveryResponseBlock,
5186
+ functionCalls.length > 0
5187
+ );
4998
5188
  if (usageMetadata) {
4999
5189
  this.#recordPromptTokenCount(usageMetadata);
5000
5190
  if (this.messageRewriter) {
@@ -5031,18 +5221,23 @@ ${this.pendingWorktreeNotice}
5031
5221
  }
5032
5222
  }
5033
5223
  }
5224
+ let stopReason = "end_turn";
5034
5225
  if (this.todoStopGuard.needsStopInspection) {
5035
5226
  const guardStop = await this.#handleStopHookLoop(
5036
5227
  ac,
5037
5228
  promptId,
5038
5229
  false,
5039
5230
  void 0,
5040
- false
5231
+ false,
5232
+ void 0,
5233
+ channelDeliveryCapture
5041
5234
  );
5235
+ stopReason = guardStop.stopReason;
5042
5236
  if (guardStop.stopReason === "max_tokens") {
5043
5237
  this.#stopCronAfterTokenLimit();
5044
5238
  }
5045
5239
  }
5240
+ cronCompleted = stopReason === "end_turn" && !ac.signal.aborted;
5046
5241
  } catch (error) {
5047
5242
  if (ac.signal.aborted) {
5048
5243
  this.todoStopGuard.suspend();
@@ -5070,6 +5265,19 @@ ${this.pendingWorktreeNotice}
5070
5265
  },
5071
5266
  () => ac.signal.aborted ? "cancelled" : cronHadError ? "error" : "ok"
5072
5267
  );
5268
+ if (cronCompleted && item.delivery && item.taskId && item.firedAt !== void 0) {
5269
+ this.#scheduleChannelDelivery({
5270
+ sessionId: this.sessionId,
5271
+ deliveryId: `${item.taskId}:${item.firedAt}`,
5272
+ source: "scheduled",
5273
+ target: item.delivery.target,
5274
+ text: normalizeChannelDeliveryText(
5275
+ channelDeliveryCapture?.finalText ?? ""
5276
+ ),
5277
+ taskId: item.taskId,
5278
+ firedAt: item.firedAt
5279
+ });
5280
+ }
5073
5281
  }
5074
5282
  );
5075
5283
  }
@@ -5209,9 +5417,12 @@ ${this.pendingWorktreeNotice}
5209
5417
  if (nextIndex < 0) break;
5210
5418
  const [item] = this.notificationQueue.splice(nextIndex, 1);
5211
5419
  if (!item) break;
5212
- await sessionIdContext.run(
5213
- this.config.getSessionId(),
5214
- () => this.#executeBackgroundNotificationPromptInner(item)
5420
+ await runWithInvocationContext(
5421
+ void 0,
5422
+ () => sessionIdContext.run(
5423
+ this.config.getSessionId(),
5424
+ () => this.#executeBackgroundNotificationPromptInner(item)
5425
+ )
5215
5426
  );
5216
5427
  }
5217
5428
  } finally {
@@ -6308,6 +6519,7 @@ ${this.pendingWorktreeNotice}
6308
6519
  const originalPolicyRequestArgs = policyToolName === ToolNames.SHELL || policyToolName === ToolNames.MONITOR ? structuredClone(args) : args;
6309
6520
  const toolSpan = startToolSpan(policyToolName, {
6310
6521
  "tool.call_id": callId,
6522
+ "gen_ai.tool.call.id": getProviderToolCallId(fc) ?? callId,
6311
6523
  // Dual-emit the legacy call_id/tool_name aliases like CoreToolScheduler
6312
6524
  // (coreToolScheduler.ts) so pre-Phase-2 dashboards keyed off call_id keep
6313
6525
  // matching daemon/ACP tool spans during the migration window.
@@ -7690,7 +7902,8 @@ function serializeAgentTask(entry, now) {
7690
7902
  at: a.at
7691
7903
  }))
7692
7904
  } : {},
7693
- ...optionalField("prompt", entry.prompt)
7905
+ ...optionalField("prompt", entry.prompt),
7906
+ ...optionalField("toolUseId", entry.toolUseId)
7694
7907
  };
7695
7908
  }
7696
7909
  __name(serializeAgentTask, "serializeAgentTask");
@@ -9398,7 +9611,9 @@ async function deliverClientMcpMessage(connection, serverName, message, sessionI
9398
9611
  return payload;
9399
9612
  }
9400
9613
  __name(deliverClientMcpMessage, "deliverClientMcpMessage");
9401
- async function runAcpAgent(config, settings, argv) {
9614
+ async function runAcpAgent(config, settings, argv, options) {
9615
+ const privateParentCapability = options === void 0 ? process.env[PRIVATE_ACP_CAPABILITY_ENV] : options.privateParentCapability;
9616
+ delete process.env[PRIVATE_ACP_CAPABILITY_ENV];
9402
9617
  let acpConnection;
9403
9618
  const bootstrapClientMcpSender = /* @__PURE__ */ __name((serverName, message) => deliverClientMcpMessage(acpConnection, serverName, message), "bootstrapClientMcpSender");
9404
9619
  beginAcpBootstrapConfigProfiling();
@@ -9435,10 +9650,33 @@ async function runAcpAgent(config, settings, argv) {
9435
9650
  console.log = console.error;
9436
9651
  console.info = console.error;
9437
9652
  console.debug = console.error;
9438
- const stream = ndJsonStream(stdout, stdin);
9653
+ let initializeRequestId;
9654
+ const stream = ndJsonStream(stdout, stdin, {
9655
+ onMessageObserved: /* @__PURE__ */ __name(({ direction, message }) => {
9656
+ if (direction === "received" && "id" in message && "method" in message && message.method === "initialize") {
9657
+ initializeRequestId = message.id;
9658
+ return;
9659
+ }
9660
+ if (direction !== "sent" || initializeRequestId === void 0 || !("id" in message) || "method" in message || message.id !== initializeRequestId) {
9661
+ return;
9662
+ }
9663
+ initializeRequestId = void 0;
9664
+ if ("result" in message) {
9665
+ void initializeTelemetry(config).then(() => {
9666
+ registerAcpEventLoopLagGauge(() => eventLoopMonitor.snapshot());
9667
+ });
9668
+ }
9669
+ }, "onMessageObserved")
9670
+ });
9439
9671
  connection = new AgentSideConnection((conn) => {
9440
9672
  acpConnection = conn;
9441
- agentInstance = new QwenAgent(config, settings, argv, conn);
9673
+ agentInstance = new QwenAgent(
9674
+ config,
9675
+ settings,
9676
+ argv,
9677
+ conn,
9678
+ privateParentCapability
9679
+ );
9442
9680
  return agentInstance;
9443
9681
  }, stream);
9444
9682
  markAcpStartup("transportSetupEnd");
@@ -9446,7 +9684,6 @@ async function runAcpAgent(config, settings, argv) {
9446
9684
  eventLoopMonitor.dispose();
9447
9685
  throw err;
9448
9686
  }
9449
- registerAcpEventLoopLagGauge(() => eventLoopMonitor.snapshot());
9450
9687
  const drainPoolBeforeExit = /* @__PURE__ */ __name(async (label) => {
9451
9688
  if (!agentInstance) return;
9452
9689
  try {
@@ -9635,11 +9872,12 @@ function parseAcpSessionListCursor(value) {
9635
9872
  }
9636
9873
  __name(parseAcpSessionListCursor, "parseAcpSessionListCursor");
9637
9874
  var QwenAgent = class {
9638
- constructor(config, settings, argv, connection) {
9875
+ constructor(config, settings, argv, connection, expectedPrivateParentCapability) {
9639
9876
  this.config = config;
9640
9877
  this.settings = settings;
9641
9878
  this.argv = argv;
9642
9879
  this.connection = connection;
9880
+ this.expectedPrivateParentCapability = expectedPrivateParentCapability;
9643
9881
  if (process.env["QWEN_SERVE_NO_MCP_POOL"] === "1") {
9644
9882
  this.mcpPool = void 0;
9645
9883
  this.workspaceMcpBudget = void 0;
@@ -9670,15 +9908,18 @@ var QwenAgent = class {
9670
9908
  __name(this, "QwenAgent");
9671
9909
  }
9672
9910
  sessions = /* @__PURE__ */ new Map();
9911
+ activePromptCalls = /* @__PURE__ */ new Map();
9673
9912
  workspaceMcpDiscoveryConfig;
9674
9913
  workspaceMcpDiscoveryPromise;
9675
9914
  workspaceMcpDiscoveryError;
9676
9915
  pendingMcpAuthentications = /* @__PURE__ */ new Map();
9677
9916
  mcpAuthenticationResults = /* @__PURE__ */ new Map();
9678
9917
  generationControllers = /* @__PURE__ */ new Map();
9918
+ workspaceGenerationControllers = /* @__PURE__ */ new Map();
9679
9919
  transcriptReplayConfigCache = /* @__PURE__ */ new Map();
9680
9920
  pendingConfigCleanup = /* @__PURE__ */ new Map();
9681
9921
  clientCapabilities;
9922
+ privateParentState = "uninitialized";
9682
9923
  // CPU-usage delta baseline for the daemon's `workspaceResource` extMethod
9683
9924
  // (Daemon Status child-resource chart). The daemon polls this at a fixed
9684
9925
  // cadence, so successive calls form a clean delta window independent of tool
@@ -9839,7 +10080,7 @@ var QwenAgent = class {
9839
10080
  await this.createWorkspaceMcpDiscoveryConfig(settings);
9840
10081
  });
9841
10082
  }
9842
- reloadWorkspaceMcpDiscovery() {
10083
+ reloadWorkspaceMcpDiscovery(options = {}) {
9843
10084
  return this.enqueueWorkspaceMcpDiscovery("reload", async () => {
9844
10085
  const settings = loadSettings(this.config.getTargetDir());
9845
10086
  const discoveryConfig = this.workspaceMcpDiscoveryConfig;
@@ -9885,8 +10126,62 @@ var QwenAgent = class {
9885
10126
  "Failed to synchronize MCP settings with live sessions"
9886
10127
  );
9887
10128
  }
10129
+ if (options.forceReconnectAll === true || options.forceReconnectWhich !== void 0) {
10130
+ await this.forceReconnectWorkspaceMcp(options.forceReconnectWhich);
10131
+ }
9888
10132
  });
9889
10133
  }
10134
+ async forceReconnectWorkspaceMcp(requestedServerNames) {
10135
+ const serverNames = /* @__PURE__ */ new Set();
10136
+ for (const config of [
10137
+ this.workspaceMcpDiscoveryConfig,
10138
+ this.config,
10139
+ ...this.getActiveSessions().map((session) => session.getConfig())
10140
+ ]) {
10141
+ for (const name of Object.keys(config?.getMcpServers() ?? {})) {
10142
+ serverNames.add(name);
10143
+ }
10144
+ }
10145
+ const selectedServerNames = requestedServerNames ? [...new Set(requestedServerNames)].filter(
10146
+ (name) => serverNames.has(name)
10147
+ ) : [...serverNames];
10148
+ const errors = [];
10149
+ for (const serverName of selectedServerNames) {
10150
+ try {
10151
+ const poolHasEntries = (this.mcpPool?.getSnapshot().byName[serverName]?.entryCount ?? 0) > 0;
10152
+ if (this.mcpPool && poolHasEntries) {
10153
+ const results = await this.mcpPool.restartByName(serverName);
10154
+ const failed = results.find((result) => !result.restarted);
10155
+ if (failed) {
10156
+ throw new Error(
10157
+ `MCP server ${JSON.stringify(serverName)} failed to reconnect: ${failed.reason ?? "unknown error"}`
10158
+ );
10159
+ }
10160
+ await Promise.all(
10161
+ this.getLiveMcpConfigs(serverName).map(async (config) => {
10162
+ const geminiClient = config.getGeminiClient?.();
10163
+ if (geminiClient?.isInitialized?.()) {
10164
+ await geminiClient.setTools?.();
10165
+ }
10166
+ })
10167
+ );
10168
+ } else {
10169
+ await this.reconcileMcpServerAcrossLiveConfigs(
10170
+ serverName,
10171
+ "discover"
10172
+ );
10173
+ }
10174
+ } catch (error) {
10175
+ errors.push(error);
10176
+ }
10177
+ }
10178
+ if (errors.length > 0) {
10179
+ throw new AggregateError(
10180
+ errors,
10181
+ "Failed to force reconnect one or more MCP servers"
10182
+ );
10183
+ }
10184
+ }
9890
10185
  /**
9891
10186
  * Drain the workspace MCP transport pool. Called on shutdown so all
9892
10187
  * pool entries get a coordinated SIGTERM before process.exit. No-op
@@ -10095,6 +10390,10 @@ var QwenAgent = class {
10095
10390
  generation.controller.abort();
10096
10391
  }
10097
10392
  this.generationControllers.clear();
10393
+ for (const controller of this.workspaceGenerationControllers.values()) {
10394
+ controller.abort();
10395
+ }
10396
+ this.workspaceGenerationControllers.clear();
10098
10397
  await Promise.allSettled(
10099
10398
  [...this.sessions.entries()].map(
10100
10399
  ([sessionId, session]) => this.discardStoredSessionIfCurrent(sessionId, session, {
@@ -10153,9 +10452,34 @@ var QwenAgent = class {
10153
10452
  }
10154
10453
  async initialize(args) {
10155
10454
  markAcpStartup("initializeHandlerStart");
10455
+ if (this.privateParentState === "rejected") {
10456
+ throw RequestError.invalidParams(
10457
+ void 0,
10458
+ "Invalid private ACP parent capability"
10459
+ );
10460
+ }
10461
+ if (this.privateParentState === "uninitialized") {
10462
+ const expectedCapability = this.expectedPrivateParentCapability;
10463
+ if (expectedCapability === void 0) {
10464
+ this.privateParentState = "untrusted";
10465
+ } else {
10466
+ const suppliedCapability = args._meta?.[PRIVATE_PARENT_CAPABILITY_META_KEY];
10467
+ const suppliedBuffer = typeof suppliedCapability === "string" ? Buffer.from(suppliedCapability) : void 0;
10468
+ const expectedBuffer = Buffer.from(expectedCapability);
10469
+ if (suppliedBuffer !== void 0 && suppliedBuffer.length === expectedBuffer.length && timingSafeEqual(suppliedBuffer, expectedBuffer)) {
10470
+ this.privateParentState = "trusted";
10471
+ } else {
10472
+ this.privateParentState = "rejected";
10473
+ throw RequestError.invalidParams(
10474
+ void 0,
10475
+ "Invalid private ACP parent capability"
10476
+ );
10477
+ }
10478
+ }
10479
+ }
10156
10480
  this.clientCapabilities = args.clientCapabilities;
10157
10481
  const authMethods = buildAuthMethods();
10158
- const version = "0.20.2-headless-image-routing.1";
10482
+ const version = "0.21.0";
10159
10483
  const response = {
10160
10484
  protocolVersion: PROTOCOL_VERSION,
10161
10485
  agentInfo: {
@@ -10431,6 +10755,7 @@ var QwenAgent = class {
10431
10755
  }
10432
10756
  }
10433
10757
  await this.#restoreWorktreeOnResume(config, session);
10758
+ await this.#restoreBackgroundAgentsOnResume(config, session);
10434
10759
  this.#restoreGoalOnResume(config, session);
10435
10760
  const modesData = this.buildModesData(config);
10436
10761
  const availableModels = this.buildAvailableModels(config);
@@ -10505,6 +10830,7 @@ var QwenAgent = class {
10505
10830
  });
10506
10831
  }
10507
10832
  await this.#restoreWorktreeOnResume(config, session);
10833
+ await this.#restoreBackgroundAgentsOnResume(config, session);
10508
10834
  this.#restoreGoalOnResume(config, session);
10509
10835
  const modesData = this.buildModesData(config);
10510
10836
  const availableModels = this.buildAvailableModels(config);
@@ -10534,6 +10860,10 @@ var QwenAgent = class {
10534
10860
  debugLogger7.warn(`ACP worktree restore failed: ${error}`);
10535
10861
  }
10536
10862
  }
10863
+ async #restoreBackgroundAgentsOnResume(config, session) {
10864
+ await config.loadPausedBackgroundAgents(config.getSessionId());
10865
+ session.pendingRecoveredAgentsNotice = config.consumePendingRecoveredAgentsNotice();
10866
+ }
10537
10867
  /**
10538
10868
  * Re-registers the `/goal` Stop hook when a resumed transcript ends on an
10539
10869
  * unsatisfied goal — the daemon counterpart of the TUI's resume restore.
@@ -10667,14 +10997,63 @@ var QwenAgent = class {
10667
10997
  if (!session) {
10668
10998
  throw new Error(`Session not found: ${params.sessionId}`);
10669
10999
  }
10670
- return session.prompt(params);
11000
+ const sanitizedParams = { ...params };
11001
+ const meta = params._meta && typeof params._meta === "object" ? { ...params._meta } : {};
11002
+ const suppliedContext = meta[INVOCATION_CONTEXT_META_KEY];
11003
+ delete meta[INVOCATION_CONTEXT_META_KEY];
11004
+ delete meta[PRIVATE_PARENT_CAPABILITY_META_KEY];
11005
+ if (Object.keys(meta).length > 0) {
11006
+ sanitizedParams._meta = meta;
11007
+ } else {
11008
+ delete sanitizedParams._meta;
11009
+ }
11010
+ const invocationContext = this.privateParentState === "trusted" && suppliedContext !== void 0 ? parseInvocationContext(suppliedContext) : void 0;
11011
+ if (this.privateParentState === "trusted" && suppliedContext !== void 0 && invocationContext === void 0) {
11012
+ throw RequestError.invalidParams(
11013
+ void 0,
11014
+ "Invalid trusted ACP invocation context"
11015
+ );
11016
+ }
11017
+ let settleCall = /* @__PURE__ */ __name(() => {
11018
+ }, "settleCall");
11019
+ const call = {
11020
+ controller: new AbortController(),
11021
+ settled: new Promise((resolve5) => {
11022
+ settleCall = resolve5;
11023
+ })
11024
+ };
11025
+ let calls = this.activePromptCalls.get(params.sessionId);
11026
+ if (!calls) {
11027
+ calls = /* @__PURE__ */ new Set();
11028
+ this.activePromptCalls.set(params.sessionId, calls);
11029
+ }
11030
+ calls.add(call);
11031
+ try {
11032
+ return await session.prompt(
11033
+ sanitizedParams,
11034
+ invocationContext,
11035
+ call.controller.signal
11036
+ );
11037
+ } finally {
11038
+ calls.delete(call);
11039
+ if (calls.size === 0) {
11040
+ this.activePromptCalls.delete(params.sessionId);
11041
+ }
11042
+ settleCall();
11043
+ }
10671
11044
  }
10672
11045
  async cancel(params) {
10673
11046
  const session = this.sessions.get(params.sessionId);
10674
11047
  if (!session) {
10675
11048
  throw new Error(`Session not found: ${params.sessionId}`);
10676
11049
  }
10677
- await session.cancelPendingPrompt();
11050
+ try {
11051
+ await session.cancelPendingPrompt();
11052
+ } catch (error) {
11053
+ if (!isNotCurrentlyGeneratingCancelError(error)) {
11054
+ throw error;
11055
+ }
11056
+ }
10678
11057
  }
10679
11058
  loadPermissionSettings(cwd) {
10680
11059
  this.settings = loadSettings(cwd);
@@ -11696,7 +12075,7 @@ var QwenAgent = class {
11696
12075
  }
11697
12076
  buildProvidersPreflightCell(config) {
11698
12077
  try {
11699
- const models = config.getAllConfiguredModels();
12078
+ const models = config.getAllConfiguredModels().filter((model) => !model.imageOnly);
11700
12079
  const authType = config.getAuthType?.();
11701
12080
  if (models.length === 0) {
11702
12081
  return this.acpCell("providers", {
@@ -12434,6 +12813,31 @@ var QwenAgent = class {
12434
12813
  const cwd = requestedCwd || process.cwd();
12435
12814
  const SESSION_ID_RE = /^[0-9a-fA-F-]{32,36}$/;
12436
12815
  switch (method) {
12816
+ case PROMPT_CANCEL_METHOD: {
12817
+ const sessionId = params["sessionId"];
12818
+ if (typeof sessionId !== "string" || sessionId.length === 0) {
12819
+ throw RequestError.invalidParams(
12820
+ void 0,
12821
+ "Invalid or missing sessionId"
12822
+ );
12823
+ }
12824
+ const session = this.sessions.get(sessionId);
12825
+ if (!session) {
12826
+ throw RequestError.invalidParams(
12827
+ void 0,
12828
+ `Session not found for id: ${sessionId}`
12829
+ );
12830
+ }
12831
+ const targetedCalls = new Set(
12832
+ this.activePromptCalls.get(sessionId) ?? []
12833
+ );
12834
+ if (targetedCalls.size === 0) {
12835
+ return { cancelled: false };
12836
+ }
12837
+ targetedCalls.forEach((call) => call.controller.abort());
12838
+ await Promise.all(Array.from(targetedCalls, (call) => call.settled));
12839
+ return { cancelled: true };
12840
+ }
12437
12841
  case TODO_STOP_GUARD_QUEUE_RELEASE_METHOD: {
12438
12842
  const sessionId = params["sessionId"];
12439
12843
  if (typeof sessionId !== "string" || sessionId.length === 0) {
@@ -12703,6 +13107,25 @@ var QwenAgent = class {
12703
13107
  "Transcript cursor and record boundary are mutually exclusive"
12704
13108
  );
12705
13109
  }
13110
+ const rawDirection = params["direction"];
13111
+ if (rawDirection !== void 0 && rawDirection !== "backward") {
13112
+ throw RequestError.invalidParams(
13113
+ void 0,
13114
+ "Invalid transcript direction"
13115
+ );
13116
+ }
13117
+ if (rawCursor !== void 0 && rawDirection !== void 0) {
13118
+ throw RequestError.invalidParams(
13119
+ void 0,
13120
+ "Transcript cursor and direction are mutually exclusive"
13121
+ );
13122
+ }
13123
+ if (rawBeforeRecordId !== void 0 && rawDirection !== void 0) {
13124
+ throw RequestError.invalidParams(
13125
+ void 0,
13126
+ "Transcript record boundary and direction are mutually exclusive"
13127
+ );
13128
+ }
12706
13129
  const rawLimit = params["limit"];
12707
13130
  if (rawLimit !== void 0 && (!Number.isSafeInteger(rawLimit) || rawLimit < 1 || rawLimit > SESSION_TRANSCRIPT_MAX_LIMIT)) {
12708
13131
  throw RequestError.invalidParams(
@@ -12713,10 +13136,14 @@ var QwenAgent = class {
12713
13136
  try {
12714
13137
  const settings = loadSettingsCached(cwd);
12715
13138
  return await runWithAcpRuntimeOutputDir(settings, cwd, async () => {
13139
+ if (rawDirection === "backward") {
13140
+ await this.sessions.get(sessionId)?.getConfig().getChatRecordingService()?.flush();
13141
+ }
12716
13142
  const reader = new SessionTranscriptReader(cwd);
12717
13143
  const page = await reader.readPage(sessionId, {
12718
13144
  ...typeof rawCursor === "string" ? { cursor: rawCursor } : {},
12719
13145
  ...typeof rawBeforeRecordId === "string" ? { beforeRecordId: rawBeforeRecordId } : {},
13146
+ ...rawDirection === "backward" ? { direction: rawDirection } : {},
12720
13147
  ...typeof rawLimit === "number" ? { limit: rawLimit } : {},
12721
13148
  maxBytes: SESSION_TRANSCRIPT_MAX_PAGE_BYTES
12722
13149
  });
@@ -13262,8 +13689,34 @@ var QwenAgent = class {
13262
13689
  }
13263
13690
  case SERVE_CONTROL_EXT_METHODS.workspaceMcpInitialize:
13264
13691
  return this.initializeWorkspaceMcpDiscovery();
13265
- case SERVE_CONTROL_EXT_METHODS.workspaceMcpReload:
13266
- return this.reloadWorkspaceMcpDiscovery();
13692
+ case SERVE_CONTROL_EXT_METHODS.workspaceMcpReload: {
13693
+ const forceReconnectAll = params["forceReconnectAll"];
13694
+ const forceReconnectWhich = params["forceReconnectWhich"];
13695
+ if (forceReconnectAll !== void 0 && typeof forceReconnectAll !== "boolean") {
13696
+ throw RequestError.invalidParams(
13697
+ void 0,
13698
+ "forceReconnectAll must be a boolean"
13699
+ );
13700
+ }
13701
+ if (forceReconnectWhich !== void 0 && (!Array.isArray(forceReconnectWhich) || forceReconnectWhich.some(
13702
+ (serverName) => typeof serverName !== "string" || serverName.length === 0
13703
+ ))) {
13704
+ throw RequestError.invalidParams(
13705
+ void 0,
13706
+ "forceReconnectWhich must be an array of server names"
13707
+ );
13708
+ }
13709
+ if (forceReconnectAll === true && forceReconnectWhich !== void 0) {
13710
+ throw RequestError.invalidParams(
13711
+ void 0,
13712
+ "forceReconnectAll and forceReconnectWhich cannot be used together"
13713
+ );
13714
+ }
13715
+ return this.reloadWorkspaceMcpDiscovery({
13716
+ forceReconnectAll: forceReconnectAll === true,
13717
+ forceReconnectWhich
13718
+ });
13719
+ }
13267
13720
  case SERVE_CONTROL_EXT_METHODS.workspaceMcpManage: {
13268
13721
  const serverName = params["serverName"];
13269
13722
  const action = params["action"];
@@ -13515,6 +13968,52 @@ var QwenAgent = class {
13515
13968
  authUrl
13516
13969
  };
13517
13970
  }
13971
+ case SERVE_CONTROL_EXT_METHODS.workspaceGenerationStart: {
13972
+ const requestId = params["requestId"];
13973
+ const prompt = params["prompt"];
13974
+ if (typeof requestId !== "string" || requestId.length === 0) {
13975
+ throw RequestError.invalidParams(
13976
+ void 0,
13977
+ "Invalid or missing requestId"
13978
+ );
13979
+ }
13980
+ if (typeof prompt !== "string" || !prompt.trim() || Buffer.byteLength(prompt, "utf8") > GENERATION_MAX_PROMPT_BYTES || params["purpose"] !== "text") {
13981
+ throw RequestError.invalidParams(
13982
+ void 0,
13983
+ "Invalid workspace generation request"
13984
+ );
13985
+ }
13986
+ if (this.workspaceGenerationControllers.has(requestId)) {
13987
+ throw RequestError.invalidParams(
13988
+ void 0,
13989
+ "Duplicate workspace generation requestId"
13990
+ );
13991
+ }
13992
+ const controller = new AbortController();
13993
+ this.workspaceGenerationControllers.set(requestId, controller);
13994
+ const signal = AbortSignal.any([
13995
+ controller.signal,
13996
+ AbortSignal.timeout(GENERATION_TIMEOUT_MS)
13997
+ ]);
13998
+ try {
13999
+ const emit = /* @__PURE__ */ __name(async (event) => {
14000
+ await this.connection.extNotification(
14001
+ "qwen/notify/workspace/generation/event",
14002
+ { v: 1, requestId, event }
14003
+ );
14004
+ }, "emit");
14005
+ const result = await executeGeneration(
14006
+ this.config,
14007
+ requestId,
14008
+ prompt.trim(),
14009
+ signal,
14010
+ emit
14011
+ );
14012
+ return { requestId, ...result };
14013
+ } finally {
14014
+ this.workspaceGenerationControllers.delete(requestId);
14015
+ }
14016
+ }
13518
14017
  case SERVE_CONTROL_EXT_METHODS.workspaceAgentGenerate: {
13519
14018
  const description = params["description"];
13520
14019
  if (typeof description !== "string" || !description.trim() || description.length > 4096) {
@@ -13529,6 +14028,22 @@ var QwenAgent = class {
13529
14028
  AbortSignal.timeout(5 * 6e4)
13530
14029
  );
13531
14030
  }
14031
+ case SERVE_CONTROL_EXT_METHODS.workspaceGenerationCancel: {
14032
+ const requestId = params["requestId"];
14033
+ if (typeof requestId !== "string" || requestId.length === 0) {
14034
+ throw RequestError.invalidParams(
14035
+ void 0,
14036
+ "Invalid or missing requestId"
14037
+ );
14038
+ }
14039
+ const controller = this.workspaceGenerationControllers.get(requestId);
14040
+ const cancelled = controller !== void 0;
14041
+ if (cancelled) {
14042
+ controller.abort();
14043
+ this.workspaceGenerationControllers.delete(requestId);
14044
+ }
14045
+ return { requestId, cancelled };
14046
+ }
13532
14047
  case SERVE_CONTROL_EXT_METHODS.sessionArtifactsPersist: {
13533
14048
  const sessionId = params["sessionId"];
13534
14049
  if (typeof sessionId !== "string" || sessionId.length === 0) {
@@ -15527,7 +16042,7 @@ ${outputText}
15527
16042
  buildAvailableModels(config) {
15528
16043
  const rawCurrentModelId = (config.getModel() || this.config.getModel() || "").trim();
15529
16044
  const currentAuthType = config.getAuthType();
15530
- const modelOptions = buildAcpModelOptions(config.getAllConfiguredModels());
16045
+ const modelOptions = this.buildSelectableModelOptions(config);
15531
16046
  const activeRuntimeSnapshot = config.getActiveRuntimeModelSnapshot?.();
15532
16047
  const currentModelId = getCurrentAcpModelId(
15533
16048
  modelOptions,
@@ -15562,7 +16077,7 @@ ${outputText}
15562
16077
  }
15563
16078
  buildConfigOptions(config) {
15564
16079
  const currentApprovalMode = config.getApprovalMode();
15565
- const modelOptions = buildAcpModelOptions(config.getAllConfiguredModels());
16080
+ const modelOptions = this.buildSelectableModelOptions(config);
15566
16081
  const rawCurrentModelId = (config.getModel() || "").trim();
15567
16082
  const currentAuthType = config.getAuthType?.();
15568
16083
  const activeRuntimeSnapshot = config.getActiveRuntimeModelSnapshot?.();
@@ -15602,6 +16117,14 @@ ${outputText}
15602
16117
  };
15603
16118
  return [modeConfigOption, modelConfigOption];
15604
16119
  }
16120
+ buildSelectableModelOptions(config) {
16121
+ const currentAuthType = config.getAuthType();
16122
+ return buildAcpModelOptions(
16123
+ config.getAllConfiguredModels().filter(
16124
+ (model) => model.authType !== "qwen-oauth" /* QWEN_OAUTH */ || currentAuthType === "qwen-oauth" /* QWEN_OAUTH */
16125
+ )
16126
+ );
16127
+ }
15605
16128
  };
15606
16129
  function diffSettingsKeys(oldMerged, newMerged) {
15607
16130
  const changed = /* @__PURE__ */ new Set();