@qwen-code/qwen-code 0.20.0-nightly.20260722.b98306b7e → 0.20.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 (341) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +1 -1
  2. package/bundled/qc-helper/docs/features/auto-mode.md +16 -19
  3. package/bundled/qc-helper/docs/features/commands.md +0 -54
  4. package/bundled/qc-helper/docs/features/sub-agents.md +7 -16
  5. package/bundled/qc-helper/docs/integration-github-action.md +10 -10
  6. package/bundled/qc-helper/docs/qwen-serve.md +1 -2
  7. package/bundled/review/DESIGN.md +2 -2
  8. package/bundled/review/SKILL.md +4 -4
  9. package/chunks/{MaxSizedBox-YO432SD4.js → MaxSizedBox-B5YGZSYE.js} +34 -41
  10. package/chunks/{StandaloneSessionPicker-525JBPXC.js → StandaloneSessionPicker-CEGO2AZX.js} +50 -57
  11. package/chunks/{acpAgent-FORCZCBG.js → acpAgent-YUR43TLG.js} +496 -1487
  12. package/chunks/{agent-OZCWHX2J.js → agent-H4JIDL7S.js} +30 -37
  13. package/chunks/agent-headless-TTBEREQV.js +61 -0
  14. package/chunks/{anthropicContentGenerator-NMSS7IMV.js → anthropicContentGenerator-HVKLXOOU.js} +12 -13
  15. package/chunks/{artifact-tool-56T5IMBP.js → artifact-tool-WBCAMD3O.js} +3 -3
  16. package/chunks/{askUserQuestion-E25OBIC2.js → askUserQuestion-6DZC4UV5.js} +3 -3
  17. package/chunks/{bridge-HUUBAUDS.js → bridge-VL7ITBU5.js} +35 -42
  18. package/chunks/{build-GHIZ4MSZ.js → build-SSCNEHZZ.js} +1 -1
  19. package/chunks/{ca-N6VVUFVB.js → ca-2SL2BXTK.js} +201 -611
  20. package/chunks/{channel-worker-group-LFBT7K64.js → channel-worker-group-53CMOPFT.js} +5 -5
  21. package/chunks/{channel-worker-manager-3RUPERG2.js → channel-worker-manager-UTXILKC2.js} +5 -5
  22. package/chunks/{channel-worker-supervisor-A3KVATD3.js → channel-worker-supervisor-ZGO2W2MD.js} +4 -4
  23. package/chunks/{chunk-2LI23QA6.js → chunk-2HOVDT7W.js} +1 -1
  24. package/chunks/{chunk-QSZOJHCQ.js → chunk-2LL7TXB4.js} +2 -2
  25. package/chunks/{chunk-EGMNITTR.js → chunk-333CXMNJ.js} +5 -5
  26. package/chunks/{chunk-DGKZ6QL3.js → chunk-33XUAINQ.js} +21 -61
  27. package/chunks/{chunk-DKT6SIJC.js → chunk-4EP2PYYL.js} +5 -5
  28. package/chunks/{chunk-QW3QUYG5.js → chunk-4ILMYHEI.js} +3 -3
  29. package/chunks/{chunk-B5KE3KNO.js → chunk-4N3KMAIL.js} +32 -128
  30. package/chunks/{chunk-6ZBPS62S.js → chunk-4ODB7WIB.js} +1 -1
  31. package/chunks/{chunk-5XPUJM4N.js → chunk-4XNLIGVA.js} +298 -576
  32. package/chunks/{chunk-67SZUDUH.js → chunk-542SK7KV.js} +1608 -243
  33. package/chunks/{chunk-RZZNAWTE.js → chunk-5JBR5XIK.js} +2 -2
  34. package/chunks/{chunk-E4IMU4Y5.js → chunk-5SCI6E3E.js} +1 -1
  35. package/chunks/{chunk-ZKY7USAE.js → chunk-6AFUCL3D.js} +1 -1
  36. package/chunks/{chunk-5I5BM454.js → chunk-6EFTQYW7.js} +1 -1
  37. package/chunks/{chunk-BXCXDT2T.js → chunk-7PZ2ATFZ.js} +29 -54
  38. package/chunks/{chunk-FJZPCXZM.js → chunk-7RMOXZTC.js} +4 -4
  39. package/chunks/{chunk-XPWXDCW5.js → chunk-7SXZC7ID.js} +6 -7
  40. package/chunks/{chunk-O2WEV2LS.js → chunk-A5LYNIW7.js} +8 -8
  41. package/chunks/{chunk-SEHBVG2S.js → chunk-AJSJ5TTU.js} +1 -1
  42. package/chunks/{chunk-422RQSNN.js → chunk-AKX4WPPP.js} +86 -307
  43. package/chunks/{chunk-QVQCCBMW.js → chunk-ANPINBOF.js} +5 -5
  44. package/chunks/{chunk-JJEFX6U5.js → chunk-AQIEINAY.js} +1766 -28
  45. package/chunks/{chunk-7Z6JQEL6.js → chunk-AYCDXHZB.js} +1 -1
  46. package/chunks/{chunk-BKZEHVPV.js → chunk-B3KGZCQN.js} +169 -177
  47. package/chunks/{chunk-6X4GWOPW.js → chunk-BDBMYST4.js} +1 -1
  48. package/chunks/{chunk-25WFJZL5.js → chunk-BMWMT5Y2.js} +373 -3
  49. package/chunks/{chunk-EDANOBFR.js → chunk-BRRF37CO.js} +6 -6
  50. package/chunks/{chunk-QLJUC7TG.js → chunk-BVLROR2T.js} +1 -1
  51. package/chunks/{chunk-OQB4EXO4.js → chunk-C27BYUX6.js} +11 -14
  52. package/chunks/{chunk-GDBCCE2J.js → chunk-CB2HFGRV.js} +6 -31
  53. package/chunks/chunk-CPCVCKKF.js +358 -0
  54. package/chunks/{chunk-K6YXJ3J5.js → chunk-CV63PP6U.js} +1 -1
  55. package/chunks/{chunk-BWGIRN4Z.js → chunk-CZF3E5GF.js} +1 -1
  56. package/chunks/{chunk-6NAAGP57.js → chunk-D22SX43D.js} +1 -1
  57. package/chunks/{chunk-X6N25LXS.js → chunk-D2VIDMVM.js} +2 -2
  58. package/chunks/{chunk-E7O22QBU.js → chunk-DBE4QFZS.js} +23 -27
  59. package/chunks/{chunk-4ZAHUGSC.js → chunk-DP5GXXNZ.js} +1 -5
  60. package/chunks/{chunk-Q2YKNMLS.js → chunk-EAUYY7SS.js} +3 -3
  61. package/chunks/{chunk-KHOVYUHX.js → chunk-EIAK6Q2B.js} +2 -2
  62. package/chunks/{chunk-NPQDJGKU.js → chunk-EZVDJFZ7.js} +1 -1
  63. package/chunks/{chunk-FODK6UMO.js → chunk-FEOZBUMT.js} +27 -0
  64. package/chunks/{chunk-6NHK6HS7.js → chunk-FLSVD6BS.js} +3 -3
  65. package/chunks/{chunk-LLJNFFFT.js → chunk-FQD7GFSV.js} +3 -3
  66. package/chunks/{chunk-T2L47JJK.js → chunk-FSL5W5TI.js} +3 -3
  67. package/chunks/{chunk-JCW2R7WC.js → chunk-G45X5TRN.js} +72 -1
  68. package/chunks/{chunk-ZHERRXZJ.js → chunk-GKY2OJ7R.js} +1 -1
  69. package/chunks/{chunk-6IL7KRLE.js → chunk-GMGDLUC7.js} +1 -1
  70. package/chunks/{chunk-N2HDLRGT.js → chunk-HZPN55E5.js} +1 -1
  71. package/chunks/{chunk-NTC7J4X7.js → chunk-I2PYAYFM.js} +3 -3
  72. package/chunks/{chunk-RVWSD6GI.js → chunk-IR46U7RB.js} +3 -3
  73. package/chunks/{chunk-W6E7KTQL.js → chunk-IVPSS6EL.js} +4 -4
  74. package/chunks/{chunk-4K56OJFJ.js → chunk-JD3MKVKL.js} +1 -1
  75. package/chunks/{chunk-SP5WRGVG.js → chunk-JNWZQ27S.js} +3 -3
  76. package/chunks/{chunk-VAUDHMX6.js → chunk-KDC6GNQR.js} +4 -4
  77. package/chunks/{chunk-5TSCAYXT.js → chunk-KG3XV6FH.js} +2 -29
  78. package/chunks/{chunk-HCQ2Q3KF.js → chunk-KOR3XKCA.js} +4 -10
  79. package/chunks/{chunk-52Y2T4L3.js → chunk-KQNM4EO7.js} +5 -137
  80. package/chunks/{chunk-4K7VDKAD.js → chunk-KTUQMDEP.js} +1 -1
  81. package/chunks/{chunk-Z2FTZM4Z.js → chunk-KX6UK4VJ.js} +19929 -22391
  82. package/chunks/{chunk-JYS55H6Z.js → chunk-MAQQGNQ5.js} +7 -66
  83. package/chunks/{chunk-7FNV372W.js → chunk-MJ6S23WZ.js} +4 -4
  84. package/chunks/{chunk-D7WXIW7H.js → chunk-NBMIC7DR.js} +4 -4
  85. package/chunks/{chunk-HGGEN2SC.js → chunk-NDMQLV4Y.js} +4 -4
  86. package/chunks/{chunk-FFFM6NJV.js → chunk-NEEB7UEN.js} +2 -1
  87. package/chunks/{chunk-WKGGZF7Z.js → chunk-NGFEPAE6.js} +6 -8
  88. package/chunks/{chunk-RVLZCXEE.js → chunk-NIJEXGV6.js} +10 -79
  89. package/chunks/{chunk-LMY4HCMA.js → chunk-O3OCNYY5.js} +2 -2
  90. package/chunks/{chunk-RIEABAJC.js → chunk-O3Z73NBP.js} +7 -7
  91. package/chunks/{chunk-VBZBVAQ3.js → chunk-OEO2ERWK.js} +33 -54
  92. package/chunks/{chunk-KQQ757OQ.js → chunk-OLMETXLX.js} +2 -2
  93. package/chunks/{chunk-LIZRAKPB.js → chunk-OOCI5VVU.js} +1 -1
  94. package/chunks/{chunk-GPSKDNEE.js → chunk-OONJNQ42.js} +3 -3
  95. package/chunks/{chunk-YM3SZTH4.js → chunk-OP4MOGXF.js} +1 -8
  96. package/chunks/{chunk-FCPNARPD.js → chunk-OWCALFEG.js} +1 -1
  97. package/chunks/{chunk-MPZ34JE7.js → chunk-OYZWQNWG.js} +2 -2
  98. package/chunks/{chunk-QBUDF33N.js → chunk-PBATSWUQ.js} +1 -1
  99. package/chunks/{chunk-6MNDXSG6.js → chunk-PBWEWI4N.js} +69 -76
  100. package/chunks/{chunk-OCCDRJIS.js → chunk-PF4CHQOJ.js} +6 -6
  101. package/chunks/{chunk-BH32VITB.js → chunk-PGEPSDJI.js} +8 -13
  102. package/chunks/{chunk-4LVZNIDO.js → chunk-QKYTTBYW.js} +1 -1
  103. package/chunks/{chunk-VYPFXUCB.js → chunk-R3VWUU2E.js} +1 -1
  104. package/chunks/{chunk-RV4C2ZFG.js → chunk-RFIAR4YL.js} +1 -1
  105. package/chunks/{chunk-P4B4SXDS.js → chunk-S2PD3EZD.js} +1 -1
  106. package/chunks/{chunk-H6T65C7O.js → chunk-S2W2LVDU.js} +3 -3
  107. package/chunks/{chunk-VJ4P64ID.js → chunk-S2XVRHDN.js} +1 -1
  108. package/chunks/chunk-SEKHYHMS.js +45 -0
  109. package/chunks/{chunk-JNEA3NW7.js → chunk-SJMV7ZBK.js} +8 -8
  110. package/chunks/{chunk-THJNPLI4.js → chunk-TB6UDU4T.js} +16 -16
  111. package/chunks/{chunk-R3D7SK6L.js → chunk-TIH2ZTOC.js} +2 -2
  112. package/chunks/{chunk-3FML67YK.js → chunk-TKLLK6XQ.js} +11 -11
  113. package/chunks/{chunk-SMVDDPEJ.js → chunk-TMQ6XQCX.js} +53 -170
  114. package/chunks/{chunk-QNLNLENL.js → chunk-UEY4AYUL.js} +2 -2
  115. package/chunks/{chunk-BLTELXOK.js → chunk-VDWBQ5AW.js} +1 -1
  116. package/chunks/{chunk-WGBLCAVW.js → chunk-VEXFOTEO.js} +3 -3
  117. package/chunks/{chunk-4RAFVWW2.js → chunk-VZQUV7VK.js} +1 -1
  118. package/chunks/chunk-W7FJ3N32.js +49 -0
  119. package/chunks/{chunk-UGYMA4EI.js → chunk-W7H223ZZ.js} +1 -1
  120. package/chunks/{chunk-UH3WSE5L.js → chunk-X6YQWCIJ.js} +1 -13
  121. package/chunks/{chunk-H4AR2JQF.js → chunk-XVVH63JG.js} +3 -3
  122. package/chunks/{chunk-QKTHJXCS.js → chunk-Y2ENGUD6.js} +1 -1
  123. package/chunks/{chunk-QD6BRERJ.js → chunk-YWEW33JY.js} +7 -7
  124. package/chunks/{chunk-57FIIFJN.js → chunk-ZEOZL37W.js} +1 -1
  125. package/chunks/chunk-ZFKNWQGQ.js +74639 -0
  126. package/chunks/{computer-use-XPLRRVJM.js → computer-use-NIWQNUZF.js} +35 -42
  127. package/chunks/{config-utils-WYUQ7II4.js → config-utils-AHQ6YZ66.js} +3 -3
  128. package/chunks/contextCommand-L2COEUHS.js +66 -0
  129. package/chunks/{create-sub-session-5YJR5PAM.js → create-sub-session-MGNX52P3.js} +30 -37
  130. package/chunks/{create-sub-session-AZ77LBL3.js → create-sub-session-P26FE5GG.js} +3 -3
  131. package/chunks/{cron-create-KTWJM7QT.js → cron-create-JWFHBDRQ.js} +5 -5
  132. package/chunks/{cron-delete-2P3I5ULL.js → cron-delete-GDX4E26G.js} +5 -5
  133. package/chunks/{cron-list-PXDPGEDQ.js → cron-list-USMAIWPT.js} +5 -5
  134. package/chunks/{daemon-KLPTQIE4.js → daemon-RG2MAI6T.js} +81 -138
  135. package/chunks/daemon-status-provider-NL4IAG7B.js +74 -0
  136. package/chunks/{de-4IBXM7CN.js → de-I7ZIYXZC.js} +1 -5
  137. package/chunks/{dist-HMU6CYS4.js → dist-2BHAYBKP.js} +2 -2
  138. package/chunks/{dist-PJLG2XYX.js → dist-2MIU4UUH.js} +1 -1
  139. package/chunks/{dist-UIFWIFRO.js → dist-53PZYC5B.js} +2 -2
  140. package/chunks/{dist-OAV7LJGJ.js → dist-AU7NQQRP.js} +1 -1
  141. package/chunks/{dist-OMW6WDEO.js → dist-FUTEXY6A.js} +1 -1
  142. package/chunks/{dist-XRYV6TJP.js → dist-WGTQO7F2.js} +25 -65
  143. package/chunks/{earlyInputCapture-XMECIN6Y.js → earlyInputCapture-L6I2A22T.js} +31 -38
  144. package/chunks/{edit-MMPLBVZU.js → edit-3QV3JZJL.js} +37 -42
  145. package/chunks/{en-USMCCJAJ.js → en-XE34GKAA.js} +1 -5
  146. package/chunks/{enter-worktree-BD7MCCG7.js → enter-worktree-4GMMF7EG.js} +35 -42
  147. package/chunks/{enterPlanMode-BQNJC23R.js → enterPlanMode-L5UWBAUC.js} +36 -48
  148. package/chunks/{environment-F3KL5Z5S.js → environment-3OV7UQOT.js} +32 -39
  149. package/chunks/{errors-VJ544HIS.js → errors-LEOF5QG4.js} +32 -39
  150. package/chunks/{exit-worktree-RDIQXZMI.js → exit-worktree-DDP57JLV.js} +35 -42
  151. package/chunks/{exitPlanMode-UNCZQPTX.js → exitPlanMode-CJBLGPIP.js} +35 -42
  152. package/chunks/{fast-path-H7N32H7D.js → fast-path-M6RP2ING.js} +3 -4
  153. package/chunks/{fast-path-settings-XB3CPUJT.js → fast-path-settings-DAOVFADC.js} +2 -2
  154. package/chunks/{fr-WVHEBDDB.js → fr-X7KDVZIY.js} +1 -5
  155. package/chunks/{gemini-G4VKT5DQ.js → gemini-H4PHBJTL.js} +89 -97
  156. package/chunks/{geminiContentGenerator-MDAL2B4C.js → geminiContentGenerator-VURJYPWP.js} +5 -5
  157. package/chunks/{getMachineId-bsd-QFVLPUPT.js → getMachineId-bsd-EXV7SWPA.js} +1 -1
  158. package/chunks/{getMachineId-darwin-DGMQQE2E.js → getMachineId-darwin-IUOMFXU3.js} +1 -1
  159. package/chunks/{getMachineId-linux-R4Z6CSWC.js → getMachineId-linux-K7XJYFHL.js} +1 -1
  160. package/chunks/{getMachineId-unsupported-Z3SBVBUV.js → getMachineId-unsupported-EA5FDRJ6.js} +1 -1
  161. package/chunks/{getMachineId-win-SCK5UFDT.js → getMachineId-win-KBA6RAI5.js} +1 -1
  162. package/chunks/{glob-JBT6FGZL.js → glob-2KUSRAVQ.js} +35 -42
  163. package/chunks/{grep-5NUIQ63X.js → grep-B5RXVESV.js} +35 -42
  164. package/chunks/handleAutoUpdate-QQVIWXKT.js +67 -0
  165. package/chunks/{i18n-IPHO7BGL.js → i18n-N6OBDORT.js} +31 -38
  166. package/chunks/initializer-6WCFNDLL.js +72 -0
  167. package/chunks/installationInfo-6J3WPXNS.js +64 -0
  168. package/chunks/{ja-KY4ROZTE.js → ja-2ICT3KXF.js} +1 -5
  169. package/chunks/{keychain-token-storage-6ACJDYIB.js → keychain-token-storage-DWRJMNH3.js} +3 -3
  170. package/chunks/list-HOWQSWP6.js +75 -0
  171. package/chunks/loadedSettingsAdapter-AO4YBRXZ.js +69 -0
  172. package/chunks/{loop-wakeup-RNMRVA66.js → loop-wakeup-5GLTUBHA.js} +6 -6
  173. package/chunks/{ls-J2ZI5XYK.js → ls-FHBY3Y7I.js} +5 -5
  174. package/chunks/{lsp-UMS3NUB5.js → lsp-B6VMEW6Y.js} +3 -3
  175. package/chunks/mcp-QH7QNXOH.js +69 -0
  176. package/chunks/{monitor-SIX5LMEK.js → monitor-GLJZDNPS.js} +35 -42
  177. package/chunks/nonInteractiveCli-TI7EMPXD.js +126 -0
  178. package/chunks/{notebook-edit-CWVOTW3I.js → notebook-edit-AVCIWS4F.js} +38 -43
  179. package/chunks/{openaiContentGenerator-FELHHJAN.js → openaiContentGenerator-B7W24G3D.js} +17 -22
  180. package/chunks/{pidfile-2ZQGHGPJ.js → pidfile-UEHAT6DH.js} +31 -38
  181. package/chunks/{processUtils-M3RKQCI4.js → processUtils-XZPY2PBB.js} +2 -2
  182. package/chunks/{pt-OK455PLH.js → pt-JJ4XPIBP.js} +1 -5
  183. package/chunks/{qwenContentGenerator-RBFIZMBC.js → qwenContentGenerator-6GUTWJIC.js} +35 -44
  184. package/chunks/{qwenOAuth2-S2BUDQM3.js → qwenOAuth2-GASEEWGU.js} +15 -18
  185. package/chunks/{read-file-WQCCV6HY.js → read-file-SQJONF6A.js} +11 -13
  186. package/chunks/{read-mcp-resource-F6HYMDUY.js → read-mcp-resource-AKCL7I43.js} +3 -3
  187. package/chunks/{record-artifact-7GCFLDD7.js → record-artifact-PEUB7727.js} +3 -3
  188. package/chunks/{resumeHistoryUtils-NDYMU2WO.js → resumeHistoryUtils-PFQ2A23X.js} +36 -43
  189. package/chunks/ripGrep-QCK22GDU.js +59 -0
  190. package/chunks/{ru-7SPDGMGD.js → ru-STR4KTW7.js} +1 -5
  191. package/chunks/{run-qwen-serve-FY5MMHPN.js → run-qwen-serve-OZGR3FQA.js} +82 -104
  192. package/chunks/{runtime-LONMMWKO.js → runtime-SNVAP6EH.js} +40 -49
  193. package/chunks/{scheduler-KYNL2MHI.js → scheduler-Z7QLMUWA.js} +30 -37
  194. package/chunks/{send-message-PYIJ2PZL.js → send-message-3RHE7HSM.js} +4 -6
  195. package/chunks/{serve-VNORFL4H.js → serve-BT7KS6SC.js} +36 -43
  196. package/chunks/{server-X2KCJKA3.js → server-SO64U3X5.js} +284 -988
  197. package/chunks/{session-CSYW4ELX.js → session-2KL2WQAH.js} +173 -92
  198. package/chunks/{settings-QZJ4XWS3.js → settings-KITVOUSV.js} +39 -46
  199. package/chunks/{shell-ELMKOZKP.js → shell-BITUVH2R.js} +30 -37
  200. package/chunks/{skill-IBUGJX5S.js → skill-SOQHY455.js} +20 -24
  201. package/chunks/{spawnChannel-SWCGOB2N.js → spawnChannel-2BU3AULL.js} +32 -39
  202. package/chunks/{src-FOUKVFPZ.js → src-43LM7JLB.js} +209 -279
  203. package/chunks/{standalone-update-5U5IRIN5.js → standalone-update-YG5JUYCM.js} +32 -39
  204. package/chunks/{startInteractiveUI-B3KIQ363.js → startInteractiveUI-3RGTGEX5.js} +895 -1092
  205. package/chunks/{syntheticOutput-H7RTI5KL.js → syntheticOutput-FG5PQKIR.js} +4 -4
  206. package/chunks/{task-create-7474AJJD.js → task-create-HX32YXO7.js} +8 -10
  207. package/chunks/{task-list-633HGOIB.js → task-list-QWSY4ZIU.js} +6 -6
  208. package/chunks/{task-stop-MNUGHPIA.js → task-stop-GWC6UWAL.js} +3 -3
  209. package/chunks/{task-update-66GQB5LI.js → task-update-NCTAB73Q.js} +8 -10
  210. package/chunks/{team-create-AT3OPBS4.js → team-create-FXN3PEBP.js} +35 -42
  211. package/chunks/{team-delete-BB3CG3QF.js → team-delete-KK37HTOG.js} +6 -6
  212. package/chunks/{team-plan-approval-6AYAQ3KG.js → team-plan-approval-GEIZ356Q.js} +35 -42
  213. package/chunks/theme-manager-IAETOI25.js +63 -0
  214. package/chunks/{todoWrite-KRAUN54W.js → todoWrite-ERCAMLFS.js} +5 -5
  215. package/chunks/{tool-search-2ZFYIVVW.js → tool-search-XKK7DNOK.js} +17 -21
  216. package/chunks/total-session-admission-BJLDHKJN.js +69 -0
  217. package/chunks/{trustedFolders-VHGVDSZU.js → trustedFolders-5XCVNEUU.js} +31 -38
  218. package/chunks/{update-relaunch-RM5E3W4P.js → update-relaunch-FMVZK6XF.js} +17 -17
  219. package/chunks/updateCheck-YZZB7YBU.js +70 -0
  220. package/chunks/{useAutoAcceptIndicator-AAPKHC46.js → useAutoAcceptIndicator-ZSQX4I2H.js} +40 -47
  221. package/chunks/{validateNonInterActiveAuth-7WGVSFOZ.js → validateNonInterActiveAuth-PRVEB6GG.js} +72 -79
  222. package/chunks/{version-M7BDNXTT.js → version-AZMG6KWL.js} +1 -1
  223. package/chunks/{web-fetch-UZSKXY3L.js → web-fetch-EPGJ5OQQ.js} +41 -100
  224. package/chunks/{workflow-OCSRM2L2.js → workflow-UTNVPW22.js} +39 -47
  225. package/chunks/workspace-providers-status-EADV364W.js +72 -0
  226. package/chunks/{workspace-registration-store-QDOLWEMY.js → workspace-registration-store-F3ZX3YHT.js} +2 -8
  227. package/chunks/workspace-registry-W6VMFYZU.js +73 -0
  228. package/chunks/workspace-service-F3KIN2UN.js +84 -0
  229. package/chunks/workspace-skills-status-YVICUR5Y.js +71 -0
  230. package/chunks/write-file-CVGF2OKV.js +596 -0
  231. package/chunks/{zh-WY5DWYZD.js → zh-6ANG2HTL.js} +1 -5
  232. package/chunks/{zh-TW-BM47YBFH.js → zh-TW-4RR3YHNN.js} +1 -5
  233. package/cli-entry.js +12 -164
  234. package/cli.js +11 -18
  235. package/locales/ca.js +203 -772
  236. package/locales/de.js +2 -8
  237. package/locales/en.js +2 -8
  238. package/locales/fr.js +2 -8
  239. package/locales/ja.js +2 -8
  240. package/locales/pt.js +2 -8
  241. package/locales/ru.js +2 -8
  242. package/locales/zh-TW.js +2 -8
  243. package/locales/zh.js +2 -8
  244. package/package.json +3 -3
  245. package/web-shell/assets/{arc-ByltRugA.js → arc-Buk1besA.js} +1 -1
  246. package/web-shell/assets/{architectureDiagram-3BPJPVTR-CCRTto5d.js → architectureDiagram-3BPJPVTR-B1aUKYDC.js} +1 -1
  247. package/web-shell/assets/{blockDiagram-GPEHLZMM-Jfy36u1L.js → blockDiagram-GPEHLZMM-CRTdg3Zx.js} +1 -1
  248. package/web-shell/assets/{c4Diagram-AAUBKEIU-4d5FfEZ0.js → c4Diagram-AAUBKEIU-DFdRMp5g.js} +1 -1
  249. package/web-shell/assets/channel-04R0vLbG.js +1 -0
  250. package/web-shell/assets/{chunk-2J33WTMH-BPwxCEro.js → chunk-2J33WTMH-4rYQdkEI.js} +1 -1
  251. package/web-shell/assets/{chunk-4BX2VUAB-jY7ZmJWY.js → chunk-4BX2VUAB-Coi-pQJy.js} +1 -1
  252. package/web-shell/assets/{chunk-55IACEB6-C98HgCsS.js → chunk-55IACEB6-BtBjz02t.js} +1 -1
  253. package/web-shell/assets/{chunk-727SXJPM-cDu-ge-q.js → chunk-727SXJPM-CGYOWorl.js} +1 -1
  254. package/web-shell/assets/{chunk-AQP2D5EJ-BKdJwxXK.js → chunk-AQP2D5EJ-CH5AKhqx.js} +1 -1
  255. package/web-shell/assets/{chunk-FMBD7UC4-DnuxqwMu.js → chunk-FMBD7UC4-Cd50-w85.js} +1 -1
  256. package/web-shell/assets/{chunk-ND2GUHAM-C4fZNPv0.js → chunk-ND2GUHAM-C2wF3KCK.js} +1 -1
  257. package/web-shell/assets/{chunk-QZHKN3VN-Cf4XWOmz.js → chunk-QZHKN3VN-pCeRTaWi.js} +1 -1
  258. package/web-shell/assets/classDiagram-4FO5ZUOK-Bw9SOwAV.js +1 -0
  259. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Bw9SOwAV.js +1 -0
  260. package/web-shell/assets/{cose-bilkent-S5V4N54A-C82mFiqj.js → cose-bilkent-S5V4N54A-B-_fAB6D.js} +1 -1
  261. package/web-shell/assets/{dagre-BM42HDAG-Df8KACER.js → dagre-BM42HDAG-ChSPNHpL.js} +1 -1
  262. package/web-shell/assets/{diagram-2AECGRRQ-EzNs7s_2.js → diagram-2AECGRRQ-BX7cFOF3.js} +1 -1
  263. package/web-shell/assets/{diagram-5GNKFQAL-BRLNvreg.js → diagram-5GNKFQAL-BQUTW92n.js} +1 -1
  264. package/web-shell/assets/{diagram-KO2AKTUF-2HLYHRjC.js → diagram-KO2AKTUF-BkYPh3e4.js} +1 -1
  265. package/web-shell/assets/{diagram-LMA3HP47-DeH0NzSp.js → diagram-LMA3HP47-Cl6jsNyx.js} +1 -1
  266. package/web-shell/assets/{diagram-OG6HWLK6-k5Gn47-G.js → diagram-OG6HWLK6-DRWoHz8n.js} +1 -1
  267. package/web-shell/assets/{erDiagram-TEJ5UH35-gPHFo79f.js → erDiagram-TEJ5UH35-CGvFcZco.js} +1 -1
  268. package/web-shell/assets/{flowDiagram-I6XJVG4X-DYBOiTRW.js → flowDiagram-I6XJVG4X-vms6oVdv.js} +1 -1
  269. package/web-shell/assets/{ganttDiagram-6RSMTGT7-cxjAuic9.js → ganttDiagram-6RSMTGT7-ukT_sfmi.js} +1 -1
  270. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-3nPqpmCP.js → gitGraphDiagram-PVQCEYII-Bn2ZE2Ut.js} +1 -1
  271. package/web-shell/assets/index-DgkKrjw3.js +1187 -0
  272. package/web-shell/assets/index-Rv6mOAN9.css +5 -0
  273. package/web-shell/assets/{index-Cl8d-1bK.js → index-wFXp7W68.js} +1 -1
  274. package/web-shell/assets/{infoDiagram-5YYISTIA-Dph21pR5.js → infoDiagram-5YYISTIA-DHJdSi7x.js} +1 -1
  275. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Cjg1hSaG.js → ishikawaDiagram-YF4QCWOH-DOvd2Wph.js} +1 -1
  276. package/web-shell/assets/{journeyDiagram-JHISSGLW-CR-IzvnU.js → journeyDiagram-JHISSGLW-CH_urMCT.js} +1 -1
  277. package/web-shell/assets/{kanban-definition-UN3LZRKU-BYmuybuC.js → kanban-definition-UN3LZRKU-FKiBdgbH.js} +1 -1
  278. package/web-shell/assets/{linear-CngEEoy8.js → linear-0ZVQFVKf.js} +1 -1
  279. package/web-shell/assets/{mermaid.core-G6fbZRPf.js → mermaid.core-DJ05ZZIK.js} +5 -5
  280. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BtnqnUwJ.js → mindmap-definition-RKZ34NQL-BPuUhkUm.js} +1 -1
  281. package/web-shell/assets/{pieDiagram-4H26LBE5-XTq6UHIA.js → pieDiagram-4H26LBE5-yLFKcXyG.js} +1 -1
  282. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-D1J5PrsS.js → quadrantDiagram-W4KKPZXB-irWqc1pE.js} +1 -1
  283. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CLcBUy3t.js → requirementDiagram-4Y6WPE33-B_4uMoIV.js} +1 -1
  284. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-iwKV02_6.js → sankeyDiagram-5OEKKPKP-ciA4GPwk.js} +1 -1
  285. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-7NFYQcEX.js → sequenceDiagram-3UESZ5HK-CRdZvy0U.js} +1 -1
  286. package/web-shell/assets/{stateDiagram-AJRCARHV-Bvm4Wih6.js → stateDiagram-AJRCARHV-DaYIkCCn.js} +1 -1
  287. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DWBoO4UY.js +1 -0
  288. package/web-shell/assets/{timeline-definition-PNZ67QCA-B4FZFE9O.js → timeline-definition-PNZ67QCA-oBUKv6iH.js} +1 -1
  289. package/web-shell/assets/{vennDiagram-CIIHVFJN-CvMBpmtL.js → vennDiagram-CIIHVFJN-CGW9Sdmb.js} +1 -1
  290. package/web-shell/assets/{wardley-L42UT6IY-E3ag2327.js → wardley-L42UT6IY-CvwKJOCm.js} +1 -1
  291. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BEXWlgxC.js → wardleyDiagram-YWT4CUSO-Ipc260sN.js} +1 -1
  292. package/web-shell/assets/{xychartDiagram-2RQKCTM6-CICK05gI.js → xychartDiagram-2RQKCTM6-D6-CM7pK.js} +1 -1
  293. package/web-shell/index.html +2 -2
  294. package/chunks/agent-headless-QTKDKVED.js +0 -68
  295. package/chunks/chunk-2RFKHEXL.js +0 -74
  296. package/chunks/chunk-43T5WDQ7.js +0 -127
  297. package/chunks/chunk-6PVPNMXU.js +0 -29
  298. package/chunks/chunk-7362QS5B.js +0 -2256
  299. package/chunks/chunk-D7ZI5C7O.js +0 -20600
  300. package/chunks/chunk-GLNBDYUX.js +0 -38
  301. package/chunks/chunk-GMLTZG4O.js +0 -391
  302. package/chunks/chunk-HTR4WV6U.js +0 -327
  303. package/chunks/chunk-KWK7UE6L.js +0 -6194
  304. package/chunks/chunk-M7WBGLYP.js +0 -151
  305. package/chunks/chunk-MMT6IQCT.js +0 -121
  306. package/chunks/chunk-NABLFI57.js +0 -82
  307. package/chunks/chunk-OQ5SYCPE.js +0 -10017
  308. package/chunks/chunk-PI6ECBP3.js +0 -1780
  309. package/chunks/chunk-U7ZFW55U.js +0 -2098
  310. package/chunks/chunk-WHGVTP7Q.js +0 -1049
  311. package/chunks/chunk-XHATNRQA.js +0 -1500
  312. package/chunks/contextCommand-2W675HYY.js +0 -73
  313. package/chunks/daemon-status-provider-QZCVTG6N.js +0 -81
  314. package/chunks/handleAutoUpdate-EF3LY7MI.js +0 -74
  315. package/chunks/initializer-HCOCXGBI.js +0 -79
  316. package/chunks/installationInfo-UEBNCLFW.js +0 -73
  317. package/chunks/list-4SKXTNSD.js +0 -82
  318. package/chunks/loadedSettingsAdapter-EQWK5CG6.js +0 -76
  319. package/chunks/managed-npm-update-ZUZU4UFM.js +0 -333
  320. package/chunks/mcp-4Z3EC4SI.js +0 -76
  321. package/chunks/nonInteractiveCli-FTUKIU5R.js +0 -133
  322. package/chunks/ripGrep-K2E3F5ED.js +0 -66
  323. package/chunks/sdk-exporters-grpc-ETLH47EP.js +0 -23214
  324. package/chunks/sdk-exporters-http-T3POX73F.js +0 -563
  325. package/chunks/sdk-impl-NSLPDH6I.js +0 -9193
  326. package/chunks/theme-manager-733OBN7I.js +0 -70
  327. package/chunks/total-session-admission-TZ4NVA6B.js +0 -76
  328. package/chunks/updateCheck-DGY3LFKB.js +0 -89
  329. package/chunks/web-search-EG64C5VB.js +0 -731
  330. package/chunks/workspace-providers-status-HZLYOFRA.js +0 -79
  331. package/chunks/workspace-registry-EVSTTG3G.js +0 -80
  332. package/chunks/workspace-service-DNQMT6FN.js +0 -91
  333. package/chunks/workspace-skills-status-ICGPGD6F.js +0 -78
  334. package/chunks/write-file-K6R5F3IZ.js +0 -66
  335. package/web-shell/assets/channel-4N2UIFcG.js +0 -1
  336. package/web-shell/assets/classDiagram-4FO5ZUOK-Q4dYOtsh.js +0 -1
  337. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Q4dYOtsh.js +0 -1
  338. package/web-shell/assets/index-B7jzUZ_s.css +0 -5
  339. package/web-shell/assets/index-gE8OWwj_.js +0 -1197
  340. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-xXU_zO2Z.js +0 -1
  341. package/chunks/{chunk-QZJY47IE.js → chunk-PEJWA3QQ.js} +5 -5
