@qwen-code/qwen-code 0.22.2 → 0.22.3

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 (324) hide show
  1. package/bundled/computer-use/SKILL.md +3 -3
  2. package/bundled/qc-helper/docs/configuration/settings.md +37 -36
  3. package/bundled/qc-helper/docs/features/channels/dws.md +2 -0
  4. package/bundled/qc-helper/docs/features/channels/overview.md +34 -3
  5. package/bundled/qc-helper/docs/features/code-review.md +3 -3
  6. package/bundled/qc-helper/docs/features/computer-use.md +2 -2
  7. package/bundled/qc-helper/docs/features/tool-use-summaries.md +1 -1
  8. package/bundled/qc-helper/docs/qwen-serve.md +1 -1
  9. package/bundled/review/SKILL.md +81 -31
  10. package/bundled/review/references/persistence.md +7 -3
  11. package/bundled/review/references/posting.md +10 -4
  12. package/chunks/{MaxSizedBox-X5FZSNAJ.js → MaxSizedBox-X42SXBJH.js} +33 -35
  13. package/chunks/{StandaloneSessionPicker-AVLI6VJP.js → StandaloneSessionPicker-2FJAOLGG.js} +51 -53
  14. package/chunks/{acpAgent-MXEAN54C.js → acpAgent-2ZMIJAFV.js} +268 -186
  15. package/chunks/{agent-PJIPDWHB.js → agent-X5WX3L2I.js} +24 -26
  16. package/chunks/{agent-headless-B4JVD7UK.js → agent-headless-IZM25LJA.js} +24 -26
  17. package/chunks/{anthropicContentGenerator-HGMBACVE.js → anthropicContentGenerator-YVTB6QX7.js} +43 -47
  18. package/chunks/{artifact-tool-5YT4QF7Y.js → artifact-tool-XSMPHZBT.js} +9 -1
  19. package/chunks/{bridge-FKZTVIS3.js → bridge-ME6QXZNA.js} +37 -39
  20. package/chunks/{channel-management-service-X4AZ6IXX.js → channel-management-service-HQ6KDS7C.js} +6 -6
  21. package/chunks/{channel-settings-store-4UFCLBBG.js → channel-settings-store-PEOI7XCG.js} +47 -44
  22. package/chunks/{channel-worker-group-27HMGD5S.js → channel-worker-group-6NA6BBZV.js} +5 -5
  23. package/chunks/{channel-worker-manager-QEGX646Z.js → channel-worker-manager-NEZ2J6RK.js} +5 -5
  24. package/chunks/{channel-worker-supervisor-UEW2WWCC.js → channel-worker-supervisor-FKU7DIHJ.js} +4 -4
  25. package/chunks/{chunk-P5GGM4KS.js → chunk-2HYKTO7V.js} +3 -3
  26. package/chunks/{chunk-XDFHY4R3.js → chunk-2LNNVAUV.js} +2 -2
  27. package/chunks/{chunk-ZFKOCECU.js → chunk-2OBKDPZZ.js} +2 -2
  28. package/chunks/{chunk-3DXFGHAJ.js → chunk-2OUD5T67.js} +1 -1
  29. package/chunks/{chunk-EOGELB3H.js → chunk-2SXSLSQE.js} +1 -1
  30. package/chunks/{chunk-4JWNNLPT.js → chunk-2YOHKHYR.js} +2 -2
  31. package/chunks/{chunk-JU4EEXC7.js → chunk-36GSQ3MM.js} +2 -2
  32. package/chunks/chunk-36LGBEM6.js +130 -0
  33. package/chunks/{chunk-H2WDGQ6D.js → chunk-3JXM2CVW.js} +1 -1
  34. package/chunks/{chunk-G34IR3D6.js → chunk-3SZC4VP4.js} +26 -109
  35. package/chunks/{chunk-HVEYF6VT.js → chunk-3WK3QDNV.js} +1 -1
  36. package/chunks/{chunk-5XBFCMWD.js → chunk-3XKLXHGK.js} +17 -9
  37. package/chunks/{chunk-SFPGAQUL.js → chunk-42IDLQWS.js} +24 -18
  38. package/chunks/{chunk-43GGFFLY.js → chunk-4K7KNVWH.js} +1 -1
  39. package/chunks/{chunk-F6FV3C5K.js → chunk-4NDLQAY2.js} +24 -272
  40. package/chunks/{chunk-VVW4ZNFY.js → chunk-4QHPPXK2.js} +15 -7
  41. package/chunks/{chunk-IJKTMLBE.js → chunk-4TT3IVGA.js} +1 -1
  42. package/chunks/{chunk-C6K43ZDE.js → chunk-4VPCTGH6.js} +5 -5
  43. package/chunks/chunk-4VQBQLIZ.js +293 -0
  44. package/chunks/{chunk-OIVXBW3W.js → chunk-62GQFYID.js} +1 -1
  45. package/chunks/{chunk-BRVWYMKV.js → chunk-6MBXY6WM.js} +1 -1
  46. package/chunks/{chunk-AGR5UROZ.js → chunk-6X7EU5TI.js} +17 -29
  47. package/chunks/{chunk-PFCQ62V4.js → chunk-6ZPDLGHN.js} +6 -6
  48. package/chunks/{chunk-RIEFGNTP.js → chunk-734C6JGI.js} +207 -43
  49. package/chunks/{chunk-FBSSIAAQ.js → chunk-73RM4POK.js} +7 -7
  50. package/chunks/{chunk-KGJGEEVR.js → chunk-7FA2II6K.js} +10 -1
  51. package/chunks/chunk-7J6OTNGO.js +424 -0
  52. package/chunks/{chunk-O2UN57NX.js → chunk-7LOELM2I.js} +19 -2
  53. package/chunks/{chunk-DIMEPKCW.js → chunk-7S226YTK.js} +1 -1
  54. package/chunks/{chunk-CPGJJJLU.js → chunk-7T52W4SW.js} +1 -1
  55. package/chunks/{chunk-5O72BNDD.js → chunk-7VMIMAVB.js} +7 -7
  56. package/chunks/{chunk-XRSOI3DL.js → chunk-A3LWD5MK.js} +1 -1
  57. package/chunks/{chunk-F7TNAPZ4.js → chunk-AIAOIFY4.js} +5 -5
  58. package/chunks/{chunk-4CDSK5AZ.js → chunk-AYFA7MZV.js} +2 -2
  59. package/chunks/{chunk-3JGZSIDA.js → chunk-B466ZSHZ.js} +1 -1
  60. package/chunks/{chunk-L6BZRIUL.js → chunk-B5PHIJGI.js} +182 -4
  61. package/chunks/{chunk-3I6UTTDX.js → chunk-BKWNKLZB.js} +19 -19
  62. package/chunks/{chunk-3FDFA4MZ.js → chunk-BOWFGCEU.js} +1 -1
  63. package/chunks/{chunk-3AFMQUTI.js → chunk-C2X7KY45.js} +1 -1
  64. package/chunks/{chunk-FY76G3G5.js → chunk-C3PEFRKD.js} +4 -4
  65. package/chunks/{chunk-FDY5RMGH.js → chunk-CFJY4DGX.js} +1 -1
  66. package/chunks/{chunk-CCBZDVUA.js → chunk-CIZCL2MW.js} +33 -20
  67. package/chunks/{chunk-LDP5OD6N.js → chunk-CLWO3B77.js} +2 -2
  68. package/chunks/chunk-DJBQCO2E.js +842 -0
  69. package/chunks/{chunk-4J657AJR.js → chunk-DJECZIJX.js} +40 -40
  70. package/chunks/{chunk-F5SZP77N.js → chunk-DJEZ55D4.js} +71 -65
  71. package/chunks/{chunk-BAJKAAOY.js → chunk-DJPASAUV.js} +3840 -1055
  72. package/chunks/{chunk-RUGNCYNO.js → chunk-DMLVSW7L.js} +532 -22
  73. package/chunks/{chunk-4FTKQNWJ.js → chunk-DYXFD5RO.js} +181 -2
  74. package/chunks/{chunk-PDMJ3KGS.js → chunk-EB6QRGHM.js} +1 -1
  75. package/chunks/{chunk-DZWPESIF.js → chunk-EFWRMA2I.js} +3 -3
  76. package/chunks/{chunk-4MQEPP3Y.js → chunk-EQSBPBZ3.js} +5 -119
  77. package/chunks/{chunk-Z7TGYN5F.js → chunk-FROAFEFB.js} +2 -2
  78. package/chunks/{chunk-MZS7GEC7.js → chunk-FTF2YIZ5.js} +1 -1
  79. package/chunks/{chunk-Z7VOMGDC.js → chunk-FTJMWDND.js} +0 -24
  80. package/chunks/{chunk-43UYNAWX.js → chunk-G6FECKTJ.js} +2 -2
  81. package/chunks/{chunk-SJ3ZUWFK.js → chunk-GBJBJ4HX.js} +4 -4
  82. package/chunks/{chunk-IOPCFOTF.js → chunk-GPGU4S2N.js} +2 -2
  83. package/chunks/{chunk-6LFJEACX.js → chunk-GVIVASYK.js} +7 -7
  84. package/chunks/{chunk-Z4X5MTRT.js → chunk-HCOBAG2L.js} +2 -4
  85. package/chunks/{chunk-A7YP63XN.js → chunk-HP5LR5HL.js} +5 -5
  86. package/chunks/{chunk-7JPW6IYH.js → chunk-HVC3PNVC.js} +1 -1
  87. package/chunks/{chunk-TRZTNIQ6.js → chunk-I6LYRJPB.js} +2 -2
  88. package/chunks/{chunk-E55H6BZ7.js → chunk-ICURCKIU.js} +1335 -119
  89. package/chunks/{chunk-4HV6HH33.js → chunk-ISKH4QX3.js} +9 -9
  90. package/chunks/{chunk-WKK5BQNP.js → chunk-JHYH6PYQ.js} +43 -420
  91. package/chunks/{chunk-6IUNAPLR.js → chunk-K5KXUXWC.js} +1 -1
  92. package/chunks/{chunk-JHS74YAB.js → chunk-KID24ZFN.js} +1 -1
  93. package/chunks/{chunk-EFUM7RVY.js → chunk-KJO2LBUK.js} +942 -16
  94. package/chunks/{chunk-B7CDU2SL.js → chunk-KYWTPLBJ.js} +17 -20
  95. package/chunks/{chunk-JSHHYW6T.js → chunk-LHBUKJG2.js} +3 -3
  96. package/chunks/{chunk-P2SU6ZTI.js → chunk-LUEHOUHM.js} +1 -1
  97. package/chunks/{chunk-66KDY3LV.js → chunk-M3QRM3DE.js} +1 -1
  98. package/chunks/{chunk-V4QXXQJ2.js → chunk-MF7HCQWZ.js} +2 -2
  99. package/chunks/{chunk-W5MJJ2V7.js → chunk-MK2GIB46.js} +1 -1
  100. package/chunks/{chunk-Y6LSMB6J.js → chunk-MO3FC2WT.js} +1 -1
  101. package/chunks/{chunk-L6YT5H34.js → chunk-MPNBVAEU.js} +4 -4
  102. package/chunks/{chunk-CSMI4FP5.js → chunk-MSBO7X2W.js} +1 -1
  103. package/chunks/{chunk-5PA6UEYA.js → chunk-MZCJWS5Y.js} +1 -1
  104. package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
  105. package/chunks/{chunk-6LFTG244.js → chunk-NMOD2FXQ.js} +15 -5
  106. package/chunks/{chunk-KUX5D6DK.js → chunk-NV55WWD6.js} +11330 -10971
  107. package/chunks/{chunk-Q26AYA62.js → chunk-OU5APVWO.js} +2 -2
  108. package/chunks/{chunk-2K6ORIHJ.js → chunk-P2G476QN.js} +11 -11
  109. package/chunks/{chunk-OIP7C4FE.js → chunk-PADPMMYM.js} +4 -4
  110. package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
  111. package/chunks/{chunk-TGWAQ5RB.js → chunk-PZ66FRIC.js} +2071 -2124
  112. package/chunks/{chunk-7UYV53BC.js → chunk-Q2MSPKIJ.js} +1 -1
  113. package/chunks/{chunk-L2M46FP5.js → chunk-QYMAKPY5.js} +5 -5
  114. package/chunks/{chunk-JVPFTDBK.js → chunk-RFIDDFAL.js} +1 -1
  115. package/chunks/chunk-SEONHUS3.js +275 -0
  116. package/chunks/{chunk-ZGXYO7DY.js → chunk-SS4MRMKE.js} +122 -13
  117. package/chunks/{chunk-T32W2JHI.js → chunk-SS5SDCD3.js} +2 -2
  118. package/chunks/{chunk-3SGB2UHX.js → chunk-ST5MDGH3.js} +23 -11
  119. package/chunks/{chunk-MIIVI25Q.js → chunk-ST5V3ZOC.js} +2 -2
  120. package/chunks/{chunk-4K7NQDCG.js → chunk-T4EFG2P5.js} +18 -9
  121. package/chunks/{chunk-TWSKM647.js → chunk-T7KMERIX.js} +1 -1
  122. package/chunks/{chunk-77RG5SFQ.js → chunk-TEBDFQBZ.js} +1 -1
  123. package/chunks/{chunk-6CGL7E7G.js → chunk-TVC6HQ2U.js} +2 -2
  124. package/chunks/{chunk-BBWV7ONL.js → chunk-TZBSGJ6C.js} +6 -6
  125. package/chunks/{chunk-T3WXYEZ4.js → chunk-U54AYGEC.js} +38 -5
  126. package/chunks/{chunk-JCQD3INC.js → chunk-URE3QBBB.js} +1 -1
  127. package/chunks/{chunk-Y3QL45LS.js → chunk-V4264FEG.js} +8 -8
  128. package/chunks/{chunk-KEKZFOL6.js → chunk-V7EESTJV.js} +1 -1
  129. package/chunks/{chunk-R4PMVSR5.js → chunk-VBCPNIQD.js} +18 -20
  130. package/chunks/{chunk-RJC5EIKY.js → chunk-VGIFXISB.js} +3 -3
  131. package/chunks/{chunk-Z7FLBQPR.js → chunk-W3JH33JE.js} +7 -7
  132. package/chunks/{chunk-K2NQPH5D.js → chunk-WGY3AVGM.js} +3 -3
  133. package/chunks/{chunk-PKAYJDB3.js → chunk-WNPDGUJO.js} +21 -2
  134. package/chunks/{chunk-IZIVM7LZ.js → chunk-WXEA74YB.js} +1 -1
  135. package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
  136. package/chunks/{chunk-IK5BW3CS.js → chunk-XHF7WQ6B.js} +2 -2
  137. package/chunks/{chunk-2NYCN6F2.js → chunk-XSG6G3G6.js} +43 -26
  138. package/chunks/{chunk-HVQ3B7FF.js → chunk-Y5S7LBOZ.js} +43 -6
  139. package/chunks/{chunk-LXIBMVRN.js → chunk-YLSQLSH7.js} +13 -7
  140. package/chunks/{chunk-JSC3H3TD.js → chunk-ZEYFMJQA.js} +14 -6
  141. package/chunks/chunk-ZWJDJ6RU.js +2597 -0
  142. package/chunks/{chunk-QP4C6WCE.js → chunk-ZYMLPEZQ.js} +2 -2
  143. package/chunks/{chunk-BNMF3K5X.js → chunk-ZZMSC3RG.js} +52 -36
  144. package/chunks/{chunk-XDLEZ5HX.js → chunk-ZZUKP7HV.js} +1 -1
  145. package/chunks/{config-utils-BBOCOGZW.js → config-utils-R6M3TA34.js} +39 -39
  146. package/chunks/{contextCommand-EET67MQ2.js → contextCommand-ZCAP23J6.js} +36 -38
  147. package/chunks/{core-runtime-677KFX6Q.js → core-runtime-AXB6SK5D.js} +41 -43
  148. package/chunks/{create-sub-session-JKZAYZX7.js → create-sub-session-4QNE64MR.js} +34 -36
  149. package/chunks/{daemon-MJQUO7RA.js → daemon-3GNHB3M2.js} +495 -7
  150. package/chunks/{daemon-git-worktree-guard-6MVAAZZZ.js → daemon-git-worktree-guard-IVAJJWYK.js} +33 -35
  151. package/chunks/{daemon-status-provider-RFKZOK3S.js → daemon-status-provider-K3SJ5C2U.js} +42 -44
  152. package/chunks/{daemon-trust-policy-DRZPFB4Q.js → daemon-trust-policy-DOR3YG62.js} +41 -43
  153. package/chunks/{daemon-trust-policy-monitor-B5U6TQX5.js → daemon-trust-policy-monitor-KGGROSIV.js} +41 -43
  154. package/chunks/{deferred-core-runtime-BBVIOP24.js → deferred-core-runtime-WOYLUQQ7.js} +33 -35
  155. package/chunks/{dist-DJBNNPLN.js → dist-4WXLCBDR.js} +1 -1
  156. package/chunks/{dist-TJUDJTCB.js → dist-5VXFRTWU.js} +280 -48
  157. package/chunks/{dist-QODVOVWI.js → dist-6BPYWHVD.js} +31 -30
  158. package/chunks/{dist-ZBVOXSKF.js → dist-GFN5DCBX.js} +74 -65
  159. package/chunks/{dist-SATKXKUR.js → dist-HZNT6GQS.js} +1 -1
  160. package/chunks/{dist-ILDBUWDB.js → dist-LVZCXVPF.js} +1 -1
  161. package/chunks/{dist-7CKN54NL.js → dist-N6W6E753.js} +71 -64
  162. package/chunks/{dist-4Q7NTUNB.js → dist-NSV4NBPK.js} +31 -14
  163. package/chunks/{dist-UQUFZDIY.js → dist-SWQMYP2Q.js} +18 -16
  164. package/chunks/{earlyInputCapture-2JOMMNQ4.js → earlyInputCapture-OHBEVO4K.js} +33 -35
  165. package/chunks/{edit-BSV6YRVW.js → edit-LEQLAGPZ.js} +24 -26
  166. package/chunks/{enter-worktree-MQXFFPKM.js → enter-worktree-35QCAAFP.js} +3 -3
  167. package/chunks/{enterPlanMode-PKNF35FE.js → enterPlanMode-ONQN3WHE.js} +27 -29
  168. package/chunks/{environment-MOZMPUHR.js → environment-UANTR7A4.js} +37 -39
  169. package/chunks/{errors-DMPQVYJL.js → errors-WAK6KFBC.js} +36 -38
  170. package/chunks/{exit-worktree-L344UY7K.js → exit-worktree-XQD6D543.js} +3 -3
  171. package/chunks/{exitPlanMode-UE4FGCY4.js → exitPlanMode-UEYBG6P5.js} +24 -26
  172. package/chunks/{fast-path-773PV7PU.js → fast-path-WUL7UZ6H.js} +4 -4
  173. package/chunks/{fast-path-settings-XMFBYFUH.js → fast-path-settings-XH426LUU.js} +3 -3
  174. package/chunks/{glob-CZHOWUEA.js → glob-Y54QUWDY.js} +24 -26
  175. package/chunks/{goal-tools-YZQJXTGH.js → goal-tools-PTD3MBA7.js} +2 -1
  176. package/chunks/{handleAutoUpdate-SGXKTQM6.js → handleAutoUpdate-FP3NWNSG.js} +37 -39
  177. package/chunks/{i18n-B42HKHKH.js → i18n-INIU5X7A.js} +35 -37
  178. package/chunks/{image-gen-HAYOEQ4O.js → image-gen-J6FDGUZP.js} +4 -6
  179. package/chunks/{initializer-FB66WYR3.js → initializer-TYODV6GE.js} +41 -43
  180. package/chunks/{installationInfo-Y7AULNMX.js → installationInfo-AAPKYDSZ.js} +33 -35
  181. package/chunks/{list-2HWGSVRA.js → list-TUODDN6J.js} +44 -46
  182. package/chunks/{gemini-IP4FJAP5.js → llm-NSAVK5V3.js} +84 -82
  183. package/chunks/{geminiContentGenerator-PUNEBWJW.js → llm-content-generator-AY2QKXHE.js} +25 -25
  184. package/chunks/{loadedSettingsAdapter-7Y7IEI6T.js → loadedSettingsAdapter-KJCLZ3C4.js} +41 -43
  185. package/chunks/{loggingContentGenerator-2GGZNGLG.js → loggingContentGenerator-DSFQHXIF.js} +305 -27
  186. package/chunks/{managed-npm-update-5TEV2E3J.js → managed-npm-update-TSWENTK5.js} +33 -35
  187. package/chunks/{mcp-QGG5NMJJ.js → mcp-MWSAPFOL.js} +41 -43
  188. package/chunks/{monitor-FI7PY36Z.js → monitor-RW4GWJHB.js} +24 -26
  189. package/chunks/{nonInteractiveCli-4LO2TL72.js → nonInteractiveCli-JXKL343Q.js} +77 -78
  190. package/chunks/{notebook-edit-TPGMGBST.js → notebook-edit-CQNYS5OR.js} +24 -26
  191. package/chunks/{open-with-auth-4UI3KHUR.js → open-with-auth-YN3QZHVM.js} +1 -1
  192. package/chunks/{openaiContentGenerator-SUCYANUZ.js → openaiContentGenerator-J6QIF7EX.js} +13 -15
  193. package/chunks/{pidfile-JMF2CLMY.js → pidfile-QOIQZFT2.js} +33 -35
  194. package/chunks/process-registry-OAEG6WGC.js +662 -0
  195. package/chunks/{processUtils-IQZBYWSB.js → processUtils-GPHNANKZ.js} +2 -2
  196. package/chunks/{prompt-terminal-ledger-DCZO6S7C.js → prompt-terminal-ledger-FOMFTYOM.js} +34 -36
  197. package/chunks/{qwenContentGenerator-J4TXFGJT.js → qwenContentGenerator-WWDXPYQI.js} +28 -30
  198. package/chunks/{qwenOAuth2-RF33DNZW.js → qwenOAuth2-OF5WRBQT.js} +4 -6
  199. package/chunks/{read-file-QE2B5FTX.js → read-file-FQUQHC6N.js} +5 -5
  200. package/chunks/{record-artifact-RZGZBENU.js → record-artifact-VW23GS4F.js} +2 -2
  201. package/chunks/{report-findings-Q3SYKKW5.js → report-findings-AO5VYFLR.js} +7 -3
  202. package/chunks/{resumeHistoryUtils-CZ4JRDVW.js → resumeHistoryUtils-NSGF3UCB.js} +37 -39
  203. package/chunks/{ripGrep-R6B6HWPX.js → ripGrep-4CAT6SKV.js} +7 -7
  204. package/chunks/{run-qwen-serve-TPHZMSXJ.js → run-qwen-serve-5X6IDZER.js} +271 -86
  205. package/chunks/{runtime-TTIGSBM4.js → runtime-HK27GMPF.js} +46 -48
  206. package/chunks/{scheduled-tasks-QB4ZVUQS.js → scheduled-tasks-MN2ZZ5P6.js} +39 -41
  207. package/chunks/{scheduler-YRUG22M7.js → scheduler-WD4MHMO5.js} +35 -37
  208. package/chunks/{sdk-exporters-http-KCJ4ZFG7.js → sdk-exporters-http-TTU2CHBU.js} +1 -1
  209. package/chunks/{sdk-impl-HLSEDAEP.js → sdk-impl-UUMVYMAL.js} +10 -4
  210. package/chunks/{send-message-Y5I6NYAM.js → send-message-AJ4OCUBV.js} +18 -2
  211. package/chunks/{serve-MXXCDAQN.js → serve-2XCHPPGG.js} +41 -43
  212. package/chunks/{server-DFUSSSHI.js → server-GO2N5DH7.js} +4148 -3348
  213. package/chunks/{session-3TEHNENZ.js → session-IFNHTUBT.js} +81 -82
  214. package/chunks/session-pr-refresh-I3UBWMVP.js +364 -0
  215. package/chunks/{settings-VOZYKLTT.js → settings-L6N54CU6.js} +40 -42
  216. package/chunks/{shell-6RTKZVMI.js → shell-4Y5LLW6N.js} +24 -26
  217. package/chunks/{skill-FEOKFX26.js → skill-YOWTRAKQ.js} +58 -14
  218. package/chunks/{skill-settings-VA4XVYVL.js → skill-settings-ZL4JY5UE.js} +41 -43
  219. package/chunks/{spawnChannel-F6WVP723.js → spawnChannel-ZST6XJVJ.js} +35 -37
  220. package/chunks/{standalone-update-RGILUQVK.js → standalone-update-THVU3OKY.js} +36 -38
  221. package/chunks/{startInteractiveUI-WHJPFOGH.js → startInteractiveUI-XDFSHBZD.js} +401 -334
  222. package/chunks/{stdioHelpers-7A2EE64Z.js → stdioHelpers-AY6XCDY2.js} +3 -1
  223. package/chunks/{task-create-TMSV7RD5.js → task-create-QN4LYRSE.js} +3 -3
  224. package/chunks/{task-list-W55RBFRX.js → task-list-JPLGK45U.js} +2 -2
  225. package/chunks/{task-update-N536I4GQ.js → task-update-IWEOJFV2.js} +3 -3
  226. package/chunks/{team-create-QYSWCYCL.js → team-create-OOPXCDBA.js} +24 -26
  227. package/chunks/{team-delete-FJRFX33M.js → team-delete-RZVVSGCY.js} +2 -2
  228. package/chunks/{team-plan-approval-P7DAD644.js → team-plan-approval-DSX5EWAT.js} +24 -26
  229. package/chunks/{terminal-image-renderer-SMQE46UJ.js → terminal-image-renderer-KS25G33E.js} +33 -35
  230. package/chunks/{theme-manager-RFO5WWFF.js → theme-manager-YMZNG45F.js} +33 -35
  231. package/chunks/{tool-search-F2EMIAPV.js → tool-search-J5Q6U7DN.js} +9 -9
  232. package/chunks/{total-session-admission-HTVTP4BS.js → total-session-admission-PVN64JVV.js} +37 -39
  233. package/chunks/{trustedFolders-7OCNMUQE.js → trustedFolders-FATSC4YI.js} +35 -37
  234. package/chunks/{types-WYCFCEHR.js → types-HKLPXZB3.js} +1 -3
  235. package/chunks/{update-relaunch-4GF3OXMB.js → update-relaunch-SIKHLHVR.js} +6 -6
  236. package/chunks/{updateCheck-7QBDXZRT.js → updateCheck-D3YG2WCD.js} +36 -38
  237. package/chunks/{useAutoAcceptIndicator-UI4SNL2O.js → useAutoAcceptIndicator-ILINOSAS.js} +43 -45
  238. package/chunks/{validateNonInterActiveAuth-BPPA563H.js → validateNonInterActiveAuth-JUDQP6V4.js} +74 -75
  239. package/chunks/{version-ANP4TS6O.js → version-C63GDDWN.js} +1 -1
  240. package/chunks/{web-fetch-QJADSAH3.js → web-fetch-FOQZMNSC.js} +8 -10
  241. package/chunks/{web-search-7TTQKEKM.js → web-search-PUJTBFUC.js} +5 -7
  242. package/chunks/{web-shell-static-A6QMUNNV.js → web-shell-static-HNB4FDOE.js} +2 -2
  243. package/chunks/{workflow-5XN6XSOT.js → workflow-Y5IPINVH.js} +47 -58
  244. package/chunks/{workspace-providers-status-PDFZWL5Q.js → workspace-providers-status-IJ4VHFMB.js} +45 -47
  245. package/chunks/{workspace-registration-store-XKVW2YVH.js → workspace-registration-store-SMJWI2AI.js} +1 -1
  246. package/chunks/{workspace-registry-23R7XRB5.js → workspace-registry-BTGZIMPK.js} +37 -39
  247. package/chunks/{workspace-service-MUYO2QIC.js → workspace-service-SIN67ITC.js} +46 -51
  248. package/chunks/{workspace-skills-status-IKECTOOQ.js → workspace-skills-status-F3RKCUIX.js} +44 -46
  249. package/chunks/{workspace-trust-reconciler-KLGOB53D.js → workspace-trust-reconciler-PLIDLJZX.js} +45 -47
  250. package/chunks/{write-file-GGRBB5TZ.js → write-file-PAIGB33C.js} +26 -28
  251. package/chunks/{zoom-image-6ASG6J4C.js → zoom-image-LYQD7BQA.js} +5 -5
  252. package/cli.js +14 -14
  253. package/package.json +3 -3
  254. package/web-shell/assets/{abnfDiagram-VCTEODGH-uS-vtfs3.js → abnfDiagram-VCTEODGH-TRCMSA_6.js} +1 -1
  255. package/web-shell/assets/{arc-BSTnk5pu.js → arc-D9Uls5b3.js} +1 -1
  256. package/web-shell/assets/{architectureDiagram-5GKGNRK7-DCMyiqzy.js → architectureDiagram-5GKGNRK7-Bwb8jPXg.js} +1 -1
  257. package/web-shell/assets/{blockDiagram-NRAW4CY4-C7_gt0r1.js → blockDiagram-NRAW4CY4-DHj71TSX.js} +1 -1
  258. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BeQg2L8B.js → c4Diagram-UCG6FXSJ-uKBBdbyr.js} +1 -1
  259. package/web-shell/assets/channel-CXjVLaBa.js +1 -0
  260. package/web-shell/assets/{chunk-2Q5K7J3B-DnV9bKBe.js → chunk-2Q5K7J3B-BZd0Phrl.js} +1 -1
  261. package/web-shell/assets/{chunk-5VM5RSS4-rT1GAcT7.js → chunk-5VM5RSS4-7KNeNBqN.js} +1 -1
  262. package/web-shell/assets/{chunk-F27PBJKO-BcgSxqGA.js → chunk-F27PBJKO-BeboS7Fi.js} +1 -1
  263. package/web-shell/assets/{chunk-G27WJ6UU-Bw1ZhyZq.js → chunk-G27WJ6UU-RV3JONoj.js} +1 -1
  264. package/web-shell/assets/{chunk-JWPE2WC7-D4iDw-96.js → chunk-JWPE2WC7-Yw9FCFsP.js} +1 -1
  265. package/web-shell/assets/{chunk-LCL6LL3I-D3MB3GTZ.js → chunk-LCL6LL3I-GIMnydDe.js} +1 -1
  266. package/web-shell/assets/{chunk-POPQ4Y6H-Cep2ndrS.js → chunk-POPQ4Y6H-Cfrux7bL.js} +1 -1
  267. package/web-shell/assets/{chunk-SVP7TREG-BuahMHJc.js → chunk-SVP7TREG-BlvIN0CO.js} +1 -1
  268. package/web-shell/assets/{chunk-XXDRQBXY-BdujIvJY.js → chunk-XXDRQBXY-DMs7Rr4t.js} +1 -1
  269. package/web-shell/assets/classDiagram-DTDB5LWJ-DANEijO3.js +1 -0
  270. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DANEijO3.js +1 -0
  271. package/web-shell/assets/{cose-bilkent-JH36ORCC-CGLLUbF8.js → cose-bilkent-JH36ORCC-DNGqTNwI.js} +1 -1
  272. package/web-shell/assets/{cynefin-OW5HDTMX-D6kDsRSh.js → cynefin-OW5HDTMX-CojMpaoH.js} +1 -1
  273. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CCy78qZx.js → cynefinDiagram-5FMLGOSQ-DF07YXGo.js} +1 -1
  274. package/web-shell/assets/{dagre-3AP2YEHR-D5gJuJsf.js → dagre-3AP2YEHR-17-4WtCH.js} +1 -1
  275. package/web-shell/assets/{diagram-S7CK7UJ4-ZwEZ5W__.js → diagram-S7CK7UJ4-G3Wuyz9m.js} +1 -1
  276. package/web-shell/assets/{diagram-UQ7AKVKN-B036APjv.js → diagram-UQ7AKVKN-nyWIKZ8P.js} +1 -1
  277. package/web-shell/assets/{diagram-VSXAHHWV-BfDJ57Fq.js → diagram-VSXAHHWV-tKHhmYSC.js} +1 -1
  278. package/web-shell/assets/{diagram-VX7I27RA-Wha0p5rT.js → diagram-VX7I27RA-CpDf1hYk.js} +1 -1
  279. package/web-shell/assets/{diagram-Z3DM3KII-L20bz2K1.js → diagram-Z3DM3KII-Cah2IFXG.js} +1 -1
  280. package/web-shell/assets/{ebnfDiagram-PWID7BFC-D1ZM0Cp7.js → ebnfDiagram-PWID7BFC-DNaCkgxy.js} +1 -1
  281. package/web-shell/assets/{erDiagram-SSCWMZ5O-CMtA19v8.js → erDiagram-SSCWMZ5O-CAdRgcf1.js} +1 -1
  282. package/web-shell/assets/{flowDiagram-A5DVABFB-D96m326S.js → flowDiagram-A5DVABFB-CMUJAShL.js} +1 -1
  283. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BuHiYG2o.js → ganttDiagram-EL5Y4UJY-o-_MUNey.js} +1 -1
  284. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Ck3NmkSw.js → gitGraphDiagram-WWUBYQGX-_aG-2Z7O.js} +1 -1
  285. package/web-shell/assets/{index-CBGz4Qjl.js → index-BK_NKxiJ.js} +1 -1
  286. package/web-shell/assets/index-Ci-z4zWY.js +1913 -0
  287. package/web-shell/assets/index-LDlXZRHA.css +36 -0
  288. package/web-shell/assets/{infoDiagram-RXCK75RN-B6DAOyXe.js → infoDiagram-RXCK75RN-qJPeZbGP.js} +1 -1
  289. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-Bpg-joFo.js → ishikawaDiagram-5VMMS53U-7Om4vNo1.js} +1 -1
  290. package/web-shell/assets/{journeyDiagram-EYS64GPL-BclrHzGa.js → journeyDiagram-EYS64GPL-BNtXqmBW.js} +1 -1
  291. package/web-shell/assets/{kanban-definition-3QL26DDD-5gJzNTYG.js → kanban-definition-3QL26DDD-COgFec8P.js} +1 -1
  292. package/web-shell/assets/{layout-CEz_1L8z.js → layout-B9n81PC9.js} +1 -1
  293. package/web-shell/assets/{linear-CBjTq9Hc.js → linear-Bb6nXZQq.js} +1 -1
  294. package/web-shell/assets/{mermaid.core-Dzhbxx_I.js → mermaid.core-Cgrm3JVT.js} +6 -6
  295. package/web-shell/assets/{mindmap-definition-FBJOCRG2-DQdVqlBF.js → mindmap-definition-FBJOCRG2-TKwLTjnG.js} +1 -1
  296. package/web-shell/assets/{pegDiagram-XKGWAZYB-D1JZlYXL.js → pegDiagram-XKGWAZYB-BJPuvlpi.js} +1 -1
  297. package/web-shell/assets/{pieDiagram-E7YTZNPT-BmkpYL0w.js → pieDiagram-E7YTZNPT-D01VkNsW.js} +1 -1
  298. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-DRvD6co5.js → quadrantDiagram-AXDQQJYC-C4hHsiv-.js} +1 -1
  299. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CEdjDuoo.js → railroadDiagram-O6MQD6OU-CuEO4xK2.js} +1 -1
  300. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BCHG-ie8.js → requirementDiagram-EFPCY7ZU-D5J_vIo5.js} +1 -1
  301. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-C9cZMnye.js → sankeyDiagram-P5KCCOFB-DQKY223V.js} +1 -1
  302. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DYHRV4zL.js → sequenceDiagram-WJ2MYXX4-D27YV_cm.js} +1 -1
  303. package/web-shell/assets/{sizeCapture-X5ZJPWSS-DlK21aye.js → sizeCapture-X5ZJPWSS-TJg8UcwV.js} +1 -1
  304. package/web-shell/assets/{stateDiagram-HBIQ2CUA-BrmZssvk.js → stateDiagram-HBIQ2CUA-CmnPzUIx.js} +1 -1
  305. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DNKPyrDc.js +1 -0
  306. package/web-shell/assets/{swimlanes-XN3QIQJK-D9xfcayR.js → swimlanes-XN3QIQJK-ByeP3_Nu.js} +1 -1
  307. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ZL1HPC6w.js +8 -0
  308. package/web-shell/assets/{timeline-definition-24CTP7MA-D4gdDL_d.js → timeline-definition-24CTP7MA-BsFA5juR.js} +1 -1
  309. package/web-shell/assets/{vennDiagram-4TSXK5OY-DdhIExjI.js → vennDiagram-4TSXK5OY-DREP2ECo.js} +1 -1
  310. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C9RS_Zof.js → wardleyDiagram-VM6X3IG4-iyd9lKi2.js} +1 -1
  311. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-orRgmxWk.js → xychartDiagram-S5SC5T6Z-CVr1_j9q.js} +1 -1
  312. package/web-shell/index.html +3 -3
  313. package/chunks/chunk-7DJCPZE3.js +0 -945
  314. package/chunks/chunk-J2OSJFP3.js +0 -202
  315. package/chunks/chunk-K2OJUPOE.js +0 -78
  316. package/chunks/chunk-P3QQPMQA.js +0 -19
  317. package/chunks/process-registry-PMJOA5CO.js +0 -172
  318. package/web-shell/assets/channel-CENAhErJ.js +0 -1
  319. package/web-shell/assets/classDiagram-DTDB5LWJ-CM6FArGH.js +0 -1
  320. package/web-shell/assets/classDiagram-v2-JRS7N3AN-CM6FArGH.js +0 -1
  321. package/web-shell/assets/index-8hXIpvo4.js +0 -1865
  322. package/web-shell/assets/index-DclEv91i.css +0 -5
  323. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B2Q7XDaE.js +0 -1
  324. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DpZPOSbX.js +0 -8