@@ -20,6 +20,9 @@ import {
20
20
  MID_TURN_QUEUE_DRAIN_METHOD,
21
21
  TODO_STOP_GUARD_QUEUE_RELEASE_METHOD
22
22
  } from "./chunk-QR6U5QPP.js";
23
+ import {
24
+ defaultSpawnChannelFactory
25
+ } from "./chunk-CV63PP6U.js";
23
26
  import {
24
27
  BranchWhilePromptActiveError,
25
28
  CancelSentinelCollisionError,
@@ -31,7 +34,6 @@ import {
31
34
  InvalidSessionScopeError,
32
35
  MCP_RESTART_SERVER_DEADLINE_MS,
33
36
  PermissionForbiddenError,
34
- PromptDeadlineExceededError,
35
37
  PromptQueueFullError,
36
38
  RestoreInProgressError,
37
39
  SessionBusyError,
@@ -41,10 +43,7 @@ import {
41
43
  SessionShellDisabledError,
42
44
  WorkspaceMismatchError,
43
45
  isNotCurrentlyGeneratingCancelError
44
- } from "./chunk-UH3WSE5L.js";
45
- import {
46
- defaultSpawnChannelFactory
47
- } from "./chunk-K6YXJ3J5.js";
46
+ } from "./chunk-X6YQWCIJ.js";
48
47
  import {
49
48
  BridgeChannelClosedError,
50
49
  BridgeTimeoutError,
@@ -53,16 +52,15 @@ import {
53
52
  STATUS_SCHEMA_VERSION,
54
53
  createIdleWorkspaceExtensionsStatus,
55
54
  createIdleWorkspaceHooksStatus
56
- } from "./chunk-BLTELXOK.js";
55
+ } from "./chunk-VDWBQ5AW.js";
56
+ import {
57
+ canonicalizeWorkspace
58
+ } from "./chunk-W7FJ3N32.js";
57
59
  import {
58
60
  ClientSideConnection,
59
61
  PROTOCOL_VERSION,
60
62
  RequestError
61
63
  } from "./chunk-UDXSXLER.js";
62
- import {
63
- canonicalizeWorkspace,
64
- translateAndCheckAbsoluteWorkspacePath
65
- } from "./chunk-2RFKHEXL.js";
66
64
  import {
67
65
  SESSION_ARTIFACT_PERSISTENCE_VERSION,
68
66
  ShellExecutionService,
@@ -74,11 +72,11 @@ import {
74
72
  metadataBudgetBytes,
75
73
  normalizeSnapshotPayload,
76
74
  stableSessionArtifactId
77
- } from "./chunk-Z2FTZM4Z.js";
75
+ } from "./chunk-KX6UK4VJ.js";
78
76
  import {
79
77
  DAEMON_TRACEPARENT_META_KEY,
80
78
  DAEMON_TRACESTATE_META_KEY
81
- } from "./chunk-D7ZI5C7O.js";
79
+ } from "./chunk-ZFKNWQGQ.js";
82
80
  import {
83
81
  init_esbuild_shims
84
82
  } from "./chunk-5O2XNYP6.js";