@@ -0,0 +1,662 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ init_esbuild_shims
5
+ } from "./chunk-5O2XNYP6.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-J2S4EL5Y.js";
9
+
10
+ // packages/acp-bridge/dist/process-registry.js
11
+ init_esbuild_shims();
12
+ import { execFile, spawnSync } from "node:child_process";
13
+ var TERM_GRACE_MS = 5e3;
14
+ var EXIT_DEADLINE_MS = 1e4;
15
+ var PROCESS_QUERY_TIMEOUT_MS = 2e3;
16
+ var PROCESS_QUERY_MAX_BUFFER = 8 * 1024 * 1024;
17
+ var PROCESS_POLL_MS = 50;
18
+ var PROCESS_STATE_POLL_MS = 250;
19
+ var MAX_OWNED_PROCESSES = 256;
20
+ var MAX_OWNERSHIP_DEPTH = 8;
21
+ var POSIX_PS = "/bin/ps";
22
+ var WINDOWS_TASKKILL = `${process.env["SystemRoot"] || "C:\\Windows"}\\System32\\taskkill.exe`;
23
+ var STRING_EXEC_OPTIONS = {
24
+ encoding: "utf8",
25
+ maxBuffer: PROCESS_QUERY_MAX_BUFFER,
26
+ timeout: PROCESS_QUERY_TIMEOUT_MS,
27
+ windowsHide: true
28
+ };
29
+ var ProcessRegistry = class {
30
+ static {
31
+ __name(this, "ProcessRegistry");
32
+ }
33
+ reservations = /* @__PURE__ */ new Set();
34
+ children = /* @__PURE__ */ new Set();
35
+ draining = false;
36
+ shutdownPromise;
37
+ reserve() {
38
+ if (this.draining) {
39
+ throw new Error("ACP process registry is draining");
40
+ }
41
+ const token = Symbol("acp-child");
42
+ this.reservations.add(token);
43
+ let settled = false;
44
+ return {
45
+ attach: /* @__PURE__ */ __name((child, options) => {
46
+ if (settled || !this.reservations.delete(token)) {
47
+ throw new Error("ACP process reservation is no longer active");
48
+ }
49
+ settled = true;
50
+ const tracked = new TrackedChild(child, options?.ownsProcessTree === true, () => {
51
+ this.children.delete(tracked);
52
+ });
53
+ this.children.add(tracked);
54
+ if (this.draining)
55
+ void tracked.terminate().catch(() => {
56
+ });
57
+ return tracked;
58
+ }, "attach"),
59
+ cancel: /* @__PURE__ */ __name(() => {
60
+ if (settled)
61
+ return;
62
+ settled = true;
63
+ this.reservations.delete(token);
64
+ }, "cancel")
65
+ };
66
+ }
67
+ shutdown() {
68
+ if (this.shutdownPromise)
69
+ return this.shutdownPromise;
70
+ this.draining = true;
71
+ this.shutdownPromise = Promise.allSettled([...this.children].map((child) => child.terminate())).then((results) => {
72
+ const failures = results.flatMap((result) => result.status === "rejected" ? [result.reason] : []);
73
+ if (failures.length > 0) {
74
+ throw new AggregateError(failures, "ACP child process shutdown failed");
75
+ }
76
+ });
77
+ return this.shutdownPromise;
78
+ }
79
+ killAllSync() {
80
+ this.draining = true;
81
+ let processTable;
82
+ if (process.platform !== "win32" && [...this.children].some((child) => child.needsProcessTreeSnapshot)) {
83
+ try {
84
+ processTable = parseProcessTable(queryProcessTableSync());
85
+ } catch {
86
+ processTable = null;
87
+ }
88
+ }
89
+ for (const child of this.children)
90
+ child.killSync(processTable);
91
+ }
92
+ get activeProcessCount() {
93
+ return this.children.size;
94
+ }
95
+ /**
96
+ * Children this registry has committed to: attached ones plus reservations
97
+ * that have not attached yet. Larger than {@link activeProcessCount}, and
98
+ * the right figure for admission — `reserve()` inserts its token
99
+ * synchronously before `spawn()`, so two racing spawns each see the other
100
+ * here, while neither is visible in `activeProcessCount` until its child is
101
+ * attached.
102
+ *
103
+ * A direct child leaves this count when its root exits. A tree-owned child
104
+ * under explicit teardown remains committed until its known tree is gone,
105
+ * so a channel swap includes memory still held by descendants.
106
+ */
107
+ get committedProcessCount() {
108
+ return this.children.size + this.reservations.size;
109
+ }
110
+ };
111
+ var TrackedChild = class {
112
+ static {
113
+ __name(this, "TrackedChild");
114
+ }
115
+ child;
116
+ ownsProcessTree;
117
+ onRelease;
118
+ exited;
119
+ knownGroups = /* @__PURE__ */ new Set();
120
+ cleanupProofError;
121
+ exitInfo;
122
+ exitedSettled = false;
123
+ forceKillRequested = false;
124
+ released = false;
125
+ releasePollTimer;
126
+ releaseStateCheckInFlight = false;
127
+ spawnConfirmed = false;
128
+ terminatePromise;
129
+ terminating = false;
130
+ terminationSettled = false;
131
+ constructor(child, ownsProcessTree, onRelease) {
132
+ this.child = child;
133
+ this.ownsProcessTree = ownsProcessTree;
134
+ this.onRelease = onRelease;
135
+ this.rememberRoot();
136
+ this.exited = new Promise((resolve) => {
137
+ const finish = /* @__PURE__ */ __name((info) => {
138
+ if (this.exitedSettled)
139
+ return;
140
+ this.exitedSettled = true;
141
+ this.exitInfo = info;
142
+ resolve(info);
143
+ this.handleRootExit();
144
+ }, "finish");
145
+ child.once("exit", (exitCode, signalCode) => {
146
+ finish({ exitCode, signalCode });
147
+ });
148
+ child.once("spawn", () => {
149
+ this.spawnConfirmed = true;
150
+ this.rememberRoot();
151
+ });
152
+ child.once("error", () => {
153
+ if (!this.spawnConfirmed)
154
+ finish(void 0);
155
+ });
156
+ });
157
+ }
158
+ terminate() {
159
+ if (this.terminatePromise)
160
+ return this.terminatePromise;
161
+ this.terminating = true;
162
+ if (this.releasePollTimer) {
163
+ clearTimeout(this.releasePollTimer);
164
+ this.releasePollTimer = void 0;
165
+ }
166
+ const termination = this.ownsProcessTree ? this.terminateTree() : this.terminateDirectChild();
167
+ this.terminatePromise = termination.finally(() => {
168
+ this.terminationSettled = true;
169
+ if (this.ownsProcessTree && this.exitedSettled && !this.released) {
170
+ this.releaseWhenGroupsExit();
171
+ }
172
+ });
173
+ return this.terminatePromise;
174
+ }
175
+ get needsProcessTreeSnapshot() {
176
+ return this.ownsProcessTree && !this.forceKillRequested && !this.rootHasExited && !this.released;
177
+ }
178
+ killSync(processTable) {
179
+ if (!this.ownsProcessTree) {
180
+ this.killDirectChildSync();
181
+ return;
182
+ }
183
+ if (this.released)
184
+ return;
185
+ const firstForceKill = !this.forceKillRequested;
186
+ this.forceKillRequested = true;
187
+ const rootPid = this.rootPid;
188
+ if (!rootPid) {
189
+ this.killDirectChildSync();
190
+ return;
191
+ }
192
+ if (process.platform === "win32") {
193
+ if (!firstForceKill)
194
+ return;
195
+ if (!taskkillSync(rootPid))
196
+ this.killDirectChildSync();
197
+ return;
198
+ }
199
+ if (firstForceKill && !this.rootHasExited) {
200
+ if (processTable === void 0)
201
+ this.mergeSynchronousSnapshot();
202
+ else if (processTable !== null) {
203
+ this.mergeSnapshot(collectOwnership(processTable, rootPid));
204
+ }
205
+ }
206
+ const rootSignalled = this.signalKnownGroups("SIGKILL");
207
+ this.signalDirectRootIfNeeded("SIGKILL", rootSignalled);
208
+ if (this.exitedSettled && this.survivingGroups().length === 0) {
209
+ this.release();
210
+ }
211
+ }
212
+ get rootPid() {
213
+ const pid = this.child.pid;
214
+ return typeof pid === "number" && Number.isSafeInteger(pid) && pid > 0 ? pid : void 0;
215
+ }
216
+ get rootHasExited() {
217
+ return this.exitedSettled || this.child.exitCode !== null || this.child.signalCode !== null;
218
+ }
219
+ rememberRoot() {
220
+ if (!this.ownsProcessTree)
221
+ return;
222
+ const rootPid = this.rootPid;
223
+ if (!rootPid)
224
+ return;
225
+ if (process.platform !== "win32")
226
+ this.knownGroups.add(rootPid);
227
+ }
228
+ handleRootExit() {
229
+ if (!this.ownsProcessTree) {
230
+ this.release();
231
+ return;
232
+ }
233
+ if (this.terminating && !this.terminationSettled)
234
+ return;
235
+ if (process.platform !== "win32") {
236
+ this.forceKillRequested = true;
237
+ this.signalKnownGroups("SIGKILL");
238
+ this.releaseWhenGroupsExit();
239
+ return;
240
+ }
241
+ this.release();
242
+ }
243
+ release() {
244
+ if (this.released)
245
+ return;
246
+ this.released = true;
247
+ if (this.releasePollTimer)
248
+ clearTimeout(this.releasePollTimer);
249
+ this.onRelease();
250
+ }
251
+ killDirectChildSync() {
252
+ if (this.exitedSettled)
253
+ return;
254
+ try {
255
+ this.child.kill("SIGKILL");
256
+ } catch {
257
+ }
258
+ }
259
+ signalDirectRootIfNeeded(signal, rootGroupSignalled) {
260
+ const rootPid = this.rootPid;
261
+ if (!rootPid || this.exitedSettled || rootGroupSignalled)
262
+ return;
263
+ try {
264
+ this.child.kill(signal);
265
+ } catch {
266
+ }
267
+ }
268
+ async terminateDirectChild() {
269
+ if (this.exitedSettled)
270
+ return;
271
+ try {
272
+ this.child.kill("SIGTERM");
273
+ } catch {
274
+ if (this.exitedSettled)
275
+ return;
276
+ }
277
+ let hardKillTimer;
278
+ let deadlineTimer;
279
+ const deadline = new Promise((_, reject) => {
280
+ hardKillTimer = setTimeout(() => this.killDirectChildSync(), TERM_GRACE_MS);
281
+ hardKillTimer.unref();
282
+ deadlineTimer = setTimeout(() => {
283
+ reject(new Error(`ACP child pid=${this.child.pid ?? "unknown"} did not exit within ${EXIT_DEADLINE_MS}ms`));
284
+ }, EXIT_DEADLINE_MS);
285
+ deadlineTimer.unref();
286
+ });
287
+ try {
288
+ const exitInfo = await Promise.race([this.exited, deadline]);
289
+ this.throwForUncleanExit(exitInfo);
290
+ } finally {
291
+ if (hardKillTimer)
292
+ clearTimeout(hardKillTimer);
293
+ if (deadlineTimer)
294
+ clearTimeout(deadlineTimer);
295
+ }
296
+ }
297
+ async terminateTree() {
298
+ if (this.exitedSettled && (process.platform === "win32" || this.released)) {
299
+ return;
300
+ }
301
+ const rootPid = this.rootPid;
302
+ if (!rootPid) {
303
+ await this.terminateDirectChild();
304
+ return;
305
+ }
306
+ if (process.platform === "win32") {
307
+ await this.terminateWindowsTree(rootPid);
308
+ return;
309
+ }
310
+ await this.terminatePosixTree(rootPid);
311
+ }
312
+ async terminatePosixTree(rootPid) {
313
+ const startedAt = Date.now();
314
+ if (!this.rootHasExited) {
315
+ await this.mergeAsynchronousSnapshot(rootPid, true);
316
+ }
317
+ let escalated = this.forceKillRequested;
318
+ let rootSignalled = this.signalKnownGroups(escalated ? "SIGKILL" : "SIGTERM");
319
+ this.signalDirectRootIfNeeded(escalated ? "SIGKILL" : "SIGTERM", rootSignalled);
320
+ const graceDeadline = Math.min(startedAt + EXIT_DEADLINE_MS, Date.now() + TERM_GRACE_MS);
321
+ const exitDeadline = startedAt + EXIT_DEADLINE_MS;
322
+ let nextStateCheckAt = 0;
323
+ while (true) {
324
+ let survivingGroups = this.survivingGroups();
325
+ let now = Date.now();
326
+ if (this.exitedSettled && escalated && survivingGroups.length > 0 && now < exitDeadline && now >= nextStateCheckAt) {
327
+ await this.pruneTerminalGroups(survivingGroups, exitDeadline - now);
328
+ nextStateCheckAt = Date.now() + PROCESS_STATE_POLL_MS;
329
+ survivingGroups = this.survivingGroups();
330
+ now = Date.now();
331
+ }
332
+ if (this.exitedSettled && survivingGroups.length === 0) {
333
+ this.release();
334
+ if (this.cleanupProofError)
335
+ throw this.cleanupProofError;
336
+ this.throwForUncleanExit(this.exitInfo);
337
+ return;
338
+ }
339
+ if (!escalated && (this.forceKillRequested || now >= graceDeadline)) {
340
+ if (!this.rootHasExited && this.knownGroups.has(rootPid)) {
341
+ await this.mergeAsynchronousSnapshot(rootPid, false);
342
+ }
343
+ escalated = true;
344
+ rootSignalled = this.signalKnownGroups("SIGKILL");
345
+ this.signalDirectRootIfNeeded("SIGKILL", rootSignalled);
346
+ continue;
347
+ }
348
+ if (now >= exitDeadline) {
349
+ const groups = survivingGroups.join(",") || "none";
350
+ const proof = this.cleanupProofError ? `; ${this.cleanupProofError.message}` : "";
351
+ throw new Error(`ACP child pid=${rootPid} did not exit with its owned process groups within ${EXIT_DEADLINE_MS}ms (surviving pgids=${groups})${proof}`);
352
+ }
353
+ await delay(Math.min(PROCESS_POLL_MS, (escalated ? exitDeadline : graceDeadline) - now));
354
+ if (this.forceKillRequested)
355
+ escalated = true;
356
+ }
357
+ }
358
+ async terminateWindowsTree(rootPid) {
359
+ const startedAt = Date.now();
360
+ let treeKillError;
361
+ try {
362
+ await taskkill(rootPid);
363
+ } catch (error) {
364
+ treeKillError = toError(error);
365
+ this.killDirectChildSync();
366
+ }
367
+ const remainingMs = Math.max(1, EXIT_DEADLINE_MS - (Date.now() - startedAt));
368
+ const exitInfo = await waitForPromise(this.exited, remainingMs).catch(() => {
369
+ throw new Error(`ACP child pid=${rootPid} did not exit within ${EXIT_DEADLINE_MS}ms` + (treeKillError ? `; ${treeKillError.message}` : ""));
370
+ });
371
+ this.release();
372
+ if (treeKillError) {
373
+ throw new Error(`ACP child pid=${rootPid} process-tree cleanup failed: ${treeKillError.message}`);
374
+ }
375
+ this.throwForUncleanExit(exitInfo);
376
+ }
377
+ async mergeAsynchronousSnapshot(rootPid, initial) {
378
+ try {
379
+ const table = parseProcessTable(await queryProcessTable());
380
+ if (this.rootHasExited) {
381
+ if (initial && !this.forceKillRequested) {
382
+ this.recordCleanupProofError(`ACP child pid=${rootPid} exited before its initial process-tree snapshot completed`);
383
+ }
384
+ return;
385
+ }
386
+ const snapshot = collectOwnership(table, rootPid);
387
+ this.mergeSnapshot(snapshot);
388
+ if (snapshot.truncated) {
389
+ this.recordCleanupProofError(`ACP child pid=${rootPid} process-tree snapshot exceeded ${MAX_OWNED_PROCESSES} processes or depth ${MAX_OWNERSHIP_DEPTH}`);
390
+ }
391
+ if (initial && !snapshot.rootSeen) {
392
+ this.recordCleanupProofError(`ACP child pid=${rootPid} was absent from the initial process-tree snapshot`);
393
+ } else if (initial && !snapshot.rootIsGroupLeader) {
394
+ this.recordCleanupProofError(`ACP child pid=${rootPid} was not an isolated process-group leader`);
395
+ }
396
+ } catch (error) {
397
+ this.recordCleanupProofError(`ACP child pid=${rootPid} process-tree snapshot failed: ${toError(error).message}`);
398
+ }
399
+ }
400
+ mergeSynchronousSnapshot() {
401
+ const rootPid = this.rootPid;
402
+ if (!rootPid || process.platform === "win32" || this.rootHasExited)
403
+ return;
404
+ try {
405
+ const table = parseProcessTable(queryProcessTableSync());
406
+ this.mergeSnapshot(collectOwnership(table, rootPid));
407
+ } catch {
408
+ }
409
+ }
410
+ mergeSnapshot(snapshot) {
411
+ if (!snapshot.rootIsGroupLeader) {
412
+ const rootPid = this.rootPid;
413
+ if (snapshot.rootSeen && rootPid)
414
+ this.knownGroups.delete(rootPid);
415
+ return;
416
+ }
417
+ for (const group of snapshot.groups)
418
+ this.knownGroups.add(group);
419
+ }
420
+ signalKnownGroups(signal) {
421
+ const rootPid = this.rootPid;
422
+ let rootSignalled = false;
423
+ const groups = [...this.knownGroups].sort((left, right) => {
424
+ if (left === rootPid)
425
+ return 1;
426
+ if (right === rootPid)
427
+ return -1;
428
+ return right - left;
429
+ });
430
+ for (const group of groups) {
431
+ try {
432
+ process.kill(-group, signal);
433
+ if (group === rootPid)
434
+ rootSignalled = true;
435
+ } catch (error) {
436
+ if (isErrno(error, "ESRCH")) {
437
+ this.knownGroups.delete(group);
438
+ continue;
439
+ }
440
+ this.recordCleanupProofError(`ACP child pid=${rootPid ?? "unknown"} could not send ${signal} to pgid=${group}: ${toError(error).message}`);
441
+ }
442
+ }
443
+ return rootSignalled;
444
+ }
445
+ survivingGroups() {
446
+ const surviving = [];
447
+ for (const group of this.knownGroups) {
448
+ try {
449
+ process.kill(-group, 0);
450
+ surviving.push(group);
451
+ } catch (error) {
452
+ if (isErrno(error, "ESRCH")) {
453
+ this.knownGroups.delete(group);
454
+ continue;
455
+ }
456
+ surviving.push(group);
457
+ if (!isErrno(error, "EPERM")) {
458
+ this.recordCleanupProofError(`ACP child pid=${this.rootPid ?? "unknown"} could not inspect pgid=${group}: ${toError(error).message}`);
459
+ }
460
+ }
461
+ }
462
+ return surviving;
463
+ }
464
+ recordCleanupProofError(message) {
465
+ this.cleanupProofError ??= new Error(message);
466
+ }
467
+ async pruneTerminalGroups(groups, timeoutMs = PROCESS_QUERY_TIMEOUT_MS) {
468
+ try {
469
+ const table = parseProcessTable(await queryProcessTable(timeoutMs));
470
+ const targets = new Set(groups);
471
+ const terminalGroups = /* @__PURE__ */ new Set();
472
+ const liveGroups = /* @__PURE__ */ new Set();
473
+ for (const row of table.rowsByPid.values()) {
474
+ if (!targets.has(row.pgid))
475
+ continue;
476
+ if (row.terminal)
477
+ terminalGroups.add(row.pgid);
478
+ else
479
+ liveGroups.add(row.pgid);
480
+ }
481
+ for (const group of terminalGroups) {
482
+ if (!liveGroups.has(group))
483
+ this.knownGroups.delete(group);
484
+ }
485
+ } catch {
486
+ }
487
+ }
488
+ releaseWhenGroupsExit() {
489
+ if (this.released || this.releasePollTimer || this.releaseStateCheckInFlight || this.terminating && !this.terminationSettled) {
490
+ return;
491
+ }
492
+ const survivingGroups = this.survivingGroups();
493
+ if (survivingGroups.length === 0) {
494
+ this.release();
495
+ return;
496
+ }
497
+ this.releaseStateCheckInFlight = true;
498
+ void this.pruneTerminalGroups(survivingGroups).finally(() => {
499
+ this.releaseStateCheckInFlight = false;
500
+ if (this.released)
501
+ return;
502
+ if (this.terminating && !this.terminationSettled)
503
+ return;
504
+ if (this.survivingGroups().length === 0) {
505
+ this.release();
506
+ return;
507
+ }
508
+ this.releasePollTimer = setTimeout(() => {
509
+ this.releasePollTimer = void 0;
510
+ this.releaseWhenGroupsExit();
511
+ }, PROCESS_STATE_POLL_MS);
512
+ this.releasePollTimer.unref();
513
+ });
514
+ }
515
+ throwForUncleanExit(exitInfo) {
516
+ if (exitInfo && (exitInfo.exitCode !== 0 || exitInfo.signalCode !== null)) {
517
+ throw new Error(`ACP child pid=${this.child.pid ?? "unknown"} exited uncleanly during shutdown (code=${exitInfo.exitCode ?? "none"}, signal=${exitInfo.signalCode ?? "none"})`);
518
+ }
519
+ }
520
+ };
521
+ function parseProcessTable(stdout) {
522
+ const rowsByPid = /* @__PURE__ */ new Map();
523
+ const childrenByParent = /* @__PURE__ */ new Map();
524
+ for (const line of stdout.split("\n")) {
525
+ const match = line.trim().match(/^(\d+)\s+(\d+)\s+(\d+)(?:\s+(\S+)(?:\s+(\d+))?)?$/u);
526
+ if (!match)
527
+ continue;
528
+ const pid = Number.parseInt(match[1], 10);
529
+ const ppid = Number.parseInt(match[2], 10);
530
+ const pgid = Number.parseInt(match[3], 10);
531
+ const state = match[4];
532
+ const threadCount = match[5] ? Number.parseInt(match[5], 10) : void 0;
533
+ if (!Number.isSafeInteger(pid) || !Number.isSafeInteger(ppid) || !Number.isSafeInteger(pgid) || pid <= 0 || ppid < 0 || pgid <= 0) {
534
+ continue;
535
+ }
536
+ const terminal = state?.startsWith("X") === true || state?.startsWith("Z") === true && (process.platform !== "linux" || threadCount === 1);
537
+ rowsByPid.set(pid, { pgid, terminal });
538
+ const children = childrenByParent.get(ppid);
539
+ if (children)
540
+ children.push(pid);
541
+ else
542
+ childrenByParent.set(ppid, [pid]);
543
+ }
544
+ if (rowsByPid.size === 0) {
545
+ throw new Error("process-table query returned no parseable rows");
546
+ }
547
+ return { childrenByParent, rowsByPid };
548
+ }
549
+ __name(parseProcessTable, "parseProcessTable");
550
+ function collectOwnership(table, rootPid) {
551
+ const groups = /* @__PURE__ */ new Set();
552
+ const visited = /* @__PURE__ */ new Set();
553
+ const queue = [{ depth: 0, pid: rootPid }];
554
+ let truncated = false;
555
+ while (queue.length > 0) {
556
+ const current = queue.shift();
557
+ if (visited.has(current.pid))
558
+ continue;
559
+ if (visited.size >= MAX_OWNED_PROCESSES) {
560
+ truncated = true;
561
+ break;
562
+ }
563
+ visited.add(current.pid);
564
+ const row = table.rowsByPid.get(current.pid);
565
+ if (row)
566
+ groups.add(row.pgid);
567
+ const children = table.childrenByParent.get(current.pid) ?? [];
568
+ if (current.depth >= MAX_OWNERSHIP_DEPTH) {
569
+ if (children.length > 0)
570
+ truncated = true;
571
+ continue;
572
+ }
573
+ for (const pid of children) {
574
+ queue.push({ depth: current.depth + 1, pid });
575
+ }
576
+ }
577
+ const root = table.rowsByPid.get(rootPid);
578
+ return {
579
+ groups,
580
+ rootIsGroupLeader: root?.pgid === rootPid,
581
+ rootSeen: root !== void 0,
582
+ truncated
583
+ };
584
+ }
585
+ __name(collectOwnership, "collectOwnership");
586
+ function queryProcessTable(timeoutMs = PROCESS_QUERY_TIMEOUT_MS) {
587
+ return runExecFile(POSIX_PS, posixPsArgs(), {
588
+ ...STRING_EXEC_OPTIONS,
589
+ timeout: Math.max(1, Math.min(PROCESS_QUERY_TIMEOUT_MS, timeoutMs))
590
+ });
591
+ }
592
+ __name(queryProcessTable, "queryProcessTable");
593
+ function queryProcessTableSync() {
594
+ const result = spawnSync(POSIX_PS, posixPsArgs(), STRING_EXEC_OPTIONS);
595
+ if (result.error)
596
+ throw result.error;
597
+ if (result.status !== 0) {
598
+ throw new Error(`ps exited with status ${result.status ?? "unknown"}`);
599
+ }
600
+ return result.stdout;
601
+ }
602
+ __name(queryProcessTableSync, "queryProcessTableSync");
603
+ function posixPsArgs() {
604
+ const columns = process.platform === "linux" ? "pid=,ppid=,pgid=,state=,nlwp=" : "pid=,ppid=,pgid=,state=";
605
+ return ["-A", "-o", columns];
606
+ }
607
+ __name(posixPsArgs, "posixPsArgs");
608
+ function taskkill(rootPid) {
609
+ return runExecFile(WINDOWS_TASKKILL, ["/f", "/t", "/pid", String(rootPid)], STRING_EXEC_OPTIONS);
610
+ }
611
+ __name(taskkill, "taskkill");
612
+ function taskkillSync(rootPid) {
613
+ try {
614
+ const result = spawnSync(WINDOWS_TASKKILL, ["/f", "/t", "/pid", String(rootPid)], STRING_EXEC_OPTIONS);
615
+ return !result.error && result.status === 0;
616
+ } catch {
617
+ return false;
618
+ }
619
+ }
620
+ __name(taskkillSync, "taskkillSync");
621
+ function runExecFile(file, args, options) {
622
+ return new Promise((resolve, reject) => {
623
+ execFile(file, args, options, (error, stdout) => {
624
+ if (error)
625
+ reject(error);
626
+ else
627
+ resolve(stdout);
628
+ });
629
+ });
630
+ }
631
+ __name(runExecFile, "runExecFile");
632
+ function waitForPromise(promise, timeoutMs) {
633
+ let timer;
634
+ const timeout = new Promise((_, reject) => {
635
+ timer = setTimeout(() => reject(new Error("deadline exceeded")), timeoutMs);
636
+ });
637
+ return Promise.race([promise, timeout]).finally(() => {
638
+ if (timer)
639
+ clearTimeout(timer);
640
+ });
641
+ }
642
+ __name(waitForPromise, "waitForPromise");
643
+ function delay(ms) {
644
+ return new Promise((resolve) => setTimeout(resolve, Math.max(1, ms)));
645
+ }
646
+ __name(delay, "delay");
647
+ function isErrno(error, code) {
648
+ return error !== null && typeof error === "object" && "code" in error && error.code === code;
649
+ }
650
+ __name(isErrno, "isErrno");
651
+ function toError(error) {
652
+ return error instanceof Error ? error : new Error(String(error));
653
+ }
654
+ __name(toError, "toError");
655
+ export {
656
+ ProcessRegistry
657
+ };
658
+ /**
659
+ * @license
660
+ * Copyright 2025 Qwen Team
661
+ * SPDX-License-Identifier: Apache-2.0
662
+ */
@@ -11,8 +11,8 @@ import {
11
11
  relaunchApp,
12
12
  relaunchForUpdate,
13
13
  requestUpdateOnExit
14
- } from "./chunk-CSMI4FP5.js";
15
- import "./chunk-Y6LSMB6J.js";
14
+ } from "./chunk-MSBO7X2W.js";
15
+ import "./chunk-MO3FC2WT.js";
16
16
  import "./chunk-5O2XNYP6.js";
17
17
  import "./chunk-J2S4EL5Y.js";
18
18
  export {