@@ -5042,12 +5040,6 @@ function isRecord3(value) {
5042
5040
  return typeof value === "object" && value !== null && !Array.isArray(value);
5043
5041
  }
5044
5042
  __name(isRecord3, "isRecord");
5045
- function isDefinitiveAcpRequestError(error) {
5046
- if (error instanceof RequestError) return true;
5047
- if (!isRecord3(error)) return false;
5048
- return typeof error["code"] === "number" && Number.isInteger(error["code"]) && typeof error["message"] === "string";
5049
- }
5050
- __name(isDefinitiveAcpRequestError, "isDefinitiveAcpRequestError");
5051
5043
  function getCanonicalModelId(response, fallback) {
5052
5044
  if (!isRecord3(response) || !isRecord3(response["_meta"])) return fallback;
5053
5045
  const modelSwitch = response["_meta"]["qwenModelSwitch"];
@@ -5407,57 +5399,6 @@ function broadcastTurnError(entry, sessionId, err, promptId, originatorClientId)
5407
5399
  }
5408
5400
  }
5409
5401
  __name(broadcastTurnError, "broadcastTurnError");
5410
- function publishPromptTerminal(entry, pendingEntry, terminal) {
5411
- if (pendingEntry.terminalPublished) {
5412
- writeStderrLine(
5413
- `publishPromptTerminal: suppressed duplicate ${terminal.kind} terminal for prompt ${pendingEntry.promptId} (session ${entry.sessionId})`
5414
- );
5415
- return;
5416
- }
5417
- pendingEntry.terminalPublished = true;
5418
- const originatorClientId = pendingEntry.originatorClientId;
5419
- if (terminal.kind === "complete") {
5420
- broadcastTurnComplete(
5421
- entry,
5422
- entry.sessionId,
5423
- terminal.result,
5424
- pendingEntry.promptId,
5425
- originatorClientId
5426
- );
5427
- } else if (terminal.kind === "cancelled") {
5428
- broadcastTurnComplete(
5429
- entry,
5430
- entry.sessionId,
5431
- { stopReason: "cancelled" },
5432
- pendingEntry.promptId,
5433
- originatorClientId
5434
- );
5435
- } else {
5436
- broadcastTurnError(
5437
- entry,
5438
- entry.sessionId,
5439
- terminal.err,
5440
- pendingEntry.promptId,
5441
- originatorClientId
5442
- );
5443
- }
5444
- }
5445
- __name(publishPromptTerminal, "publishPromptTerminal");
5446
- function flushPromptTerminals(entry, code, message) {
5447
- for (const pending of [...entry.pendingPromptList]) {
5448
- publishPromptTerminal(entry, pending, {
5449
- kind: "error",
5450
- err: { code, message }
5451
- });
5452
- try {
5453
- pending.abortController.abort(
5454
- new DOMException("Prompt aborted", "AbortError")
5455
- );
5456
- } catch {
5457
- }
5458
- }
5459
- }
5460
- __name(flushPromptTerminals, "flushPromptTerminals");
5461
5402
  function hasControlCharacter2(value) {
5462
5403
  for (let i = 0; i < value.length; i += 1) {
5463
5404
  const code = value.charCodeAt(i);
@@ -5617,18 +5558,6 @@ function createAcpSessionBridge(opts) {
5617
5558
  lastActivityTimestamp = Date.now();
5618
5559
  }
5619
5560
  __name(touchActivity, "touchActivity");
5620
- function settleActivePromptState(entry, promptId) {
5621
- if (entry.activePromptId !== promptId) return;
5622
- delete entry.activePromptId;
5623
- delete entry.activePromptOriginatorClientId;
5624
- if (entry.promptActive) {
5625
- entry.promptActive = false;
5626
- activePromptCounter--;
5627
- entry.sessionLastSeenAt = Date.now();
5628
- touchActivity();
5629
- }
5630
- }
5631
- __name(settleActivePromptState, "settleActivePromptState");
5632
5561
  function resolvePositiveFiniteMs(raw, fallback) {
5633
5562
  if (raw === void 0) return fallback;
5634
5563
  return raw > 0 && Number.isFinite(raw) ? Math.min(raw, 2147483647) : 0;
@@ -5745,7 +5674,7 @@ function createAcpSessionBridge(opts) {
5745
5674
  if (shuttingDown) return;
5746
5675
  const now = Date.now();
5747
5676
  for (const [id, entry] of byId) {
5748
- if (entry.pendingPromptCount > 0) continue;
5677
+ if (entry.promptActive) continue;
5749
5678
  if (entry.events.subscriberCount > 0) continue;
5750
5679
  const lastActive = entry.sessionLastSeenAt ?? Date.parse(entry.createdAt);
5751
5680
  const idle = now - lastActive;
@@ -5802,8 +5731,7 @@ function createAcpSessionBridge(opts) {
5802
5731
  pendingInteractionCount: entry.pendingInteractions.size,
5803
5732
  hasTurnError: entry.turnError !== void 0,
5804
5733
  ...entry.turnError !== void 0 ? { turnError: entry.turnError } : {},
5805
- pendingInteractions: [...entry.pendingInteractions.values()],
5806
- ...entry.worktree ? { worktree: entry.worktree } : {}
5734
+ pendingInteractions: [...entry.pendingInteractions.values()]
5807
5735
  };
5808
5736
  }, "toSessionSummary");
5809
5737
  const permissionConsensusQuorum = opts.permissionConsensusQuorum;
@@ -5865,30 +5793,13 @@ function createAcpSessionBridge(opts) {
5865
5793
  entry.clientIds.set(clientId, count - 1);
5866
5794
  }
5867
5795
  }, "unregisterClient");
5868
- const recordAttachRef = /* @__PURE__ */ __name((entry, clientId) => {
5869
- entry.attachRefs.set(clientId, (entry.attachRefs.get(clientId) ?? 0) + 1);
5870
- }, "recordAttachRef");
5871
- const releaseAttachRef = /* @__PURE__ */ __name((entry, clientId) => {
5872
- const refs = entry.attachRefs.get(clientId);
5873
- if (refs === void 0 || refs <= 0) return false;
5874
- if (refs === 1) {
5875
- entry.attachRefs.delete(clientId);
5876
- } else {
5877
- entry.attachRefs.set(clientId, refs - 1);
5878
- }
5879
- return true;
5880
- }, "releaseAttachRef");
5881
5796
  const rollbackAttachRegistration = /* @__PURE__ */ __name(async (entry, clientId, attachCountDelta = 1) => {
5882
- const released = releaseAttachRef(entry, clientId) ? 1 : 0;
5883
- entry.attachCount = Math.max(
5884
- 0,
5885
- entry.attachCount - (released + (attachCountDelta - 1))
5886
- );
5797
+ entry.attachCount = Math.max(0, entry.attachCount - attachCountDelta);
5887
5798
  unregisterClient(entry, clientId);
5888
5799
  if (entry.spawnOwnerWantedKill && entry.attachCount === 0 && entry.events.subscriberCount === 0) {
5889
5800
  await bridgeApi.killSession(entry.sessionId).catch(() => {
5890
5801
  });
5891
- } else if (entry.clientIds.size === 0 && entry.events.subscriberCount === 0 && entry.pendingPromptCount === 0) {
5802
+ } else if (entry.clientIds.size === 0 && entry.events.subscriberCount === 0 && !entry.promptActive) {
5892
5803
  await closeSessionImpl(entry.sessionId, void 0, {
5893
5804
  reason: "last_client_detached"
5894
5805
  }).catch((err) => {
@@ -6057,11 +5968,6 @@ function createAcpSessionBridge(opts) {
6057
5968
  const sessEntry = byId.get(sid);
6058
5969
  if (!sessEntry) continue;
6059
5970
  cancelPendingForSession(sid);
6060
- flushPromptTerminals(
6061
- sessEntry,
6062
- "channel_closed",
6063
- "agent channel exited before the prompt completed"
6064
- );
6065
5971
  try {
6066
5972
  sessEntry.events.publish({
6067
5973
  type: "session_died",
@@ -6156,7 +6062,7 @@ function createAcpSessionBridge(opts) {
6156
6062
  }
6157
6063
  }
6158
6064
  __name(ensureChannel, "ensureChannel");
6159
- async function doSpawn(modelServiceId, effectiveScope, approvalMode, requestedClientId, onSessionRegistered, parentSessionId, sourceType, sourceId, worktree) {
6065
+ async function doSpawn(modelServiceId, effectiveScope, approvalMode, requestedClientId, onSessionRegistered, parentSessionId, sourceType, sourceId) {
6160
6066
  const channelPath = channelInfo && !channelInfo.isDying ? "reused" : inFlightChannelSpawn ? "joined" : "spawned_on_request";
6161
6067
  const ci = await telemetry.withSpan(
6162
6068
  "channel.wait",
@@ -6217,7 +6123,7 @@ function createAcpSessionBridge(opts) {
6217
6123
  newSessionResp.sessionId,
6218
6124
  boundWorkspace,
6219
6125
  void 0,
6220
- { parentSessionId, sourceType, sourceId, worktree }
6126
+ { parentSessionId, sourceType, sourceId }
6221
6127
  );
6222
6128
  initializedSessionId = entry.sessionId;
6223
6129
  sessionRegistered = true;
@@ -6331,8 +6237,7 @@ function createAcpSessionBridge(opts) {
6331
6237
  ...entry.sourceType ? { sourceType: entry.sourceType } : {},
6332
6238
  ...entry.sourceId !== void 0 ? { sourceId: entry.sourceId } : {},
6333
6239
  ...entry.sourceType ? { sourcePersisted: sourcePersisted === true } : {},
6334
- ...entry.parentSessionId ? { parentSessionPersisted: parentSessionPersisted === true } : {},
6335
- ...entry.worktree ? { worktree: entry.worktree } : {}
6240
+ ...entry.parentSessionId ? { parentSessionPersisted: parentSessionPersisted === true } : {}
6336
6241
  };
6337
6242
  } finally {
6338
6243
  ci.sessionSpawnsInFlight = Math.max(0, ci.sessionSpawnsInFlight - 1);
@@ -6542,11 +6447,10 @@ function createAcpSessionBridge(opts) {
6542
6447
  }
6543
6448
  return entry.transportClosedReject;
6544
6449
  }, "getTransportClosedReject");
6545
- const resolveWorkspaceKey = /* @__PURE__ */ __name((rawWorkspaceCwd) => {
6546
- const workspaceCwd = translateAndCheckAbsoluteWorkspacePath(rawWorkspaceCwd);
6547
- if (workspaceCwd === null) {
6450
+ const resolveWorkspaceKey = /* @__PURE__ */ __name((workspaceCwd) => {
6451
+ if (!path3.isAbsolute(workspaceCwd)) {
6548
6452
  throw new Error(
6549
- `workspaceCwd must be an absolute path; got "${rawWorkspaceCwd}"`
6453
+ `workspaceCwd must be an absolute path; got "${workspaceCwd}"`
6550
6454
  );
6551
6455
  }
6552
6456
  const workspaceKey = workspaceCwd === boundWorkspace ? boundWorkspace : canonicalizeWorkspace(workspaceCwd);
@@ -6785,18 +6689,12 @@ function createAcpSessionBridge(opts) {
6785
6689
  return;
6786
6690
  }
6787
6691
  try {
6788
- const closeRequest = entry.connection.extMethod(
6789
- SERVE_CONTROL_EXT_METHODS.sessionClose,
6790
- {
6791
- sessionId: entry.sessionId,
6792
- drainTimeoutMs: Math.max(1, Math.floor(initTimeoutMs * 0.8)),
6793
- ...opts2?.requireFlush === true ? { requireFlush: true } : {}
6794
- }
6795
- );
6796
- const observedCloseRequest = opts2?.timeoutMs ? withTimeout(closeRequest, opts2.timeoutMs, label) : closeRequest;
6797
6692
  await Promise.race([
6798
- opts2?.throwOnFailure === true ? observedCloseRequest : withTimeout(
6799
- observedCloseRequest,
6693
+ withTimeout(
6694
+ entry.connection.extMethod(SERVE_CONTROL_EXT_METHODS.sessionClose, {
6695
+ sessionId: entry.sessionId,
6696
+ ...opts2?.requireFlush === true ? { requireFlush: true } : {}
6697
+ }),
6800
6698
  initTimeoutMs,
6801
6699
  SERVE_CONTROL_EXT_METHODS.sessionClose
6802
6700
  ),
@@ -6952,7 +6850,6 @@ function createAcpSessionBridge(opts) {
6952
6850
  ...options.parentSessionId ? { parentSessionId: options.parentSessionId } : {},
6953
6851
  ...options.sourceType ? { sourceType: options.sourceType } : {},
6954
6852
  ...options.sourceId !== void 0 ? { sourceId: options.sourceId } : {},
6955
- ...options.worktree ? { worktree: options.worktree } : {},
6956
6853
  channel: ci.channel,
6957
6854
  connection: ci.connection,
6958
6855
  events,
@@ -6962,7 +6859,6 @@ function createAcpSessionBridge(opts) {
6962
6859
  persistence: createSessionArtifactPersistence(ci.connection, sessionId)
6963
6860
  }),
6964
6861
  recordingDegraded: false,
6965
- closing: false,
6966
6862
  promptQueue: Promise.resolve(),
6967
6863
  pendingPromptCount: 0,
6968
6864
  pendingPromptList: [],
@@ -6976,7 +6872,6 @@ function createAcpSessionBridge(opts) {
6976
6872
  clientIds: /* @__PURE__ */ new Map(),
6977
6873
  clientLastSeenAt: /* @__PURE__ */ new Map(),
6978
6874
  attachCount: 0,
6979
- attachRefs: /* @__PURE__ */ new Map(),
6980
6875
  spawnOwnerWantedKill: false,
6981
6876
  promptActive: false,
6982
6877
  retryAllowed: false
@@ -7179,15 +7074,8 @@ function createAcpSessionBridge(opts) {
7179
7074
  const historyReplay = action === "load" ? req.historyReplay ?? "stream" : "stream";
7180
7075
  const existing = byId.get(req.sessionId);
7181
7076
  if (existing) {
7182
- if (existing.closing) {
7183
- throw new SessionNotFoundError(
7184
- req.sessionId,
7185
- "The session is closing; retry after close completes"
7186
- );
7187
- }
7188
7077
  existing.attachCount++;
7189
7078
  const clientId = registerClient(existing, req.clientId);
7190
- recordAttachRef(existing, clientId);
7191
7079
  if (req.approvalMode) {
7192
7080
  await applyApprovalModeForAttach(existing, req.approvalMode, clientId);
7193
7081
  }
@@ -7232,7 +7120,6 @@ function createAcpSessionBridge(opts) {
7232
7120
  );
7233
7121
  }
7234
7122
  const clientId = registerClient(entry, req.clientId);
7235
- recordAttachRef(entry, clientId);
7236
7123
  if (req.approvalMode) {
7237
7124
  await applyApprovalModeForAttach(entry, req.approvalMode, clientId);
7238
7125
  }
@@ -7354,7 +7241,6 @@ function createAcpSessionBridge(opts) {
7354
7241
  restoreEvents.close();
7355
7242
  racedEntry.attachCount += 1 + coalesceState.count;
7356
7243
  const clientId2 = registerClient(racedEntry, req.clientId);
7357
- recordAttachRef(racedEntry, clientId2);
7358
7244
  if (req.approvalMode) {
7359
7245
  try {
7360
7246
  await applyApprovalMode(
@@ -7501,17 +7387,10 @@ function createAcpSessionBridge(opts) {
7501
7387
  async function closeSessionImpl(sessionId, context, closeOpts) {
7502
7388
  const entry = byId.get(sessionId);
7503
7389
  if (!entry) throw new SessionNotFoundError(sessionId);
7504
- if (entry.closing) {
7505
- throw new SessionNotFoundError(
7506
- sessionId,
7507
- "The session is already closing"
7508
- );
7509
- }
7510
7390
  let originatorClientId;
7511
7391
  if (context?.clientId !== void 0) {
7512
7392
  originatorClientId = resolveTrustedClientId(entry, context.clientId);
7513
7393
  }
7514
- entry.closing = true;
7515
7394
  const reason = closeOpts?.reason ?? "client_close";
7516
7395
  writeStderrLine(
7517
7396
  `qwen serve: closing session ${JSON.stringify(sessionId)} (reason: ${reason})` + (originatorClientId ? ` by client ${JSON.stringify(originatorClientId)}` : "")
@@ -7521,37 +7400,26 @@ function createAcpSessionBridge(opts) {
7521
7400
  "session.id": sessionId,
7522
7401
  "session.close.reason": reason
7523
7402
  });
7403
+ if (defaultEntry === entry) defaultEntry = void 0;
7524
7404
  const ci = channelInfoForEntry(entry);
7525
7405
  if (!ci) {
7526
7406
  writeStderrLine(
7527
7407
  `qwen serve: closeSession channelInfoForEntry returned undefined for session ${JSON.stringify(sessionId)} \u2014 channel cleanup skipped (entry's channel already torn down)`
7528
7408
  );
7529
7409
  }
7530
- try {
7531
- permissionMediator.forgetSession(sessionId);
7532
- entry.pendingPermissionIds.clear();
7533
- entry.pendingInteractions.clear();
7410
+ const requireAgentClose = closeOpts?.requireAgentClose === true;
7411
+ if (requireAgentClose) {
7534
7412
  await notifyAgentSessionClose(entry, ci, "closeSession", {
7535
7413
  throwOnFailure: true,
7536
- requireFlush: closeOpts?.requireAgentClose === true
7414
+ requireFlush: true
7537
7415
  });
7538
- } catch (error) {
7539
- if (isDefinitiveAcpRequestError(error)) {
7540
- entry.closing = false;
7541
- } else if (ci) {
7542
- await killChannelWithLog(
7543
- ci,
7544
- `recover unknown close outcome for session ${JSON.stringify(sessionId)}`
7545
- );
7546
- } else {
7547
- entry.closing = false;
7548
- }
7549
- throw error;
7550
7416
  }
7551
- if (defaultEntry === entry) defaultEntry = void 0;
7552
7417
  if (ci && ci.channel === entry.channel) {
7553
7418
  ci.sessionIds.delete(sessionId);
7554
7419
  }
7420
+ permissionMediator.forgetSession(sessionId);
7421
+ entry.pendingPermissionIds.clear();
7422
+ entry.pendingInteractions.clear();
7555
7423
  if (entry.promptActive) {
7556
7424
  entry.promptActive = false;
7557
7425
  activePromptCounter--;
@@ -7566,11 +7434,6 @@ function createAcpSessionBridge(opts) {
7566
7434
  reason
7567
7435
  });
7568
7436
  ci?.client.markSessionClosed(sessionId);
7569
- flushPromptTerminals(
7570
- entry,
7571
- "session_closed",
7572
- "session closed before the prompt completed"
7573
- );
7574
7437
  try {
7575
7438
  entry.events.publish({
7576
7439
  type: "session_closed",
@@ -7588,6 +7451,9 @@ function createAcpSessionBridge(opts) {
7588
7451
  } catch {
7589
7452
  }
7590
7453
  entry.events.close();
7454
+ if (!requireAgentClose) {
7455
+ await notifyAgentSessionClose(entry, ci, "closeSession");
7456
+ }
7591
7457
  try {
7592
7458
  await telemetry.withSpan(
7593
7459
  "session.close.cancel_active_prompt",
@@ -7702,15 +7568,8 @@ function createAcpSessionBridge(opts) {
7702
7568
  if (effectiveScope === "single") {
7703
7569
  const existing = defaultEntry;
7704
7570
  if (existing) {
7705
- if (existing.closing) {
7706
- throw new SessionNotFoundError(
7707
- existing.sessionId,
7708
- "The session is closing; retry after close completes"
7709
- );
7710
- }
7711
7571
  existing.attachCount++;
7712
7572
  const clientId = registerClient(existing, req.clientId);
7713
- recordAttachRef(existing, clientId);
7714
7573
  if (req.modelServiceId) {
7715
7574
  await applyModelServiceId(
7716
7575
  existing,
@@ -7750,7 +7609,6 @@ function createAcpSessionBridge(opts) {
7750
7609
  );
7751
7610
  }
7752
7611
  const clientId = registerClient(attachedEntry, req.clientId);
7753
- recordAttachRef(attachedEntry, clientId);
7754
7612
  if (req.modelServiceId) {
7755
7613
  await applyModelServiceId(
7756
7614
  attachedEntry,
@@ -7796,8 +7654,7 @@ function createAcpSessionBridge(opts) {
7796
7654
  releaseAdmissionOnce,
7797
7655
  req.parentSessionId,
7798
7656
  source.sourceType,
7799
- source.sourceId,
7800
- req.worktree
7657
+ source.sourceId
7801
7658
  );
7802
7659
  const tracker = effectiveScope === "single" ? workspaceKey : `${workspaceKey}#${randomUUID2()}`;
7803
7660
  inFlightSpawns.set(tracker, promise);
@@ -7819,14 +7676,6 @@ function createAcpSessionBridge(opts) {
7819
7676
  const queuedAt = Date.now();
7820
7677
  const entry = byId.get(sessionId);
7821
7678
  if (!entry) return Promise.reject(new SessionNotFoundError(sessionId));
7822
- if (entry.closing) {
7823
- return Promise.reject(
7824
- new SessionNotFoundError(
7825
- sessionId,
7826
- "The session is closing; retry after close completes"
7827
- )
7828
- );
7829
- }
7830
7679
  const originatorClientId = resolveTrustedClientId(
7831
7680
  entry,
7832
7681
  context?.clientId
@@ -7871,37 +7720,6 @@ function createAcpSessionBridge(opts) {
7871
7720
  state: isQueued ? "queued" : "running"
7872
7721
  };
7873
7722
  entry.pendingPromptList.push(pendingEntry);
7874
- const deadlineMs = context?.deadlineMs;
7875
- const hasDeadline = typeof deadlineMs === "number" && Number.isFinite(deadlineMs) && deadlineMs > 0;
7876
- let deadlineReject;
7877
- let deadlinePromise;
7878
- let deadlineTimer;
7879
- if (hasDeadline) {
7880
- deadlinePromise = new Promise((_resolve, reject) => {
7881
- deadlineReject = reject;
7882
- });
7883
- deadlinePromise.catch(() => {
7884
- });
7885
- const onDeadline = /* @__PURE__ */ __name(() => {
7886
- if (pendingEntry.terminalPublished) return;
7887
- const deadlineErr = new PromptDeadlineExceededError(deadlineMs);
7888
- writeStderrLine(
7889
- `sendPrompt: prompt ${promptId} exceeded ${deadlineMs}ms deadline for session ${sessionId}; agent may still be executing`
7890
- );
7891
- publishPromptTerminal(entry, pendingEntry, {
7892
- kind: "error",
7893
- err: {
7894
- code: "prompt_deadline_exceeded",
7895
- message: deadlineErr.message
7896
- }
7897
- });
7898
- settleActivePromptState(entry, pendingEntry.promptId);
7899
- deadlineReject?.(deadlineErr);
7900
- pendingAbort.abort(deadlineErr);
7901
- }, "onDeadline");
7902
- deadlineTimer = setTimeout(onDeadline, deadlineMs);
7903
- deadlineTimer.unref();
7904
- }
7905
7723
  if (isQueued) {
7906
7724
  pendingAbort.signal.addEventListener(
7907
7725
  "abort",
@@ -8019,17 +7837,35 @@ function createAcpSessionBridge(opts) {
8019
7837
  );
8020
7838
  }
8021
7839
  } catch (echoErr) {
8022
- settleActivePromptState(entry, pendingEntry.promptId);
7840
+ delete entry.activePromptId;
7841
+ delete entry.activePromptOriginatorClientId;
7842
+ if (entry.promptActive) {
7843
+ entry.promptActive = false;
7844
+ activePromptCounter--;
7845
+ touchActivity();
7846
+ }
8023
7847
  throw echoErr;
8024
7848
  }
8025
7849
  const promptPromise = entry.connection.prompt(promptRequest).finally(() => {
8026
- settleActivePromptState(entry, pendingEntry.promptId);
7850
+ if (entry.promptActive) {
7851
+ entry.promptActive = false;
7852
+ activePromptCounter--;
7853
+ entry.sessionLastSeenAt = Date.now();
7854
+ touchActivity();
7855
+ }
7856
+ delete entry.activePromptId;
7857
+ delete entry.activePromptOriginatorClientId;
7858
+ if (entry.clientIds.size === 0 && entry.events.subscriberCount === 0 && byId.has(sessionId)) {
7859
+ void closeSessionImpl(sessionId, void 0, {
7860
+ reason: "last_client_detached"
7861
+ }).catch((err) => {
7862
+ writeStderrLine(
7863
+ `qwen serve: deferred close-on-prompt-complete failed for ${JSON.stringify(sessionId)}: ${err instanceof Error ? err.stack ?? err.message : String(err)}`
7864
+ );
7865
+ });
7866
+ }
8027
7867
  });
8028
- const racedPromise = deadlinePromise ? Promise.race([
8029
- promptPromise,
8030
- getTransportClosedReject(entry),
8031
- deadlinePromise
8032
- ]) : Promise.race([
7868
+ const racedPromise = Promise.race([
8033
7869
  promptPromise,
8034
7870
  getTransportClosedReject(entry)
8035
7871
  ]);
@@ -8037,9 +7873,6 @@ function createAcpSessionBridge(opts) {
8037
7873
  () => {
8038
7874
  },
8039
7875
  (err) => {
8040
- if (err instanceof PromptDeadlineExceededError) {
8041
- return;
8042
- }
8043
7876
  if (err instanceof DOMException && err.name === "AbortError" && pendingEntry.state === "queued") {
8044
7877
  writeStderrLine(
8045
7878
  `sendPrompt: queued prompt removed before agent forward for session ${sessionId}`
@@ -8102,17 +7935,23 @@ function createAcpSessionBridge(opts) {
8102
7935
  );
8103
7936
  result.then(
8104
7937
  (promptResult) => {
8105
- publishPromptTerminal(entry, pendingEntry, {
8106
- kind: "complete",
8107
- result: promptResult
8108
- });
7938
+ broadcastTurnComplete(
7939
+ entry,
7940
+ sessionId,
7941
+ promptResult,
7942
+ pendingEntry.promptId,
7943
+ originatorClientId
7944
+ );
8109
7945
  },
8110
7946
  (err) => {
8111
- if (err instanceof DOMException && err.name === "AbortError") {
8112
- publishPromptTerminal(entry, pendingEntry, { kind: "cancelled" });
8113
- return;
8114
- }
8115
- publishPromptTerminal(entry, pendingEntry, { kind: "error", err });
7947
+ if (err instanceof DOMException && err.name === "AbortError") return;
7948
+ broadcastTurnError(
7949
+ entry,
7950
+ sessionId,
7951
+ err,
7952
+ pendingEntry.promptId,
7953
+ originatorClientId
7954
+ );
8116
7955
  }
8117
7956
  );
8118
7957
  entry.promptQueue = result.then(
@@ -8120,7 +7959,6 @@ function createAcpSessionBridge(opts) {
8120
7959
  () => void 0
8121
7960
  );
8122
7961
  result.finally(() => {
8123
- if (deadlineTimer !== void 0) clearTimeout(deadlineTimer);
8124
7962
  const listIdx = entry.pendingPromptList.indexOf(pendingEntry);
8125
7963
  if (listIdx !== -1) {
8126
7964
  entry.pendingPromptList.splice(listIdx, 1);
@@ -8147,15 +7985,6 @@ function createAcpSessionBridge(opts) {
8147
7985
  );
8148
7986
  entry.midTurnMessageQueue.length = 0;
8149
7987
  }
8150
- if (entry.clientIds.size === 0 && entry.events.subscriberCount === 0 && entry.pendingPromptCount === 0 && byId.get(sessionId) === entry) {
8151
- void closeSessionImpl(sessionId, void 0, {
8152
- reason: "last_client_detached"
8153
- }).catch((err) => {
8154
- writeStderrLine(
8155
- `qwen serve: deferred close-on-prompt-complete failed for ${JSON.stringify(sessionId)}: ${err instanceof Error ? err.stack ?? err.message : String(err)}`
8156
- );
8157
- });
8158
- }
8159
7988
  }).catch(() => {
8160
7989
  });
8161
7990
  return result;
@@ -8431,8 +8260,7 @@ function createAcpSessionBridge(opts) {
8431
8260
  SERVE_CONTROL_EXT_METHODS.sessionCd,
8432
8261
  {
8433
8262
  sessionId,
8434
- path: req.path,
8435
- ...req.allowedRoots ? { allowedRoots: req.allowedRoots } : {}
8263
+ path: req.path
8436
8264
  }
8437
8265
  );
8438
8266
  const extResult = raw;
@@ -8468,12 +8296,6 @@ function createAcpSessionBridge(opts) {
8468
8296
  );
8469
8297
  return { sessionId, ...result };
8470
8298
  },
8471
- setSessionWorktree(sessionId, worktree) {
8472
- const entry = byId.get(sessionId);
8473
- if (entry) {
8474
- entry.worktree = worktree;
8475
- }
8476
- },
8477
8299
  async closeSession(sessionId, context, closeOpts) {
8478
8300
  return closeSessionImpl(sessionId, context, closeOpts);
8479
8301
  },
@@ -9304,9 +9126,6 @@ function createAcpSessionBridge(opts) {
9304
9126
  });
9305
9127
  } catch {
9306
9128
  }
9307
- if (target.state === "queued") {
9308
- publishPromptTerminal(entry, target, { kind: "cancelled" });
9309
- }
9310
9129
  return { removed: true };
9311
9130
  },
9312
9131
  enqueueMidTurnMessage(sessionId, message, context) {
@@ -9554,9 +9373,6 @@ function createAcpSessionBridge(opts) {
9554
9373
  async rewindSession(sessionId, req, context) {
9555
9374
  const entry = byId.get(sessionId);
9556
9375
  if (!entry) throw new SessionNotFoundError(sessionId);
9557
- if (entry.closing) {
9558
- throw new SessionNotFoundError(sessionId, "The session is closing");
9559
- }
9560
9376
  const info = channelInfoForEntry(entry);
9561
9377
  if (!info || info.isDying) throw new SessionNotFoundError(sessionId);
9562
9378
  const originatorClientId = resolveTrustedClientId(
@@ -9868,41 +9684,9 @@ function createAcpSessionBridge(opts) {
9868
9684
  entry.spawnOwnerWantedKill = true;
9869
9685
  return false;
9870
9686
  }
9871
- if (entry.closing) {
9872
- const closingChannel = channelInfoForEntry(entry);
9873
- if (!closingChannel) return false;
9874
- await killChannelWithLog(
9875
- closingChannel,
9876
- `force kill closing session ${JSON.stringify(sessionId)}`
9877
- );
9878
- return true;
9879
- }
9880
- entry.closing = true;
9881
- const ci = channelInfoForEntry(entry);
9882
- if (!ci) {
9883
- writeStderrLine(
9884
- `qwen serve: killSession channelInfoForEntry returned undefined for session ${JSON.stringify(sessionId)} \u2014 channel cleanup skipped (entry's channel already torn down)`
9885
- );
9886
- }
9887
9687
  permissionMediator.forgetSession(sessionId);
9888
9688
  entry.pendingPermissionIds.clear();
9889
9689
  entry.pendingInteractions.clear();
9890
- try {
9891
- await notifyAgentSessionClose(entry, ci, "killSession", {
9892
- throwOnFailure: true,
9893
- timeoutMs: initTimeoutMs
9894
- });
9895
- } catch (error) {
9896
- if (ci) {
9897
- await killChannelWithLog(
9898
- ci,
9899
- `force kill session ${JSON.stringify(sessionId)}`
9900
- );
9901
- return true;
9902
- }
9903
- entry.closing = false;
9904
- throw error;
9905
- }
9906
9690
  if (entry.promptActive) {
9907
9691
  entry.promptActive = false;
9908
9692
  activePromptCounter--;
@@ -9917,15 +9701,17 @@ function createAcpSessionBridge(opts) {
9917
9701
  workspaceCwd: entry.workspaceCwd,
9918
9702
  reason: "killed"
9919
9703
  });
9704
+ const ci = channelInfoForEntry(entry);
9705
+ if (!ci) {
9706
+ writeStderrLine(
9707
+ `qwen serve: killSession channelInfoForEntry returned undefined for session ${JSON.stringify(sessionId)} \u2014 channel cleanup skipped (entry's channel already torn down)`
9708
+ );
9709
+ }
9920
9710
  if (ci && ci.channel === entry.channel) {
9921
9711
  ci.sessionIds.delete(sessionId);
9922
9712
  }
9713
+ await notifyAgentSessionClose(entry, ci, "killSession");
9923
9714
  ci?.client.markSessionClosed(sessionId);
9924
- flushPromptTerminals(
9925
- entry,
9926
- "session_killed",
9927
- "session killed before the prompt completed"
9928
- );
9929
9715
  try {
9930
9716
  entry.events.publish({
9931
9717
  type: "session_died",
@@ -9945,14 +9731,12 @@ function createAcpSessionBridge(opts) {
9945
9731
  async detachClient(sessionId, clientId) {
9946
9732
  const entry = byId.get(sessionId);
9947
9733
  if (!entry) return;
9948
- if (clientId !== void 0 && releaseAttachRef(entry, clientId)) {
9949
- if (entry.attachCount > 0) entry.attachCount--;
9950
- }
9734
+ if (entry.attachCount > 0) entry.attachCount--;
9951
9735
  unregisterClient(entry, clientId);
9952
9736
  if (entry.spawnOwnerWantedKill && entry.attachCount === 0 && entry.events.subscriberCount === 0) {
9953
9737
  await this.killSession(sessionId).catch(() => {
9954
9738
  });
9955
- } else if (entry.clientIds.size === 0 && entry.events.subscriberCount === 0 && entry.pendingPromptCount === 0) {
9739
+ } else if (entry.clientIds.size === 0 && entry.events.subscriberCount === 0 && !entry.promptActive) {
9956
9740
  await closeSessionImpl(sessionId, void 0, {
9957
9741
  reason: "last_client_detached"
9958
9742
  }).catch((err) => {
@@ -10016,11 +9800,6 @@ function createAcpSessionBridge(opts) {
10016
9800
  workspaceCwd: e.workspaceCwd,
10017
9801
  reason: shutdownReason
10018
9802
  });
10019
- flushPromptTerminals(
10020
- e,
10021
- "daemon_shutdown",
10022
- "daemon shut down before the prompt completed"
10023
- );
10024
9803
  try {
10025
9804
  e.events.publish({
10026
9805
  type: "session_died",