@qwen-code/qwen-code 0.21.1 → 0.21.2

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 (321) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +1 -0
  2. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  3. package/bundled/qc-helper/docs/features/channels/github.md +42 -10
  4. package/bundled/qc-helper/docs/features/channels/gitlab.md +171 -0
  5. package/bundled/qc-helper/docs/features/code-review.md +20 -0
  6. package/bundled/qc-helper/docs/features/hooks.md +20 -0
  7. package/bundled/qc-helper/docs/features/sub-agents.md +22 -8
  8. package/bundled/qc-helper/docs/qwen-serve.md +7 -5
  9. package/bundled/review/SKILL.md +1 -1
  10. package/chunks/{MaxSizedBox-VI3ROJJA.js → MaxSizedBox-TQBQ247P.js} +42 -38
  11. package/chunks/{StandaloneSessionPicker-LYXKD2EV.js → StandaloneSessionPicker-2HPTKCLX.js} +58 -54
  12. package/chunks/{acp-startup-profiler-DFVPFQ6C.js → acp-startup-profiler-2C4A5ZTJ.js} +2 -2
  13. package/chunks/{acpAgent-WN5SRDQO.js → acpAgent-PS6EDGH3.js} +431 -168
  14. package/chunks/{agent-K6ECSM64.js → agent-VDOUB35F.js} +38 -34
  15. package/chunks/{agent-headless-NO4Y2HOE.js → agent-headless-EO53EFS2.js} +38 -34
  16. package/chunks/{anthropicContentGenerator-V2QOGVYD.js → anthropicContentGenerator-OFHSZJBF.js} +6 -6
  17. package/chunks/{artifact-tool-6K6U7XYJ.js → artifact-tool-RDN2W7ND.js} +2 -2
  18. package/chunks/{askUserQuestion-GD2IJJ7I.js → askUserQuestion-OZERWH5R.js} +2 -2
  19. package/chunks/{bridge-3KJEWDNE.js → bridge-W7AZSRZQ.js} +42 -38
  20. package/chunks/{build-S6DO7LMM.js → build-GDBLPA24.js} +1 -1
  21. package/chunks/{channel-management-service-XR7GZSWF.js → channel-management-service-5S7YCWX5.js} +20 -5
  22. package/chunks/{channel-settings-store-HW4FXXUA.js → channel-settings-store-JFVRSNER.js} +44 -40
  23. package/chunks/{channel-worker-group-XDPTDWTX.js → channel-worker-group-OVWGYMZS.js} +5 -5
  24. package/chunks/{channel-worker-manager-YYEHVRRE.js → channel-worker-manager-H55GKOQA.js} +5 -5
  25. package/chunks/{channel-worker-supervisor-74HTWA2G.js → channel-worker-supervisor-CABBXYHK.js} +3 -3
  26. package/chunks/{chunk-UWMLWVCA.js → chunk-2IIJTXYF.js} +26 -10
  27. package/chunks/{chunk-VYOXCEPJ.js → chunk-2KKCCLPT.js} +1 -1
  28. package/chunks/{chunk-T4TXDL7G.js → chunk-2LEOZTBT.js} +36 -24
  29. package/chunks/{chunk-XWWKIXVD.js → chunk-3APUUXRF.js} +1 -1
  30. package/chunks/{chunk-TCIFAA7K.js → chunk-3F2WDAV6.js} +2 -2
  31. package/chunks/{chunk-SGFT55XI.js → chunk-3I6DUGQD.js} +1 -1
  32. package/chunks/{chunk-ZURDMIDR.js → chunk-44F4LBWZ.js} +228 -71
  33. package/chunks/{chunk-GKX7E4CO.js → chunk-45IOTAUS.js} +1 -1
  34. package/chunks/{chunk-6QIGFD5W.js → chunk-4KP2F2TE.js} +1 -1
  35. package/chunks/{chunk-X5WNMMIA.js → chunk-54YCNSK5.js} +4241 -1636
  36. package/chunks/{chunk-P4WOAOJW.js → chunk-56Z7QEAQ.js} +67 -21
  37. package/chunks/{chunk-UPUG4GXM.js → chunk-5NNHICSA.js} +3 -3
  38. package/chunks/{chunk-LGAOC3ZS.js → chunk-675H6PLP.js} +1 -1
  39. package/chunks/{chunk-5KTQXHPY.js → chunk-6CQWRWUC.js} +3 -3
  40. package/chunks/chunk-6FMJLI5M.js +1591 -0
  41. package/chunks/{chunk-GZ3RCT54.js → chunk-6MPDY6ZG.js} +1 -1
  42. package/chunks/{chunk-RCUQIPTN.js → chunk-6PQPKTXP.js} +1 -1
  43. package/chunks/{chunk-KCO4FLFJ.js → chunk-6TAASXWL.js} +3 -3
  44. package/chunks/{chunk-JHNRZMHI.js → chunk-77V3VIKL.js} +9 -9
  45. package/chunks/{chunk-CAPPWD3X.js → chunk-7KAXXBER.js} +3 -3
  46. package/chunks/{chunk-A4COXFB3.js → chunk-7SJN2IWT.js} +5 -5
  47. package/chunks/{chunk-Y4IHBGBP.js → chunk-7ULQIS27.js} +1 -1
  48. package/chunks/{chunk-5MKRTI4T.js → chunk-A7Y5H4TX.js} +4 -4
  49. package/chunks/{chunk-CVHIL5IG.js → chunk-AOHY3QJ3.js} +13 -6
  50. package/chunks/chunk-AQ37AY7B.js +93 -0
  51. package/chunks/{chunk-OCESJA77.js → chunk-AUOULH6Q.js} +45 -45
  52. package/chunks/{chunk-UBEPNVDI.js → chunk-BBIQAX4V.js} +3 -3
  53. package/chunks/{chunk-JSD33JG6.js → chunk-CBBP4BMC.js} +23 -9
  54. package/chunks/{chunk-ZHBO7WVX.js → chunk-CNTR4GR6.js} +1 -1
  55. package/chunks/{chunk-PB3MBFKG.js → chunk-CO2U743O.js} +4 -4
  56. package/chunks/{chunk-XZC5VLBZ.js → chunk-CPZAH673.js} +4 -0
  57. package/chunks/{chunk-T3O2B4XO.js → chunk-CU47KXB5.js} +3 -3
  58. package/chunks/{chunk-2LKVPASC.js → chunk-D4HTUMGX.js} +3 -3
  59. package/chunks/{chunk-BNWB5CYE.js → chunk-D6MDRSZ6.js} +7 -7
  60. package/chunks/{chunk-7BAU433D.js → chunk-DEEABGH2.js} +867 -91
  61. package/chunks/{chunk-52ZSWYEG.js → chunk-DQ2O5QOJ.js} +1 -1
  62. package/chunks/{chunk-WBSMNTSV.js → chunk-DSFHVTWD.js} +2 -2
  63. package/chunks/{chunk-PT722TDT.js → chunk-DUNI4EBW.js} +701 -86
  64. package/chunks/{chunk-UHUSJ6X7.js → chunk-E2BHWIDT.js} +19 -4
  65. package/chunks/{chunk-T2QMKU3R.js → chunk-E2FN6SM7.js} +17 -5
  66. package/chunks/{chunk-W4MIWP6M.js → chunk-E6CJ2SMM.js} +2 -2
  67. package/chunks/{chunk-5ZF5XXTS.js → chunk-EQNUDTL6.js} +2 -2
  68. package/chunks/{chunk-2N7CODY5.js → chunk-EU5TBFJI.js} +2 -2
  69. package/chunks/{chunk-TFRMVU6R.js → chunk-FANRZEAJ.js} +1 -1
  70. package/chunks/{chunk-WBL3FJEU.js → chunk-FC4KQFCS.js} +1 -1
  71. package/chunks/{chunk-GNR2RNMP.js → chunk-FCYYAB4S.js} +2 -2
  72. package/chunks/{chunk-FNMZK765.js → chunk-FJ5WUMUQ.js} +1 -1
  73. package/chunks/{chunk-J7OACQDE.js → chunk-FNDXMN7I.js} +71 -49
  74. package/chunks/{chunk-U3E3UQAA.js → chunk-FS674JW4.js} +3 -3
  75. package/chunks/{chunk-S7W2GKIO.js → chunk-G7XXKQYS.js} +2 -0
  76. package/chunks/{chunk-VWOOBLTY.js → chunk-GJ2GBPBD.js} +2 -2
  77. package/chunks/{chunk-TBBV36Y4.js → chunk-GL4JOZXU.js} +4 -4
  78. package/chunks/{chunk-FTD6DP4T.js → chunk-GURGAJTX.js} +2 -1
  79. package/chunks/{chunk-65PQENQP.js → chunk-H6I4PGRV.js} +5 -5
  80. package/chunks/{chunk-7XATOOE7.js → chunk-HC45LTEN.js} +1 -1
  81. package/chunks/{chunk-VCPIZRYH.js → chunk-HIVKI6O6.js} +7 -7
  82. package/chunks/{chunk-HMRM2A3U.js → chunk-HX6RLYUO.js} +3 -3
  83. package/chunks/{chunk-GZXCZHCT.js → chunk-I3G5JWBV.js} +1 -1
  84. package/chunks/{chunk-2XSLTRFZ.js → chunk-I5BT7ADR.js} +2 -2
  85. package/chunks/{chunk-GATT5TKW.js → chunk-IGTHU3T4.js} +1 -1
  86. package/chunks/{chunk-4G2BISNC.js → chunk-IIUGIWWY.js} +1 -1
  87. package/chunks/{chunk-7I5GTCT4.js → chunk-JCJ7LKNA.js} +5104 -4817
  88. package/chunks/{chunk-657BH7VM.js → chunk-JE2CEOBO.js} +2 -2
  89. package/chunks/{chunk-S3TWXGKA.js → chunk-JE7KQ2UP.js} +4 -2
  90. package/chunks/{chunk-BPZKP57P.js → chunk-JJPKFJBT.js} +3 -3
  91. package/chunks/{chunk-6PE7N3A4.js → chunk-JLZ3RBQG.js} +7 -5
  92. package/chunks/{chunk-2LQTH543.js → chunk-JXVC2PL3.js} +2 -2
  93. package/chunks/{chunk-JCW2R7WC.js → chunk-K623ENWT.js} +3 -79
  94. package/chunks/{chunk-T2NCM2ET.js → chunk-K6KS3LTN.js} +2 -749
  95. package/chunks/{chunk-6RPMI2AB.js → chunk-KR32NIAN.js} +6 -6
  96. package/chunks/{chunk-XBYYDKAZ.js → chunk-KWHKHSIS.js} +8 -7
  97. package/chunks/{chunk-EVKE2FZL.js → chunk-KXDONCPU.js} +4 -4
  98. package/chunks/{chunk-5TBMQLGG.js → chunk-L2E5GFAG.js} +2 -2
  99. package/chunks/{chunk-MHAIJPTD.js → chunk-L32VV3ZJ.js} +12 -12
  100. package/chunks/{chunk-OKF7JF3R.js → chunk-LHKCY7DY.js} +3 -3
  101. package/chunks/{chunk-LW3RFMG7.js → chunk-LOY7RWQG.js} +3 -3
  102. package/chunks/{chunk-AQIDMUGU.js → chunk-LYI2PZDK.js} +1 -1
  103. package/chunks/{chunk-YGF33UXG.js → chunk-MB32MS4U.js} +12 -3
  104. package/chunks/{chunk-Y6AXW2OG.js → chunk-MM7TH7ZM.js} +1 -1
  105. package/chunks/{chunk-2DN4J57Y.js → chunk-N4ACHWNH.js} +1 -1
  106. package/chunks/{chunk-M7OONWYU.js → chunk-NBD76HUW.js} +4 -2
  107. package/chunks/{chunk-A2D5BAVP.js → chunk-NHFEMWAZ.js} +1 -1
  108. package/chunks/{chunk-3EFXSQCM.js → chunk-NTDH4IML.js} +7 -7
  109. package/chunks/chunk-O6GEWCJA.js +21 -0
  110. package/chunks/{chunk-7DXQIJID.js → chunk-OFZKFPYG.js} +3 -3
  111. package/chunks/{chunk-JTV5K7NH.js → chunk-P5VC5USY.js} +1 -1
  112. package/chunks/{chunk-Q43KPN7X.js → chunk-P755N4CS.js} +3 -3
  113. package/chunks/{chunk-XFZYFU3I.js → chunk-PCK4B6LR.js} +1 -1
  114. package/chunks/{chunk-EJGJIBRS.js → chunk-PJOHNFIY.js} +3 -3
  115. package/chunks/{chunk-WUZ7H6DP.js → chunk-PVNQRENX.js} +1 -1
  116. package/chunks/{chunk-LO4ROVP4.js → chunk-PZEXDV3H.js} +106 -8
  117. package/chunks/{chunk-WZRWHXFE.js → chunk-Q3T5KA2V.js} +1 -1
  118. package/chunks/{chunk-QIZKCVM3.js → chunk-Q5WZTTWE.js} +4 -4
  119. package/chunks/{chunk-BGTQCTQW.js → chunk-QARJNL2V.js} +3 -3
  120. package/chunks/{chunk-GXIJHV66.js → chunk-QCXGC7QB.js} +3 -3
  121. package/chunks/{chunk-DZLYR4U3.js → chunk-QDK4F2N5.js} +1 -1
  122. package/chunks/{chunk-NOKIVHOL.js → chunk-QTHQ6Z5X.js} +1 -1
  123. package/chunks/{chunk-A3NDJ5SB.js → chunk-R2XWGR75.js} +2 -2
  124. package/chunks/{chunk-JX27F6QS.js → chunk-RDJOB6S3.js} +1 -1
  125. package/chunks/{chunk-TV64SXKD.js → chunk-RG64CDT2.js} +4 -4
  126. package/chunks/{chunk-JFMA7Y5M.js → chunk-RSVPYAGK.js} +5 -5
  127. package/chunks/{chunk-64LQLPL7.js → chunk-SHN4KHDK.js} +3 -3
  128. package/chunks/chunk-T3CHYWJZ.js +758 -0
  129. package/chunks/{chunk-PONHVBRT.js → chunk-TEGJSJDF.js} +2 -2
  130. package/chunks/{chunk-75GFAX4R.js → chunk-THVU3RNH.js} +1 -1
  131. package/chunks/{record-artifact-XAMSFSW4.js → chunk-TIRRPCFS.js} +22 -7
  132. package/chunks/{chunk-HV26XH34.js → chunk-TTJZAIFP.js} +3 -3
  133. package/chunks/{chunk-JMONIXMJ.js → chunk-TZTAV5RH.js} +1 -1
  134. package/chunks/{chunk-7AEJDLRA.js → chunk-UV6KF7T3.js} +2 -2
  135. package/chunks/{chunk-PLDQBIO6.js → chunk-V25K5ID7.js} +1 -1
  136. package/chunks/{chunk-S4WJVPZW.js → chunk-V4XNUDPE.js} +3 -3
  137. package/chunks/{chunk-2FAK6PNM.js → chunk-VEMNQMHA.js} +2 -2
  138. package/chunks/{chunk-CQL64ESB.js → chunk-VMX5RZQH.js} +12 -10
  139. package/chunks/{chunk-EIF3FXTB.js → chunk-W3UKBMSI.js} +63 -18
  140. package/chunks/{chunk-TDL6LB4K.js → chunk-WWCMSZII.js} +21 -9
  141. package/chunks/{chunk-5YKDXHUY.js → chunk-XP4L6KS3.js} +2 -2
  142. package/chunks/{chunk-RPLGZJV2.js → chunk-XQK4XXTN.js} +1 -1
  143. package/chunks/{chunk-KAMYKP7E.js → chunk-XUGZYLDH.js} +1 -1
  144. package/chunks/{chunk-MR5EAQ5M.js → chunk-YANIWTRZ.js} +1 -1
  145. package/chunks/{chunk-3L2SPEBH.js → chunk-YGE3IXJP.js} +1 -1
  146. package/chunks/{chunk-BCZFQXWK.js → chunk-YUFIEIWC.js} +1 -1
  147. package/chunks/{chunk-75MIQ3LV.js → chunk-Z3S5EMOW.js} +4 -4
  148. package/chunks/{chunk-BMFALVGQ.js → chunk-ZMOJ7ISP.js} +1 -1
  149. package/chunks/{chunk-GEBV2JGB.js → chunk-ZPZ7ZJEE.js} +1 -1
  150. package/chunks/{computer-use-ZTIDHMMA.js → computer-use-5QWCFNKD.js} +38 -34
  151. package/chunks/{config-utils-NYSXDMEQ.js → config-utils-WADIDWGG.js} +4 -4
  152. package/chunks/{contextCommand-2PIEU37Z.js → contextCommand-4Z7T7TUM.js} +40 -36
  153. package/chunks/{core-runtime-3XEYLQFK.js → core-runtime-6N4EFC2Q.js} +38 -34
  154. package/chunks/{create-sub-session-SBYUMSSS.js → create-sub-session-62YZWVAY.js} +2 -2
  155. package/chunks/{create-sub-session-R76FVXCI.js → create-sub-session-AEREHZBQ.js} +38 -34
  156. package/chunks/{cron-create-2QK6TCEC.js → cron-create-6E7GIQTG.js} +4 -4
  157. package/chunks/{cron-delete-FDCDFYMG.js → cron-delete-JD26XY3W.js} +4 -4
  158. package/chunks/{cron-list-XN3WVBTP.js → cron-list-CUWFB44G.js} +4 -4
  159. package/chunks/{daemon-Q2AB5Z23.js → daemon-PCNCI5YU.js} +72 -3
  160. package/chunks/{daemon-status-provider-3XJI6CAL.js → daemon-status-provider-DDF7C5M7.js} +46 -42
  161. package/chunks/{daemon-trust-policy-ILUDTLHD.js → daemon-trust-policy-Q4KSOJTR.js} +43 -39
  162. package/chunks/{daemon-trust-policy-monitor-HS3PKKRO.js → daemon-trust-policy-monitor-V6FTE3IY.js} +43 -39
  163. package/chunks/{deferred-core-runtime-X4QV662U.js → deferred-core-runtime-GHJ5GQHK.js} +38 -34
  164. package/chunks/{dist-BSTVRPMT.js → dist-26BIMQT6.js} +276 -16
  165. package/chunks/{dist-SV7Q3AWJ.js → dist-2PERFI23.js} +12 -9
  166. package/chunks/{dist-DOLYHMXE.js → dist-OAOC5OV4.js} +2 -2
  167. package/chunks/{dist-YGBBMK3Z.js → dist-PVEAFLHY.js} +5 -4
  168. package/chunks/{dist-HVRQ2CFL.js → dist-SL2LUMML.js} +1180 -5
  169. package/chunks/dist-ULIG4M5H.js +13415 -0
  170. package/chunks/{dist-IXQEQWRG.js → dist-WGMNT3JQ.js} +1 -1
  171. package/chunks/{dist-SSU66DM4.js → dist-ZHXOBXDN.js} +1 -1
  172. package/chunks/{earlyInputCapture-XKLZT7ZD.js → earlyInputCapture-TQXLLISD.js} +39 -35
  173. package/chunks/{edit-HHGIOTQ2.js → edit-FJEUV6KZ.js} +38 -34
  174. package/chunks/{enter-worktree-ZN7PUQ46.js → enter-worktree-7GE3TZ4P.js} +38 -34
  175. package/chunks/{enterPlanMode-EIFIDSIV.js → enterPlanMode-KR5TMPCJ.js} +38 -34
  176. package/chunks/{environment-XXQ75D2Q.js → environment-SWL3CMB3.js} +40 -36
  177. package/chunks/{errors-4GMVU7CK.js → errors-XQE7BGZV.js} +40 -36
  178. package/chunks/{exit-worktree-GXMI4ATY.js → exit-worktree-CHKTYNCV.js} +38 -34
  179. package/chunks/{exitPlanMode-34UVY7M6.js → exitPlanMode-QYAG6LWX.js} +38 -34
  180. package/chunks/{fast-path-VPIVA7L6.js → fast-path-Z2K7W6DC.js} +2 -2
  181. package/chunks/{gemini-4BWIK4WD.js → gemini-YU4XKEDG.js} +91 -87
  182. package/chunks/{geminiContentGenerator-3XVV5MSS.js → geminiContentGenerator-ZZX6NBO4.js} +6 -6
  183. package/chunks/{glob-TZ2ABCJG.js → glob-VYF5CXSX.js} +38 -34
  184. package/chunks/goal-tools-HGO6VXPB.js +335 -0
  185. package/chunks/{grep-BEF463NA.js → grep-5DP5ZUTW.js} +38 -34
  186. package/chunks/{handleAutoUpdate-L6ERF36Y.js → handleAutoUpdate-UVBJ56DL.js} +42 -38
  187. package/chunks/{i18n-FMM5FDXR.js → i18n-UQNYHEUD.js} +39 -35
  188. package/chunks/{image-gen-HHVLF7HS.js → image-gen-WHPIZNWF.js} +9 -9
  189. package/chunks/{initializer-625TIAIO.js → initializer-GMIICF4W.js} +44 -40
  190. package/chunks/{installationInfo-6AM4I2Y3.js → installationInfo-4MGG4WVI.js} +39 -35
  191. package/chunks/{keychain-token-storage-72IYCAZV.js → keychain-token-storage-IKO4G53C.js} +2 -2
  192. package/chunks/list-CPN2W334.js +92 -0
  193. package/chunks/{list-agents-R6KDXQR3.js → list-agents-PXJ7ZUFB.js} +2 -2
  194. package/chunks/{loadedSettingsAdapter-SPUTNKAV.js → loadedSettingsAdapter-ZQAV5NDO.js} +43 -39
  195. package/chunks/{loggingContentGenerator-LKOF7XI7.js → loggingContentGenerator-5E7W4IEP.js} +18 -18
  196. package/chunks/{loop-wakeup-3IQKCYAH.js → loop-wakeup-Y26NQZ5I.js} +13 -6
  197. package/chunks/{ls-DKZ37A7N.js → ls-ONQTTMQR.js} +4 -4
  198. package/chunks/{lsp-QNWN7KN3.js → lsp-YGHHRGMD.js} +2 -2
  199. package/chunks/{managed-npm-update-ACQGGIN5.js → managed-npm-update-MKKAXYXA.js} +39 -35
  200. package/chunks/{mcp-SZLHKFJW.js → mcp-V5NTJF6X.js} +43 -39
  201. package/chunks/{monitor-DF52UVHI.js → monitor-CO3ASY6E.js} +38 -34
  202. package/chunks/nonInteractiveCli-ZJYEOO7U.js +148 -0
  203. package/chunks/{notebook-edit-FCWS4XVN.js → notebook-edit-Z7AEE6FM.js} +38 -34
  204. package/chunks/{openaiContentGenerator-7LDK3DCJ.js → openaiContentGenerator-CA3MQOP3.js} +19 -19
  205. package/chunks/{pidfile-6ERW3DF4.js → pidfile-NL7MKDRU.js} +39 -35
  206. package/chunks/{processUtils-COKZAMUP.js → processUtils-PB5K2DYH.js} +2 -2
  207. package/chunks/{qwenContentGenerator-TKWUMR7N.js → qwenContentGenerator-JYFNDCOS.js} +44 -40
  208. package/chunks/{qwenOAuth2-7HMU47SF.js → qwenOAuth2-W2ALKQDD.js} +8 -8
  209. package/chunks/{read-file-X6DRC574.js → read-file-IEOR5H5W.js} +11 -11
  210. package/chunks/{read-mcp-resource-GFTWYXMK.js → read-mcp-resource-U2IJN5HM.js} +2 -2
  211. package/chunks/record-artifact-MGPJ7EG4.js +21 -0
  212. package/chunks/{resumeHistoryUtils-PFPM2GWM.js → resumeHistoryUtils-BNBTP5AS.js} +44 -40
  213. package/chunks/{ripGrep-OWV2IVJC.js → ripGrep-UMQODKEB.js} +38 -34
  214. package/chunks/{run-qwen-serve-TSTCO4XE.js → run-qwen-serve-RN2R6QQW.js} +116 -65
  215. package/chunks/{runtime-DAUPSUKI.js → runtime-QFJ2MJF5.js} +48 -44
  216. package/chunks/{scheduler-KMADMT26.js → scheduler-AMYUFOZI.js} +38 -34
  217. package/chunks/{sdk-exporters-http-WO556XNU.js → sdk-exporters-http-4BQANSJ6.js} +3 -3
  218. package/chunks/{sdk-impl-LPAVACSF.js → sdk-impl-Z4VXWVFX.js} +3 -3
  219. package/chunks/{send-message-SAWK4DZX.js → send-message-PMP4ATVM.js} +6 -11
  220. package/chunks/{serve-NNRWS6F4.js → serve-EIIYJVX3.js} +43 -39
  221. package/chunks/{server-WEH7DVCH.js → server-EP2LLAPD.js} +1768 -712
  222. package/chunks/{session-WXC56V2I.js → session-GMPZBLOW.js} +83 -79
  223. package/chunks/{settings-DJDXFDZ3.js → settings-LN7RNKBS.js} +47 -43
  224. package/chunks/{shell-JN5VRQXD.js → shell-EM2OWU5X.js} +38 -34
  225. package/chunks/{skill-SGXPKJCS.js → skill-T5VPSK73.js} +17 -16
  226. package/chunks/{skill-settings-VJ5PDMZI.js → skill-settings-GMR3GMNY.js} +42 -38
  227. package/chunks/{spawnChannel-ETMJW7YX.js → spawnChannel-YPCU62DI.js} +40 -36
  228. package/chunks/{standalone-update-MK3Z7KBI.js → standalone-update-JAKIM2NF.js} +40 -36
  229. package/chunks/{startInteractiveUI-ZCGIXPGT.js → startInteractiveUI-YETQWGYF.js} +774 -779
  230. package/chunks/{syntheticOutput-355CB6CJ.js → syntheticOutput-D7E6ZFKR.js} +3 -3
  231. package/chunks/{task-create-INGWNUG4.js → task-create-NFCYD43L.js} +10 -9
  232. package/chunks/{task-list-5XNNGTF4.js → task-list-TAVMGEVD.js} +5 -5
  233. package/chunks/{task-stop-4ROAOBXH.js → task-stop-ZDF2UJRM.js} +2 -2
  234. package/chunks/{task-update-CRK5VWWZ.js → task-update-6L7LHGEX.js} +10 -9
  235. package/chunks/{team-create-QQGAJG7P.js → team-create-LFJ6HGNY.js} +38 -34
  236. package/chunks/{team-delete-S2RCXA4P.js → team-delete-DPGGRQBU.js} +5 -5
  237. package/chunks/{team-plan-approval-RT7Q5R6O.js → team-plan-approval-C2KLSDGO.js} +38 -34
  238. package/chunks/{theme-manager-EEWIQJ7J.js → theme-manager-JQ3ZGBP5.js} +39 -35
  239. package/chunks/{todoWrite-7WM3VDMY.js → todoWrite-2UO5G6G6.js} +32 -4
  240. package/chunks/{tool-search-Z3Z4AYKP.js → tool-search-FAZBFRJZ.js} +15 -14
  241. package/chunks/{total-session-admission-44JKRWQD.js → total-session-admission-5CALIVYO.js} +42 -38
  242. package/chunks/{trustedFolders-X2JEIO57.js → trustedFolders-KOPSP44S.js} +39 -35
  243. package/chunks/{update-relaunch-VWNPYDIP.js → update-relaunch-6QL2TICS.js} +5 -5
  244. package/chunks/{updateCheck-KAQH67DV.js → updateCheck-4Q6RIKFW.js} +41 -37
  245. package/chunks/{useAutoAcceptIndicator-JH6BCF7S.js → useAutoAcceptIndicator-Q5BMKZV3.js} +47 -43
  246. package/chunks/{validateNonInterActiveAuth-GIUJ2UFS.js → validateNonInterActiveAuth-GKOC5F6Z.js} +79 -75
  247. package/chunks/{version-BGLYIJUY.js → version-VSATY2LD.js} +1 -1
  248. package/chunks/{web-fetch-OTDU4VQF.js → web-fetch-JCLKL6NL.js} +14 -14
  249. package/chunks/{web-search-FP6SIHPR.js → web-search-DSQTFUBX.js} +8 -8
  250. package/chunks/{workflow-YCIVBYSB.js → workflow-M6QAVKVJ.js} +41 -37
  251. package/chunks/workspace-providers-status-YKLTLMJA.js +89 -0
  252. package/chunks/{workspace-registration-store-OTMS3H4C.js → workspace-registration-store-5DMGKU64.js} +1 -1
  253. package/chunks/{workspace-registry-O63R6IZ4.js → workspace-registry-PTYUSYXX.js} +42 -38
  254. package/chunks/{workspace-service-M6LLHKJ5.js → workspace-service-25ML3T47.js} +48 -44
  255. package/chunks/{workspace-skills-status-C2V7BAIS.js → workspace-skills-status-YKZWOYRX.js} +44 -40
  256. package/chunks/{workspace-trust-reconciler-IBUPOUJN.js → workspace-trust-reconciler-5FI2S3OS.js} +47 -43
  257. package/chunks/write-file-AY7VLP5X.js +78 -0
  258. package/chunks/zoom-image-S4LJZMD5.js +224 -0
  259. package/cli.js +50 -16
  260. package/package.json +3 -3
  261. package/web-shell/assets/{arc-75-Wdeo3.js → arc-xjArKHU2.js} +1 -1
  262. package/web-shell/assets/{architectureDiagram-3BPJPVTR-FKeXQbyP.js → architectureDiagram-3BPJPVTR-BgrQDNYG.js} +1 -1
  263. package/web-shell/assets/{blockDiagram-GPEHLZMM-CY0vc-A3.js → blockDiagram-GPEHLZMM-CXxWC-1_.js} +1 -1
  264. package/web-shell/assets/{c4Diagram-AAUBKEIU-CNP-A-8u.js → c4Diagram-AAUBKEIU-Dx1tLm3v.js} +1 -1
  265. package/web-shell/assets/channel-B1cyk94G.js +1 -0
  266. package/web-shell/assets/{chunk-2J33WTMH-GybS4Gii.js → chunk-2J33WTMH-CBxjogVR.js} +1 -1
  267. package/web-shell/assets/{chunk-4BX2VUAB-02H91V8v.js → chunk-4BX2VUAB-izb-rY5W.js} +1 -1
  268. package/web-shell/assets/{chunk-55IACEB6-D3M-2VT6.js → chunk-55IACEB6-NzLyvSb8.js} +1 -1
  269. package/web-shell/assets/{chunk-727SXJPM-CCu29u4H.js → chunk-727SXJPM-DVyKb0dl.js} +1 -1
  270. package/web-shell/assets/{chunk-AQP2D5EJ-CaFKWgrn.js → chunk-AQP2D5EJ-BtqL7NzB.js} +1 -1
  271. package/web-shell/assets/{chunk-FMBD7UC4-ZZpPqIwQ.js → chunk-FMBD7UC4-iNpdKIO0.js} +1 -1
  272. package/web-shell/assets/{chunk-ND2GUHAM-D22DqGs8.js → chunk-ND2GUHAM-DI7cbFmX.js} +1 -1
  273. package/web-shell/assets/{chunk-QZHKN3VN-Bu85S0fw.js → chunk-QZHKN3VN-3Y_-xFYs.js} +1 -1
  274. package/web-shell/assets/classDiagram-4FO5ZUOK-BpBYZoRE.js +1 -0
  275. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BpBYZoRE.js +1 -0
  276. package/web-shell/assets/{cose-bilkent-S5V4N54A-f1CK1Gwe.js → cose-bilkent-S5V4N54A--raRatZn.js} +1 -1
  277. package/web-shell/assets/{dagre-BM42HDAG-D0Ow8F_n.js → dagre-BM42HDAG-B8SU70mO.js} +1 -1
  278. package/web-shell/assets/{diagram-2AECGRRQ-BPrmTWp8.js → diagram-2AECGRRQ-ewgoakXo.js} +1 -1
  279. package/web-shell/assets/{diagram-5GNKFQAL-HccuFAzy.js → diagram-5GNKFQAL-Bm_JLTnS.js} +1 -1
  280. package/web-shell/assets/{diagram-KO2AKTUF-BrS76mbA.js → diagram-KO2AKTUF-DEIUjUy9.js} +1 -1
  281. package/web-shell/assets/{diagram-LMA3HP47-V7T9lU-5.js → diagram-LMA3HP47-C2Wmrpj-.js} +1 -1
  282. package/web-shell/assets/{diagram-OG6HWLK6-DKidyJMR.js → diagram-OG6HWLK6-CtYe6bFx.js} +1 -1
  283. package/web-shell/assets/{erDiagram-TEJ5UH35-DBadZIkp.js → erDiagram-TEJ5UH35-DfpHcWLV.js} +1 -1
  284. package/web-shell/assets/{flowDiagram-I6XJVG4X-BymfqdNJ.js → flowDiagram-I6XJVG4X-CAiUhio5.js} +1 -1
  285. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DOw340jf.js → ganttDiagram-6RSMTGT7-CYc7ezr4.js} +1 -1
  286. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-_8EiD8sl.js → gitGraphDiagram-PVQCEYII-70lbkcRS.js} +1 -1
  287. package/web-shell/assets/index-C1k3PDuU.css +5 -0
  288. package/web-shell/assets/index-C2GE3DAF.js +74 -0
  289. package/web-shell/assets/index-DZLIXILO.js +1750 -0
  290. package/web-shell/assets/{index-CKIadvET.js → index-Ww86nT9f.js} +1 -1
  291. package/web-shell/assets/{infoDiagram-5YYISTIA-D61KYQBu.js → infoDiagram-5YYISTIA-C7e8DWPa.js} +1 -1
  292. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CsiXSpNx.js → ishikawaDiagram-YF4QCWOH-BYLr2op-.js} +1 -1
  293. package/web-shell/assets/{journeyDiagram-JHISSGLW-Sdfionyh.js → journeyDiagram-JHISSGLW-hEibAHKX.js} +1 -1
  294. package/web-shell/assets/{kanban-definition-UN3LZRKU-C3WI3Cnl.js → kanban-definition-UN3LZRKU-F2rt8Uhp.js} +1 -1
  295. package/web-shell/assets/{linear-Dpigcc62.js → linear-DPhyNezd.js} +1 -1
  296. package/web-shell/assets/{mermaid.core-Ct97pqgW.js → mermaid.core-ZUtnug0n.js} +5 -5
  297. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BzeaN0rB.js → mindmap-definition-RKZ34NQL-DDWcMoi8.js} +1 -1
  298. package/web-shell/assets/{pieDiagram-4H26LBE5-CvjgcbVD.js → pieDiagram-4H26LBE5-CTRKzw1_.js} +1 -1
  299. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BUzgTNdH.js → quadrantDiagram-W4KKPZXB-CAEwYG_z.js} +1 -1
  300. package/web-shell/assets/{requirementDiagram-4Y6WPE33-B7zKlgUQ.js → requirementDiagram-4Y6WPE33-CRjnH9D9.js} +1 -1
  301. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Bb9CQgrT.js → sankeyDiagram-5OEKKPKP-LPQT_sOd.js} +1 -1
  302. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DJ6V7itG.js → sequenceDiagram-3UESZ5HK-Ht2Iqvb0.js} +1 -1
  303. package/web-shell/assets/{stateDiagram-AJRCARHV-IImflERY.js → stateDiagram-AJRCARHV-CIUdqOXu.js} +1 -1
  304. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BmqqQZ6w.js +1 -0
  305. package/web-shell/assets/{timeline-definition-PNZ67QCA-6Q_uWHKh.js → timeline-definition-PNZ67QCA-BcilneZF.js} +1 -1
  306. package/web-shell/assets/{vennDiagram-CIIHVFJN-TmyKyjwv.js → vennDiagram-CIIHVFJN-BljwiiH1.js} +1 -1
  307. package/web-shell/assets/{wardley-L42UT6IY-CRh9uiPv.js → wardley-L42UT6IY-DeKjkYjq.js} +1 -1
  308. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-59TKAW8w.js → wardleyDiagram-YWT4CUSO-L3U1H7KG.js} +1 -1
  309. package/web-shell/assets/{xychartDiagram-2RQKCTM6-GCSUIK2L.js → xychartDiagram-2RQKCTM6-IJnWsgMT.js} +1 -1
  310. package/web-shell/index.html +2 -2
  311. package/chunks/list-L2GA674Y.js +0 -88
  312. package/chunks/nonInteractiveCli-5T7KYKLK.js +0 -144
  313. package/chunks/workspace-providers-status-S35YAIUS.js +0 -85
  314. package/chunks/write-file-3BZC3EAE.js +0 -72
  315. package/chunks/zoom-image-TZ6S2O57.js +0 -351
  316. package/web-shell/assets/channel-DPYMT76A.js +0 -1
  317. package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +0 -1
  318. package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +0 -1
  319. package/web-shell/assets/index-D1eXNRHe.js +0 -1389
  320. package/web-shell/assets/index-DVLD4CQq.css +0 -5
  321. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +0 -1
@@ -2,16 +2,13 @@
2
2
  "use strict";
3
3
  import {
4
4
  listCommand
5
- } from "./chunk-EVKE2FZL.js";
5
+ } from "./chunk-KXDONCPU.js";
6
6
  import {
7
7
  getErrorMessage as getErrorMessage2
8
- } from "./chunk-T3O2B4XO.js";
9
- import {
10
- serveCommand
11
- } from "./chunk-S4WJVPZW.js";
8
+ } from "./chunk-CU47KXB5.js";
12
9
  import {
13
10
  ObservedChannelContactStore
14
- } from "./chunk-LGAOC3ZS.js";
11
+ } from "./chunk-675H6PLP.js";
15
12
  import {
16
13
  escapeAnsiCtrlCodes
17
14
  } from "./chunk-YDLJGZHL.js";
@@ -24,14 +21,17 @@ import {
24
21
  import {
25
22
  isLoopbackBind
26
23
  } from "./chunk-RXFQM6FQ.js";
24
+ import {
25
+ serveCommand
26
+ } from "./chunk-V4XNUDPE.js";
27
27
  import {
28
28
  resolvePath
29
- } from "./chunk-ZHBO7WVX.js";
29
+ } from "./chunk-CNTR4GR6.js";
30
30
  import {
31
31
  collectProviderModelsForProtocol,
32
32
  getAuthTypeFromEnv,
33
33
  resolveCliGenerationConfig
34
- } from "./chunk-KCO4FLFJ.js";
34
+ } from "./chunk-6TAASXWL.js";
35
35
  import {
36
36
  resolveSkillSettings
37
37
  } from "./chunk-Z4X5MTRT.js";
@@ -50,17 +50,17 @@ import {
50
50
  registerToolCallDispatch,
51
51
  selectFirstModel,
52
52
  sessionsPath
53
- } from "./chunk-BNWB5CYE.js";
53
+ } from "./chunk-D6MDRSZ6.js";
54
54
  import {
55
55
  getExtensionManager,
56
56
  requestChoicePluginNonInteractive,
57
57
  requestConsentNonInteractive,
58
58
  requestConsentOrFail,
59
59
  resolveExtensionCommandScope
60
- } from "./chunk-5MKRTI4T.js";
60
+ } from "./chunk-A7Y5H4TX.js";
61
61
  import {
62
62
  parseChannelConfig
63
- } from "./chunk-2XSLTRFZ.js";
63
+ } from "./chunk-I5BT7ADR.js";
64
64
  import {
65
65
  findCliEntryPath
66
66
  } from "./chunk-V6WHFGST.js";
@@ -91,7 +91,7 @@ import {
91
91
  import {
92
92
  normalizeWorkerDiagnostic,
93
93
  sanitizeWorkerDiagnostic
94
- } from "./chunk-GZ3RCT54.js";
94
+ } from "./chunk-6MPDY6ZG.js";
95
95
  import {
96
96
  normalizeServeChannelSelection
97
97
  } from "./chunk-ALMR3E6Q.js";
@@ -104,14 +104,14 @@ import {
104
104
  signalService,
105
105
  waitForExit,
106
106
  writeServiceInfo
107
- } from "./chunk-4G2BISNC.js";
107
+ } from "./chunk-IIUGIWWY.js";
108
108
  import {
109
109
  DEFAULT_BASE_URL,
110
110
  buildHeaders,
111
111
  clearAccount,
112
112
  loadAccount,
113
113
  saveAccount
114
- } from "./chunk-GEBV2JGB.js";
114
+ } from "./chunk-ZPZ7ZJEE.js";
115
115
  import {
116
116
  AcpBridge,
117
117
  ChannelLoopScheduler,
@@ -122,43 +122,44 @@ import {
122
122
  isChannelProactiveDeliveryError,
123
123
  sanitizeLogText,
124
124
  sanitizePromptText
125
- } from "./chunk-7I5GTCT4.js";
125
+ } from "./chunk-JCJ7LKNA.js";
126
126
  import {
127
127
  assembleMcpServers,
128
128
  getPendingGatedMcpServers,
129
129
  mcpCommand
130
- } from "./chunk-6RPMI2AB.js";
130
+ } from "./chunk-KR32NIAN.js";
131
131
  import {
132
132
  loadSettings
133
- } from "./chunk-EIF3FXTB.js";
133
+ } from "./chunk-W3UKBMSI.js";
134
134
  import {
135
135
  detectSystemLanguage,
136
136
  getCurrentLanguage,
137
137
  initializeI18n,
138
138
  resolveLanguageSetting,
139
139
  t
140
- } from "./chunk-TCIFAA7K.js";
140
+ } from "./chunk-3F2WDAV6.js";
141
141
  import {
142
142
  loadEnvironment
143
- } from "./chunk-2N7CODY5.js";
143
+ } from "./chunk-EU5TBFJI.js";
144
+ import {
145
+ isWorkspaceTrusted
146
+ } from "./chunk-P755N4CS.js";
147
+ import {
148
+ require_strip_json_comments
149
+ } from "./chunk-ALGGS7UH.js";
144
150
  import {
145
151
  hideBin,
146
152
  yargs_default
147
153
  } from "./chunk-XFSFZCM5.js";
148
154
  import {
149
155
  getCliVersion
150
- } from "./chunk-VYOXCEPJ.js";
156
+ } from "./chunk-2KKCCLPT.js";
151
157
  import {
152
158
  getPackageJson
153
159
  } from "./chunk-VJNBRRZG.js";
154
- import {
155
- isWorkspaceTrusted
156
- } from "./chunk-Q43KPN7X.js";
157
- import {
158
- require_strip_json_comments
159
- } from "./chunk-ALGGS7UH.js";
160
160
  import {
161
161
  writeStderrLine,
162
+ writeStderrLineSafe,
162
163
  writeStdoutLine
163
164
  } from "./chunk-OWAK7LMW.js";
164
165
  import {
@@ -194,7 +195,7 @@ import {
194
195
  unquoteCStylePath,
195
196
  updateChannelMemoryEntry,
196
197
  updateSetting
197
- } from "./chunk-X5WNMMIA.js";
198
+ } from "./chunk-54YCNSK5.js";
198
199
  import {
199
200
  nextFireTime,
200
201
  parseCron
@@ -202,27 +203,27 @@ import {
202
203
  import {
203
204
  parseBooleanEnvFlag,
204
205
  resolveTelemetrySettings
205
- } from "./chunk-75MIQ3LV.js";
206
+ } from "./chunk-Z3S5EMOW.js";
206
207
  import {
207
208
  getAllGeminiMdFilenames,
208
209
  setGeminiMdFilename
209
- } from "./chunk-PT722TDT.js";
210
+ } from "./chunk-DUNI4EBW.js";
210
211
  import {
211
212
  SchemaValidator,
212
213
  ToolNames
213
- } from "./chunk-Y6AXW2OG.js";
214
+ } from "./chunk-MM7TH7ZM.js";
214
215
  import {
215
216
  DEFAULT_QWEN_EMBEDDING_MODEL
216
- } from "./chunk-VCPIZRYH.js";
217
+ } from "./chunk-HIVKI6O6.js";
217
218
  import {
218
219
  isTlsVerificationDisabled
219
- } from "./chunk-WZRWHXFE.js";
220
+ } from "./chunk-Q3T5KA2V.js";
220
221
  import {
221
222
  atomicWriteFileSync
222
- } from "./chunk-7XATOOE7.js";
223
+ } from "./chunk-HC45LTEN.js";
223
224
  import {
224
225
  recordChannelMemoryRecallMetrics
225
- } from "./chunk-BGTQCTQW.js";
226
+ } from "./chunk-QARJNL2V.js";
226
227
  import {
227
228
  FatalConfigError,
228
229
  FatalSandboxError,
@@ -230,7 +231,7 @@ import {
230
231
  createDebugLogger,
231
232
  getErrorMessage,
232
233
  isNodeError
233
- } from "./chunk-UHUSJ6X7.js";
234
+ } from "./chunk-E2BHWIDT.js";
234
235
  import {
235
236
  init_esbuild_shims
236
237
  } from "./chunk-5O2XNYP6.js";
@@ -363,10 +364,10 @@ var require_command_exists = __commonJS({
363
364
  module.exports = /* @__PURE__ */ __name(function commandExists2(commandName, callback) {
364
365
  var cleanedCommandName = cleanInput(commandName);
365
366
  if (!callback && typeof Promise !== "undefined") {
366
- return new Promise(function(resolve14, reject) {
367
+ return new Promise(function(resolve15, reject) {
367
368
  commandExists2(commandName, function(error, output) {
368
369
  if (output) {
369
- resolve14(commandName);
370
+ resolve15(commandName);
370
371
  } else {
371
372
  reject(error);
372
373
  }
@@ -2622,7 +2623,7 @@ var stopCommand = {
2622
2623
  if (argv["daemon-url"]) {
2623
2624
  const token = argv.token ?? process.env[QWEN_SERVER_TOKEN_ENV] ?? process.env[QWEN_DAEMON_TOKEN_ENV];
2624
2625
  try {
2625
- const sdk = await import("./daemon-Q2AB5Z23.js");
2626
+ const sdk = await import("./daemon-PCNCI5YU.js");
2626
2627
  const client = new sdk.DaemonClient({
2627
2628
  baseUrl: argv["daemon-url"],
2628
2629
  ...token ? { token } : {}
@@ -2808,7 +2809,7 @@ var statusCommand = {
2808
2809
  if (argv["daemon-url"]) {
2809
2810
  const token = argv.token ?? process.env[QWEN_SERVER_TOKEN_ENV] ?? process.env[QWEN_DAEMON_TOKEN_ENV];
2810
2811
  try {
2811
- const sdk = await import("./daemon-Q2AB5Z23.js");
2812
+ const sdk = await import("./daemon-PCNCI5YU.js");
2812
2813
  const client = new sdk.DaemonClient({
2813
2814
  baseUrl: argv["daemon-url"],
2814
2815
  ...token ? { token } : {}
@@ -2919,7 +2920,7 @@ var reloadCommand = {
2919
2920
  const token = resolveToken(argv.token);
2920
2921
  let sdk;
2921
2922
  try {
2922
- sdk = await import("./daemon-Q2AB5Z23.js");
2923
+ sdk = await import("./daemon-PCNCI5YU.js");
2923
2924
  } catch (err) {
2924
2925
  writeStderrLine(
2925
2926
  `[Channel] Failed to load daemon SDK: ${safeChannelCommandErrorMessage(err)}`
@@ -2999,7 +3000,7 @@ var setCommand2 = {
2999
3000
  const selection = names[0] === "all" ? { mode: "all" } : { mode: "names", names };
3000
3001
  let sdk;
3001
3002
  try {
3002
- sdk = await import("./daemon-Q2AB5Z23.js");
3003
+ sdk = await import("./daemon-PCNCI5YU.js");
3003
3004
  } catch (error) {
3004
3005
  writeStderrLine(
3005
3006
  `[Channel] Failed to load daemon SDK: ${safeChannelCommandErrorMessage(error)}`
@@ -3125,7 +3126,7 @@ function createDaemonChannelBridgeFacade(bridge, opts) {
3125
3126
  }
3126
3127
  __name(createDaemonChannelBridgeFacade, "createDaemonChannelBridgeFacade");
3127
3128
  async function loadDaemonSdk() {
3128
- return await import("./daemon-Q2AB5Z23.js");
3129
+ return await import("./daemon-PCNCI5YU.js");
3129
3130
  }
3130
3131
  __name(loadDaemonSdk, "loadDaemonSdk");
3131
3132
  function selectedChannelNames(channelsConfig, selection) {
@@ -3172,12 +3173,12 @@ async function abortableStartup(value, signal) {
3172
3173
  const promise = Promise.resolve(value);
3173
3174
  if (!signal) return await promise;
3174
3175
  if (signal.aborted) throw startupAbortError();
3175
- return await new Promise((resolve14, reject) => {
3176
+ return await new Promise((resolve15, reject) => {
3176
3177
  const onAbort = /* @__PURE__ */ __name(() => {
3177
3178
  reject(startupAbortError());
3178
3179
  }, "onAbort");
3179
3180
  signal.addEventListener("abort", onAbort, { once: true });
3180
- promise.then(resolve14, reject).finally(() => {
3181
+ promise.then(resolve15, reject).finally(() => {
3181
3182
  signal.removeEventListener("abort", onAbort);
3182
3183
  });
3183
3184
  });
@@ -3584,7 +3585,7 @@ function reportStartupToSupervisor(message, signal, subscribeMessage = (listener
3584
3585
  if (!send) {
3585
3586
  return Promise.reject(new Error("Channel worker IPC is unavailable."));
3586
3587
  }
3587
- return new Promise((resolve14, reject) => {
3588
+ return new Promise((resolve15, reject) => {
3588
3589
  let settled = false;
3589
3590
  let unsubscribeMessage = /* @__PURE__ */ __name(() => {
3590
3591
  }, "unsubscribeMessage");
@@ -3598,7 +3599,7 @@ function reportStartupToSupervisor(message, signal, subscribeMessage = (listener
3598
3599
  settled = true;
3599
3600
  cleanup();
3600
3601
  if (error) reject(error);
3601
- else resolve14();
3602
+ else resolve15();
3602
3603
  }, "finish");
3603
3604
  const onMessage = /* @__PURE__ */ __name((value) => {
3604
3605
  if (isChannelStartupReportAckMessage(value)) {
@@ -3846,8 +3847,8 @@ var daemonWorkerCommand = {
3846
3847
  let shuttingDown = false;
3847
3848
  let exitCode = 0;
3848
3849
  let finish;
3849
- const finished = new Promise((resolve14) => {
3850
- finish = resolve14;
3850
+ const finished = new Promise((resolve15) => {
3851
+ finish = resolve15;
3851
3852
  });
3852
3853
  const shutdown = /* @__PURE__ */ __name(async (reason) => {
3853
3854
  if (shuttingDown) {
@@ -3875,8 +3876,8 @@ var daemonWorkerCommand = {
3875
3876
  ...activeChannelDeliveries.values(),
3876
3877
  ...activeWebhookTasks.values()
3877
3878
  ]),
3878
- new Promise((resolve14) => {
3879
- const timer = setTimeout(resolve14, WORKER_SHUTDOWN_DRAIN_MS);
3879
+ new Promise((resolve15) => {
3880
+ const timer = setTimeout(resolve15, WORKER_SHUTDOWN_DRAIN_MS);
3880
3881
  timer.unref();
3881
3882
  })
3882
3883
  ]);
@@ -6683,6 +6684,7 @@ function unmarkedComments(comments) {
6683
6684
  __name(unmarkedComments, "unmarkedComments");
6684
6685
 
6685
6686
  // packages/cli/src/commands/review/compose-review.ts
6687
+ var LOW_SIGNAL_SRC_DIFF_LINES = 100;
6686
6688
  function withMarker(line) {
6687
6689
  return line.startsWith(CRITICAL_PREFIX) ? line : `${CRITICAL_PREFIX} ${line}`;
6688
6690
  }
@@ -6927,6 +6929,19 @@ function composeReview(input) {
6927
6929
  downgraded = true;
6928
6930
  downgradedFrom = "Request changes";
6929
6931
  }
6932
+ let lowSignal = null;
6933
+ if (event === "APPROVE" && input.planPath) {
6934
+ try {
6935
+ const plan = JSON.parse(
6936
+ readFileSync8(input.planPath, "utf8")
6937
+ );
6938
+ const src = Number(plan.srcDiffLines ?? 0);
6939
+ if (src > LOW_SIGNAL_SRC_DIFF_LINES) {
6940
+ lowSignal = { agents: requiredAgents(plan).length, srcDiffLines: src };
6941
+ }
6942
+ } catch {
6943
+ }
6944
+ }
6930
6945
  const footer = `_\u2014 ${modelId} via Qwen Code /review_`;
6931
6946
  const bilingual = bilingualFromPlan(input.planPath, input.prBodyFetcher);
6932
6947
  const render = /* @__PURE__ */ __name((parts, sep4) => {
@@ -7075,7 +7090,8 @@ ${footer}`;
7075
7090
  cappedBy,
7076
7091
  downgraded,
7077
7092
  downgradedFrom,
7078
- remediation
7093
+ remediation,
7094
+ lowSignal
7079
7095
  };
7080
7096
  }
7081
7097
  if (event === "APPROVE") {
@@ -7092,7 +7108,8 @@ ${footer}`;
7092
7108
  cappedBy,
7093
7109
  downgraded,
7094
7110
  downgradedFrom,
7095
- remediation
7111
+ remediation,
7112
+ lowSignal
7096
7113
  };
7097
7114
  }
7098
7115
  const clauses = [];
@@ -7146,7 +7163,8 @@ ${footer}`;
7146
7163
  cappedBy,
7147
7164
  downgraded,
7148
7165
  downgradedFrom,
7149
- remediation
7166
+ remediation,
7167
+ lowSignal
7150
7168
  };
7151
7169
  }
7152
7170
  __name(composeReview, "composeReview");
@@ -7400,6 +7418,9 @@ function verdictLine(r) {
7400
7418
  } else if (r.downgraded) {
7401
7419
  line += " \u2014 downgraded by a presubmit check";
7402
7420
  }
7421
+ if (r.event === "APPROVE" && r.lowSignal) {
7422
+ line += ` \u2014 low signal: none of the ${r.lowSignal.agents} review agents reported a finding on a non-trivial diff (${r.lowSignal.srcDiffLines} source diff lines)`;
7423
+ }
7403
7424
  return line;
7404
7425
  }
7405
7426
  __name(verdictLine, "verdictLine");
@@ -10390,7 +10411,7 @@ function buildRoleBrief(report, role, opts = {}) {
10390
10411
  if (typeof base === "string" && base && pr !== void 0 && opts.planPath) {
10391
10412
  parts.push(
10392
10413
  "",
10393
- "**Then run the test-efficacy probe.** A green suite says the tests pass. It does not say they would have failed had the change been wrong, and those are different claims:",
10414
+ "**Then run the test-efficacy probe.** A green suite says the tests pass. It does not say they would have failed had the change been wrong, and those are different claims. Give this call `timeout: 600000` too \u2014 besides the revert probe it runs up to 8 single-statement deletion mutants, each a suite run, and it budgets itself to finish inside that ceiling:",
10394
10415
  "",
10395
10416
  "```bash",
10396
10417
  `"\${QWEN_CODE_CLI:-qwen}" review test-efficacy ${resolve11(opts.planPath)} \\`,
@@ -10399,7 +10420,7 @@ function buildRoleBrief(report, role, opts = {}) {
10399
10420
  ` --out ${resolve11(dirname12(opts.planPath), `qwen-review-pr-${pr}-efficacy.json`)}`,
10400
10421
  "```",
10401
10422
  "",
10402
- 'Read its `findings[]`. `kind: "unreachable"` is a test the project\'s test command never collects \u2014 it did not run here and it does not run in CI. `kind: "inert"` is a test that **still passed with the change reverted**: it is green whether or not the feature exists, so it cannot catch a regression in it. Report each as a **Suggestion** with `Source: [test]`, saying plainly which behaviour ships unprotected. **`inconclusive` is not a finding** \u2014 reverting the source often breaks the test\'s own compile, and that is not the test catching anything. Note it and move on.'
10423
+ 'Read its `findings[]`. `kind: "unreachable"` is a test the project\'s test command never collects \u2014 it did not run here and it does not run in CI. `kind: "inert"` is a test that **still passed with the change reverted**: it is green whether or not the feature exists, so it cannot catch a regression in it. `kind: "mutant-survived"` is a single safety statement the diff added (a `.clear()`, an `.abort(\u2026)`, a reset-to-empty) that was **deleted and every affected test stayed green** \u2014 no test in the diff fails when it is removed, which the whole-file revert cannot see when the file\'s other, tested behaviours mask it. Report each as a **Suggestion** with `Source: [test]`, saying plainly which behaviour has no test in this diff that would catch its removal. **`inconclusive` is not a finding** \u2014 for probes and mutants alike, reverting or mutating the source often breaks the test\'s own compile, and that is not the test catching anything. Mutants counted in `mutants.skippedForBudget`, `mutants.skippedForCap`, or `mutants.skippedForBaseline` never ran \u2014 not findings either. `mutants.note`, when present, explains why no mutants ran at all. Note them and move on.'
10403
10424
  );
10404
10425
  }
10405
10426
  }
@@ -10880,7 +10901,13 @@ var agentPromptCommand = {
10880
10901
  // packages/cli/src/commands/review/build-test.ts
10881
10902
  init_esbuild_shims();
10882
10903
  import { spawnSync as spawnSync2 } from "node:child_process";
10883
- import { existsSync as existsSync5, readFileSync as readFileSync16, rmSync as rmSync4, writeFileSync as writeFileSync15 } from "node:fs";
10904
+ import {
10905
+ existsSync as existsSync5,
10906
+ readFileSync as readFileSync16,
10907
+ rmSync as rmSync4,
10908
+ statfsSync,
10909
+ writeFileSync as writeFileSync15
10910
+ } from "node:fs";
10884
10911
  import { join as join12, resolve as resolve12 } from "node:path";
10885
10912
 
10886
10913
  // packages/cli/src/commands/review/lib/workspaces.ts
@@ -11081,6 +11108,18 @@ ${rescued.join("\n")}
11081
11108
  return s.slice(0, KEEP_HEAD) + marker + s.slice(-KEEP_TAIL);
11082
11109
  }
11083
11110
  __name(trimOutput, "trimOutput");
11111
+ var INSTALL_MIN_FREE_BYTES = 3 * 1024 ** 3;
11112
+ var BUILD_MIN_FREE_BYTES = 1024 ** 3;
11113
+ function freeDiskBytes(dir) {
11114
+ try {
11115
+ const s = statfsSync(dir);
11116
+ return s.bavail * s.bsize;
11117
+ } catch {
11118
+ return null;
11119
+ }
11120
+ }
11121
+ __name(freeDiskBytes, "freeDiskBytes");
11122
+ var gib = /* @__PURE__ */ __name((bytes) => (bytes / 1024 ** 3).toFixed(1), "gib");
11084
11123
  function buildRunEnv(base = process.env) {
11085
11124
  return {
11086
11125
  ...base,
@@ -11226,7 +11265,14 @@ function runBuildTest(args) {
11226
11265
  );
11227
11266
  }
11228
11267
  if (args.install && npmLock && !installComplete()) {
11229
- const install = exec("npm ci --no-audit --no-fund", root, perCommandMs);
11268
+ const installCmd = "npm ci --no-audit --no-fund";
11269
+ const free = freeDiskBytes(root);
11270
+ if (free !== null && free < INSTALL_MIN_FREE_BYTES) {
11271
+ results.ok = false;
11272
+ results.note = `Insufficient disk space (${gib(free)}G free, need ~${gib(INSTALL_MIN_FREE_BYTES)}G): skipped \`${installCmd}\`, so nothing could be built or tested. This is an environment issue, not a code finding \u2014 report it as informational.`;
11273
+ return results;
11274
+ }
11275
+ const install = exec(installCmd, root, perCommandMs);
11230
11276
  results.install = install;
11231
11277
  if (install.timedOut) results.timedOut.push(install.command);
11232
11278
  if (install.timedOut) {
@@ -11245,6 +11291,12 @@ function runBuildTest(args) {
11245
11291
  return results;
11246
11292
  }
11247
11293
  }
11294
+ const freeForBuild = freeDiskBytes(root);
11295
+ if (freeForBuild !== null && freeForBuild < BUILD_MIN_FREE_BYTES) {
11296
+ results.ok = false;
11297
+ results.note = `Insufficient disk space (${gib(freeForBuild)}G free, need ~${gib(BUILD_MIN_FREE_BYTES)}G): skipped the build and tests rather than fill the disk mid-compile. This is an environment issue, not a code finding \u2014 report it as informational.`;
11298
+ return results;
11299
+ }
11248
11300
  const alsoBuild = [];
11249
11301
  let set = buildSetFor(affected, packages);
11250
11302
  const built = /* @__PURE__ */ new Set();
@@ -11813,6 +11865,288 @@ function planTestEfficacy(files, workspaceGlobs) {
11813
11865
  };
11814
11866
  }
11815
11867
  __name(planTestEfficacy, "planTestEfficacy");
11868
+ var MAX_MUTANTS = 8;
11869
+ var PROBE_RUN_TIMEOUT_MS = 3e5;
11870
+ var TOTAL_BUDGET_MS = 54e4;
11871
+ var RUN_ESTIMATE_MARGIN_MS = 15e3;
11872
+ var SAFETY_VERB_RE = /\.(?:clear|delete|reset|abort|removeListener|unref)\(|=\s*\[\]\s*;$|=\s*new\s+(?:Map|Set|WeakMap|WeakSet)(?:<[^=;]*>)?\(\)\s*;$/;
11873
+ var MUTANT_SOURCE_RE = /\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs)$/;
11874
+ var DECLARATION_FILE_RE = /\.d\.[cm]?ts$/;
11875
+ var NON_STATEMENT_START_RE = /^(?:const|let|var|function|class|interface|type|enum|import|export|return|throw|yield|if|for|while|switch|do|else|try|catch|finally|case|default|break|continue|async|public|private|protected|readonly|static)\b/;
11876
+ function skipTemplateOnLine(line, start) {
11877
+ let depth = 0;
11878
+ for (let i = start + 1; i < line.length; i++) {
11879
+ const ch = line[i];
11880
+ if (ch === "\\") {
11881
+ i++;
11882
+ } else if (depth === 0) {
11883
+ if (ch === "`") return i;
11884
+ if (ch === "$" && line[i + 1] === "{") {
11885
+ depth = 1;
11886
+ i++;
11887
+ }
11888
+ } else if (ch === "{") {
11889
+ depth++;
11890
+ } else if (ch === "}") {
11891
+ depth--;
11892
+ }
11893
+ }
11894
+ return -1;
11895
+ }
11896
+ __name(skipTemplateOnLine, "skipTemplateOnLine");
11897
+ function scanLineDelimiters(line) {
11898
+ let paren = 0;
11899
+ let bracket = 0;
11900
+ let brace = 0;
11901
+ for (let i = 0; i < line.length; i++) {
11902
+ const ch = line[i];
11903
+ if (ch === "`") {
11904
+ const close = skipTemplateOnLine(line, i);
11905
+ if (close < 0) return null;
11906
+ i = close;
11907
+ continue;
11908
+ }
11909
+ if (ch === '"' || ch === "'") {
11910
+ i++;
11911
+ while (i < line.length && line[i] !== ch) {
11912
+ if (line[i] === "\\") i++;
11913
+ i++;
11914
+ }
11915
+ if (i >= line.length) return null;
11916
+ continue;
11917
+ }
11918
+ if (ch === "/" && line[i + 1] === "/") break;
11919
+ if (ch === "/" && line[i + 1] === "*") {
11920
+ const close = line.indexOf("*/", i + 2);
11921
+ if (close < 0) return null;
11922
+ i = close + 1;
11923
+ continue;
11924
+ }
11925
+ if (ch === "(") paren++;
11926
+ else if (ch === ")") paren--;
11927
+ else if (ch === "[") bracket++;
11928
+ else if (ch === "]") bracket--;
11929
+ else if (ch === "{") brace++;
11930
+ else if (ch === "}") brace--;
11931
+ if (paren < 0 || bracket < 0 || brace < 0) return null;
11932
+ }
11933
+ return { paren, bracket, brace };
11934
+ }
11935
+ __name(scanLineDelimiters, "scanLineDelimiters");
11936
+ function scanFileLines(content) {
11937
+ const inLiteral = [];
11938
+ const codeLines = [];
11939
+ let state = "code";
11940
+ const templates = [];
11941
+ let buf = "";
11942
+ let lineStart = 0;
11943
+ let rawLine = false;
11944
+ const inTemplateOrComment = /* @__PURE__ */ __name(() => state !== "code" || templates.length > 0, "inTemplateOrComment");
11945
+ inLiteral.push(inTemplateOrComment());
11946
+ const endLine = /* @__PURE__ */ __name((i) => {
11947
+ codeLines.push(rawLine ? content.slice(lineStart, i).trim() : buf.trim());
11948
+ buf = "";
11949
+ rawLine = false;
11950
+ lineStart = i + 1;
11951
+ }, "endLine");
11952
+ for (let i = 0; i < content.length; i++) {
11953
+ const ch = content[i];
11954
+ if (ch === "\n") {
11955
+ endLine(i);
11956
+ inLiteral.push(inTemplateOrComment());
11957
+ continue;
11958
+ }
11959
+ if (templates.length > 0) {
11960
+ const top = templates.length - 1;
11961
+ if (ch === "\\" && content[i + 1] !== "\n") {
11962
+ i++;
11963
+ } else if (templates[top] < 0) {
11964
+ if (ch === "`") {
11965
+ templates.pop();
11966
+ if (templates.length === 0) buf += "`";
11967
+ } else if (ch === "$" && content[i + 1] === "{") {
11968
+ templates[top] = 0;
11969
+ i++;
11970
+ }
11971
+ } else if (ch === "`") {
11972
+ templates.push(-1);
11973
+ } else if (ch === "{") {
11974
+ templates[top]++;
11975
+ } else if (ch === "}") {
11976
+ if (templates[top] === 0) templates[top] = -1;
11977
+ else templates[top]--;
11978
+ }
11979
+ continue;
11980
+ }
11981
+ if (state === "comment") {
11982
+ if (ch === "*" && content[i + 1] === "/") {
11983
+ state = "code";
11984
+ i++;
11985
+ }
11986
+ continue;
11987
+ }
11988
+ if (ch === "`") {
11989
+ buf += "`";
11990
+ templates.push(-1);
11991
+ } else if (ch === "/" && content[i + 1] === "*") {
11992
+ state = "comment";
11993
+ i++;
11994
+ } else if (ch === "/" && content[i + 1] === "/") {
11995
+ while (i + 1 < content.length && content[i + 1] !== "\n") i++;
11996
+ } else if (ch === '"' || ch === "'") {
11997
+ let k = i + 1;
11998
+ while (k < content.length && content[k] !== ch && content[k] !== "\n") {
11999
+ if (content[k] === "\\" && content[k + 1] !== "\n") k++;
12000
+ k++;
12001
+ }
12002
+ if (k < content.length && content[k] === ch) {
12003
+ buf += ch + ch;
12004
+ i = k;
12005
+ } else {
12006
+ rawLine = true;
12007
+ i = k < content.length && content[k] === "\n" ? k - 1 : k;
12008
+ }
12009
+ } else {
12010
+ buf += ch;
12011
+ }
12012
+ }
12013
+ endLine(content.length);
12014
+ return {
12015
+ inLiteral,
12016
+ codeLines,
12017
+ endState: templates.length > 0 ? "template" : state
12018
+ };
12019
+ }
12020
+ __name(scanFileLines, "scanFileLines");
12021
+ function insideClassBody(codeLines, idx) {
12022
+ let depth = 0;
12023
+ for (let j = idx - 1; j >= 0; j--) {
12024
+ const code = codeLines[j];
12025
+ for (let i = code.length - 1; i >= 0; i--) {
12026
+ const ch = code[i];
12027
+ if (ch === "}") depth++;
12028
+ else if (ch === "{") {
12029
+ if (depth === 0) {
12030
+ if (/\bclass\b/.test(code.slice(0, i))) return true;
12031
+ for (let k = j - 1; k >= 0; k--) {
12032
+ const prev = codeLines[k];
12033
+ if (prev.includes(";")) break;
12034
+ const d = scanLineDelimiters(prev);
12035
+ if (!d || d.brace !== 0) break;
12036
+ if (/\bclass\b/.test(prev)) return true;
12037
+ }
12038
+ return false;
12039
+ }
12040
+ depth--;
12041
+ }
12042
+ }
12043
+ }
12044
+ return false;
12045
+ }
12046
+ __name(insideClassBody, "insideClassBody");
12047
+ function isRemovableStatement(lines2, codeLines, idx) {
12048
+ const t2 = (lines2[idx] ?? "").trim();
12049
+ if (!(codeLines[idx] ?? "").endsWith(";")) return false;
12050
+ if ((codeLines[idx] ?? "").slice(0, -1).includes(";")) return false;
12051
+ if (!/^(?:await\s+)?[A-Za-z_$]/.test(t2)) return false;
12052
+ if (NON_STATEMENT_START_RE.test(t2)) return false;
12053
+ if (insideClassBody(codeLines, idx)) return false;
12054
+ const depth = scanLineDelimiters(t2);
12055
+ if (!depth || depth.paren !== 0 || depth.bracket !== 0 || depth.brace !== 0) {
12056
+ return false;
12057
+ }
12058
+ let j = idx - 1;
12059
+ while (j >= 0 && codeLines[j] === "") j--;
12060
+ if (j < 0) return true;
12061
+ return /[;{}]$/.test(codeLines[j]);
12062
+ }
12063
+ __name(isRemovableStatement, "isRemovableStatement");
12064
+ function selectMutants(files, cap = MAX_MUTANTS) {
12065
+ const preferred = [];
12066
+ const rest = [];
12067
+ const derailed = [];
12068
+ for (const f of files) {
12069
+ const lines2 = f.content.split("\n");
12070
+ const { inLiteral, codeLines, endState } = scanFileLines(f.content);
12071
+ if (endState !== "code") {
12072
+ derailed.push(f.file);
12073
+ continue;
12074
+ }
12075
+ for (const n of [...f.addedLines].sort((a, b) => a - b)) {
12076
+ const raw = lines2[n - 1];
12077
+ if (raw === void 0) continue;
12078
+ const t2 = raw.trim();
12079
+ if (!SAFETY_VERB_RE.test(codeLines[n - 1] ?? "")) continue;
12080
+ if (inLiteral[n - 1]) continue;
12081
+ if (!isRemovableStatement(lines2, codeLines, n - 1)) continue;
12082
+ (f.hasNewTests ? preferred : rest).push({
12083
+ file: f.file,
12084
+ line: n,
12085
+ statement: t2
12086
+ });
12087
+ }
12088
+ }
12089
+ const eligible = [...preferred, ...rest];
12090
+ return {
12091
+ selected: eligible.slice(0, cap),
12092
+ skippedForCap: Math.max(0, eligible.length - cap),
12093
+ derailed
12094
+ };
12095
+ }
12096
+ __name(selectMutants, "selectMutants");
12097
+ function parseAddedLines(diffText) {
12098
+ const added = /* @__PURE__ */ new Map();
12099
+ let file = null;
12100
+ let inHunk = false;
12101
+ let newLine = 0;
12102
+ for (const line of diffText.split("\n")) {
12103
+ if (line.startsWith("diff --git ")) {
12104
+ inHunk = false;
12105
+ continue;
12106
+ }
12107
+ if (!inHunk && line.startsWith("+++ ")) {
12108
+ const p = line.slice(4).split(" ")[0];
12109
+ file = p === "/dev/null" ? null : p.replace(/^b\//, "");
12110
+ continue;
12111
+ }
12112
+ const m = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(line);
12113
+ if (m) {
12114
+ newLine = Number(m[1]);
12115
+ inHunk = true;
12116
+ continue;
12117
+ }
12118
+ if (!inHunk || !file) continue;
12119
+ if (line.startsWith("+")) {
12120
+ const list = added.get(file);
12121
+ if (list) list.push(newLine);
12122
+ else added.set(file, [newLine]);
12123
+ newLine++;
12124
+ } else if (!line.startsWith("-") && !line.startsWith("\\")) {
12125
+ newLine++;
12126
+ }
12127
+ }
12128
+ return added;
12129
+ }
12130
+ __name(parseAddedLines, "parseAddedLines");
12131
+ function hasCollocatedNewTest(file, testPaths) {
12132
+ const stem = file.replace(/\.[^./]+$/, "");
12133
+ return testPaths.some((t2) => {
12134
+ const tstem = t2.replace(/\.[^./]+$/, "");
12135
+ return tstem === `${stem}.test` || tstem === `${stem}.spec`;
12136
+ });
12137
+ }
12138
+ __name(hasCollocatedNewTest, "hasCollocatedNewTest");
12139
+ function classifyMutantRun(perFile) {
12140
+ if (perFile.some((r) => r.verdict === "gated")) return "killed";
12141
+ if (perFile.length === 0 || perFile.some((r) => r.verdict === "inconclusive"))
12142
+ return "inconclusive";
12143
+ return "survived";
12144
+ }
12145
+ __name(classifyMutantRun, "classifyMutantRun");
12146
+ function fitsAnotherMutantRun(remainingMs, estimatedRunMs) {
12147
+ return remainingMs >= estimatedRunMs;
12148
+ }
12149
+ __name(fitsAnotherMutantRun, "fitsAnotherMutantRun");
11816
12150
  function classifyProbeRun(exitCode, stdout, probes, stderr = "") {
11817
12151
  let parsed;
11818
12152
  const start = stdout.indexOf("{");
@@ -11885,6 +12219,19 @@ function gitOut(cwd, ...args) {
11885
12219
  return (r.stdout ?? "").trim();
11886
12220
  }
11887
12221
  __name(gitOut, "gitOut");
12222
+ function gitCapture(cwd, ...args) {
12223
+ const r = spawnSync3("git", args, {
12224
+ cwd,
12225
+ encoding: "utf8",
12226
+ maxBuffer: 64 * 1024 * 1024
12227
+ });
12228
+ if (r.error) throw r.error;
12229
+ if (r.status !== 0) {
12230
+ throw new Error(`git ${args.join(" ")} failed: ${r.stderr ?? ""}`);
12231
+ }
12232
+ return r.stdout ?? "";
12233
+ }
12234
+ __name(gitCapture, "gitCapture");
11888
12235
  function existsAtRev(cwd, rev, path3) {
11889
12236
  const r = spawnSync3("git", ["cat-file", "-e", `${rev}:${path3}`], { cwd });
11890
12237
  if (r.error) throw r.error;
@@ -11931,7 +12278,61 @@ function probeCleanupFailureDetail(probeTree, removeError, sweepStderr) {
11931
12278
  return `could not remove probe worktree ${probeTree}${why ? `: ${why}` : ""}`;
11932
12279
  }
11933
12280
  __name(probeCleanupFailureDetail, "probeCleanupFailureDetail");
12281
+ function runProbeSuite(probeTree, probes, deadlineAt, now = Date.now) {
12282
+ const started = now();
12283
+ const timeout = deadlineAt !== void 0 ? Math.max(1, Math.min(PROBE_RUN_TIMEOUT_MS, deadlineAt - started)) : PROBE_RUN_TIMEOUT_MS;
12284
+ const r = spawnSync3("npx", ["vitest", "run", "--reporter=json", ...probes], {
12285
+ cwd: probeTree,
12286
+ encoding: "utf8",
12287
+ timeout,
12288
+ // Vitest's JSON reporter on a large suite easily exceeds spawnSync's
12289
+ // 1 MiB default stdout buffer, which returns ENOBUFS and turns every
12290
+ // probe `inconclusive`. Match the 64 MiB ceiling the gh wrapper uses.
12291
+ maxBuffer: 64 * 1024 * 1024
12292
+ });
12293
+ if (r.error) throw r.error;
12294
+ if (r.signal) {
12295
+ throw new Error(
12296
+ `runner killed by ${r.signal}${r.signal === "SIGTERM" ? ` (probe timed out after ${Math.round(timeout / 1e3)}s)` : ""}`
12297
+ );
12298
+ }
12299
+ return {
12300
+ perFile: classifyProbeRun(
12301
+ r.status ?? 1,
12302
+ `${r.stdout ?? ""}`,
12303
+ probes,
12304
+ `${r.stderr ?? ""}`
12305
+ ),
12306
+ ms: now() - started
12307
+ };
12308
+ }
12309
+ __name(runProbeSuite, "runProbeSuite");
12310
+ function runOneMutant(probeTree, mutant, probes, deadlineAt, now = Date.now) {
12311
+ const abs = join14(probeTree, mutant.file);
12312
+ const original = readFileSync18(abs, "utf8");
12313
+ const lines2 = original.split("\n");
12314
+ if ((lines2[mutant.line - 1] ?? "").trim() !== mutant.statement) {
12315
+ return {
12316
+ ...mutant,
12317
+ verdict: "inconclusive",
12318
+ detail: "the probe tree does not match the selected statement at this line \u2014 nothing was mutated"
12319
+ };
12320
+ }
12321
+ lines2.splice(mutant.line - 1, 1);
12322
+ try {
12323
+ writeFileSync16(abs, lines2.join("\n"), "utf8");
12324
+ const { perFile } = runProbeSuite(probeTree, probes, deadlineAt, now);
12325
+ const verdict = classifyMutantRun(perFile);
12326
+ const detail = verdict === "killed" ? "the suite went red with this statement deleted \u2014 a test catches its removal" : verdict === "survived" ? "every affected test still PASSED with this statement deleted \u2014 no test fails when it is removed" : "the mutated tree produced no clean verdict (likely a compile or import error) \u2014 not evidence either way";
12327
+ return { ...mutant, verdict, detail };
12328
+ } finally {
12329
+ writeFileSync16(abs, original, "utf8");
12330
+ }
12331
+ }
12332
+ __name(runOneMutant, "runOneMutant");
11934
12333
  async function runTestEfficacy(args) {
12334
+ const now = args.now ?? Date.now;
12335
+ const startedAt = now();
11935
12336
  const { report, worktree, base, out } = args;
11936
12337
  const plan = JSON.parse(readFileSync18(report, "utf8"));
11937
12338
  const rootPkg = JSON.parse(
@@ -11953,8 +12354,62 @@ async function runTestEfficacy(args) {
11953
12354
  }
11954
12355
  const results = [];
11955
12356
  let cleanupFailure;
12357
+ const mutantResults = [];
12358
+ let mutantsSkippedForBudget = 0;
12359
+ let mutantsSkippedForCap = 0;
12360
+ let mutantsSkippedForBaseline = 0;
12361
+ let mutantsNote;
12362
+ const noteMutants = /* @__PURE__ */ __name((note) => {
12363
+ mutantsNote = mutantsNote ? `${mutantsNote}; ${note}` : note;
12364
+ }, "noteMutants");
11956
12365
  if (probes.length > 0 && revert.length > 0) {
11957
12366
  const headSha = gitOut(worktree, "rev-parse", "HEAD");
12367
+ let candidates = [];
12368
+ try {
12369
+ const mutantFiles = revert.filter(
12370
+ (p) => MUTANT_SOURCE_RE.test(p) && !DECLARATION_FILE_RE.test(p)
12371
+ );
12372
+ if (mutantFiles.length > 0) {
12373
+ const added = parseAddedLines(
12374
+ gitCapture(
12375
+ worktree,
12376
+ "-c",
12377
+ "core.quotePath=false",
12378
+ "diff",
12379
+ "--unified=0",
12380
+ "--no-color",
12381
+ "--src-prefix=a/",
12382
+ "--dst-prefix=b/",
12383
+ "--no-ext-diff",
12384
+ "--no-textconv",
12385
+ base,
12386
+ headSha,
12387
+ "--",
12388
+ ...mutantFiles
12389
+ )
12390
+ );
12391
+ const selection = selectMutants(
12392
+ mutantFiles.filter((p) => (added.get(p) ?? []).length > 0).map((p) => ({
12393
+ file: p,
12394
+ content: gitCapture(worktree, "show", `${headSha}:${p}`),
12395
+ addedLines: added.get(p) ?? [],
12396
+ hasNewTests: hasCollocatedNewTest(p, probes)
12397
+ }))
12398
+ );
12399
+ candidates = selection.selected;
12400
+ mutantsSkippedForCap = selection.skippedForCap;
12401
+ if (selection.derailed.length > 0) {
12402
+ noteMutants(
12403
+ `mutant selection dropped ${selection.derailed.length} file(s) whose literal scan derailed (${selection.derailed.join(", ")}) \u2014 a regex literal holding a quote or backtick can do this; their candidates were not probed`
12404
+ );
12405
+ }
12406
+ }
12407
+ } catch (e) {
12408
+ noteMutants(
12409
+ `mutant selection failed: ${e instanceof Error ? e.message : String(e)} \u2014 no mutants were run`
12410
+ );
12411
+ candidates = [];
12412
+ }
11958
12413
  const probeTree = probeWorktreePath(worktree);
11959
12414
  let created = false;
11960
12415
  let sweep;
@@ -11967,6 +12422,43 @@ async function runTestEfficacy(args) {
11967
12422
  for (const file of probes) {
11968
12423
  results.push({ file, verdict: "inconclusive", detail });
11969
12424
  }
12425
+ for (const c of candidates) {
12426
+ mutantResults.push({ ...c, verdict: "inconclusive", detail });
12427
+ }
12428
+ }
12429
+ if (created && candidates.length > 0) {
12430
+ try {
12431
+ const mutantDeadline = startedAt + TOTAL_BUDGET_MS - PROBE_RUN_TIMEOUT_MS;
12432
+ const baseline = runProbeSuite(probeTree, probes, mutantDeadline, now);
12433
+ const greenProbes = baseline.perFile.filter((r) => r.verdict === "inert").map((r) => r.file);
12434
+ if (greenProbes.length === 0) {
12435
+ mutantsSkippedForBaseline = candidates.length;
12436
+ noteMutants(
12437
+ "mutants not run: no probe file was green in the unmutated baseline (every file was red or collected nothing), so a red mutant run would prove nothing"
12438
+ );
12439
+ } else {
12440
+ const estimatedRunMs = baseline.ms + RUN_ESTIMATE_MARGIN_MS;
12441
+ for (const c of candidates) {
12442
+ const remaining = mutantDeadline - now();
12443
+ if (!fitsAnotherMutantRun(remaining, estimatedRunMs)) {
12444
+ mutantsSkippedForBudget = candidates.length - mutantResults.length;
12445
+ break;
12446
+ }
12447
+ mutantResults.push(
12448
+ runOneMutant(probeTree, c, greenProbes, mutantDeadline, now)
12449
+ );
12450
+ }
12451
+ }
12452
+ } catch (e) {
12453
+ const detail = `mutation probe could not run: ${e instanceof Error ? e.message : String(e)}`;
12454
+ for (const c of candidates.slice(mutantResults.length)) {
12455
+ mutantResults.push({
12456
+ ...c,
12457
+ verdict: "inconclusive",
12458
+ detail
12459
+ });
12460
+ }
12461
+ }
11970
12462
  }
11971
12463
  if (created) {
11972
12464
  try {
@@ -11979,32 +12471,8 @@ async function runTestEfficacy(args) {
11979
12471
  git2(probeTree, "checkout", base, "--", ...modified);
11980
12472
  }
11981
12473
  for (const p of added) safeRmWithin(probeTree, p);
11982
- const r = spawnSync3(
11983
- "npx",
11984
- ["vitest", "run", "--reporter=json", ...probes],
11985
- {
11986
- cwd: probeTree,
11987
- encoding: "utf8",
11988
- timeout: 3e5,
11989
- // Vitest's JSON reporter on a large suite easily exceeds spawnSync's
11990
- // 1 MiB default stdout buffer, which returns ENOBUFS and turns every
11991
- // probe `inconclusive`. Match the 64 MiB ceiling the gh wrapper uses.
11992
- maxBuffer: 64 * 1024 * 1024
11993
- }
11994
- );
11995
- if (r.error) throw r.error;
11996
- if (r.signal) {
11997
- throw new Error(
11998
- `runner killed by ${r.signal}${r.signal === "SIGTERM" ? " (probe timed out after 300s)" : ""}`
11999
- );
12000
- }
12001
12474
  results.push(
12002
- ...classifyProbeRun(
12003
- r.status ?? 1,
12004
- `${r.stdout ?? ""}`,
12005
- probes,
12006
- `${r.stderr ?? ""}`
12007
- )
12475
+ ...runProbeSuite(probeTree, probes, startedAt + TOTAL_BUDGET_MS, now).perFile
12008
12476
  );
12009
12477
  } catch (e) {
12010
12478
  const detail = `probe could not run: ${e instanceof Error ? e.message : String(e)}`;
@@ -12043,23 +12511,57 @@ async function runTestEfficacy(args) {
12043
12511
  file: r.file,
12044
12512
  kind: "inert",
12045
12513
  message: `\`${r.file}\`: ${r.detail}. It passes whether or not the change is present, so it cannot catch a regression in it.`
12514
+ })),
12515
+ ...mutantResults.filter((m) => m.verdict === "survived").map((m) => ({
12516
+ file: m.file,
12517
+ kind: "mutant-survived",
12518
+ message: `\`${m.file}:${m.line}\`: deleting the added safety statement \`${m.statement}\` leaves every affected test green. No test in this diff fails when it is removed \u2014 confirm an existing test covers it, or add one, so a regression that drops or skips this statement is caught.`
12046
12519
  }))
12047
12520
  ];
12521
+ const count = /* @__PURE__ */ __name((v) => mutantResults.filter((m) => m.verdict === v).length, "count");
12048
12522
  const result = {
12049
12523
  unreachable,
12050
12524
  probed: results,
12051
12525
  inconclusive: results.filter((r) => r.verdict === "inconclusive"),
12526
+ mutants: {
12527
+ probed: mutantResults,
12528
+ killed: count("killed"),
12529
+ survived: count("survived"),
12530
+ inconclusive: count("inconclusive"),
12531
+ skippedForBudget: mutantsSkippedForBudget,
12532
+ skippedForCap: mutantsSkippedForCap,
12533
+ skippedForBaseline: mutantsSkippedForBaseline,
12534
+ ...mutantsNote ? { note: mutantsNote } : {}
12535
+ },
12052
12536
  findings,
12053
12537
  cleanupFailure
12054
12538
  };
12055
12539
  mkdirSync16(dirname13(out), { recursive: true });
12056
12540
  writeFileSync16(out, JSON.stringify(result, null, 2), "utf8");
12057
12541
  writeStdoutLine(
12058
- `Wrote test-efficacy report to ${out} (${unreachable.length} unreachable, ${results.length} probed, ${findings.length} finding(s))`
12542
+ `Wrote test-efficacy report to ${out} (${unreachable.length} unreachable, ${results.length} probed, ${mutantResults.length} mutant(s), ${findings.length} finding(s))`
12059
12543
  );
12060
12544
  for (const f of findings) {
12061
12545
  writeStdoutLine(` [test] ${f.kind}: ${f.file}`);
12062
12546
  }
12547
+ if (mutantsSkippedForCap > 0) {
12548
+ writeStdoutLine(
12549
+ ` ${mutantsSkippedForCap} mutant(s) skipped: more candidates than the cap of ${MAX_MUTANTS}`
12550
+ );
12551
+ }
12552
+ if (mutantsSkippedForBaseline > 0) {
12553
+ writeStdoutLine(
12554
+ ` ${mutantsSkippedForBaseline} mutant(s) skipped: no probe file was green in the unmutated baseline`
12555
+ );
12556
+ }
12557
+ if (mutantsSkippedForBudget > 0) {
12558
+ writeStdoutLine(
12559
+ ` ${mutantsSkippedForBudget} mutant(s) skipped: the remaining budget cannot fit another suite run`
12560
+ );
12561
+ }
12562
+ if (mutantsNote) {
12563
+ writeStdoutLine(` ${mutantsNote}`);
12564
+ }
12063
12565
  if (cleanupFailure) {
12064
12566
  writeStderrLine(`WARNING: ${cleanupFailure}`);
12065
12567
  }
@@ -12067,7 +12569,7 @@ async function runTestEfficacy(args) {
12067
12569
  __name(runTestEfficacy, "runTestEfficacy");
12068
12570
  var testEfficacyCommand = {
12069
12571
  command: "test-efficacy <report>",
12070
- describe: "Check whether the diff's new tests actually gate its new behaviour (unreachable + revert probe)",
12572
+ describe: "Check whether the diff's new tests actually gate its new behaviour (unreachable + revert probe + statement-deletion mutants)",
12071
12573
  builder: /* @__PURE__ */ __name((yargs) => yargs.positional("report", {
12072
12574
  type: "string",
12073
12575
  demandOption: true,
@@ -12330,13 +12832,285 @@ var cleanupCommand = {
12330
12832
  }, "handler")
12331
12833
  };
12332
12834
 
12835
+ // packages/cli/src/commands/review/run.ts
12836
+ init_esbuild_shims();
12837
+ import { spawn, execFileSync as execFileSync6 } from "node:child_process";
12838
+ import { readdirSync as readdirSync6, readFileSync as readFileSync20, statSync as statSync5 } from "node:fs";
12839
+ import { join as join16, resolve as resolve13 } from "node:path";
12840
+ var COMPOSED_PATTERN = /^qwen-review-.*composed\.json$/;
12841
+ var COMPOSED_POLL_MS = 250;
12842
+ var SIGNAL_EXIT_CODES = {
12843
+ SIGHUP: 129,
12844
+ SIGINT: 130,
12845
+ SIGTERM: 143
12846
+ };
12847
+ var PARENT_SIGNALS = Object.keys(SIGNAL_EXIT_CODES);
12848
+ function buildReviewPrompt(args) {
12849
+ const parts = ["/review"];
12850
+ if (args.target) {
12851
+ if (/\s/.test(args.target) || args.target.startsWith("-") || /['"]/.test(args.target)) {
12852
+ throw new Error(
12853
+ `Invalid review target ${JSON.stringify(args.target)}: expected a single PR number, PR URL, or file path`
12854
+ );
12855
+ }
12856
+ parts.push(args.target);
12857
+ }
12858
+ if (args.effort) parts.push(`--effort ${args.effort}`);
12859
+ if (args.comment) parts.push("--comment");
12860
+ return parts.join(" ");
12861
+ }
12862
+ __name(buildReviewPrompt, "buildReviewPrompt");
12863
+ function newestArtifactSince(dir, pattern, startMs) {
12864
+ let best = null;
12865
+ let names;
12866
+ try {
12867
+ names = readdirSync6(dir);
12868
+ } catch {
12869
+ return null;
12870
+ }
12871
+ for (const name of names) {
12872
+ if (!pattern.test(name)) continue;
12873
+ const path3 = join16(dir, name);
12874
+ let mtime;
12875
+ try {
12876
+ mtime = statSync5(path3).mtimeMs;
12877
+ } catch {
12878
+ continue;
12879
+ }
12880
+ if (mtime < startMs) continue;
12881
+ if (!best || mtime > best.mtime) best = { path: path3, mtime };
12882
+ }
12883
+ return best ? best.path : null;
12884
+ }
12885
+ __name(newestArtifactSince, "newestArtifactSince");
12886
+ function exitCodeFor(completed, event, failOn) {
12887
+ if (!completed) return 1;
12888
+ if (failOn === "request-changes" && event === "REQUEST_CHANGES") return 3;
12889
+ return 0;
12890
+ }
12891
+ __name(exitCodeFor, "exitCodeFor");
12892
+ function readComposed(path3) {
12893
+ try {
12894
+ const parsed = JSON.parse(readFileSync20(path3, "utf8"));
12895
+ return typeof parsed.event === "string" ? parsed : null;
12896
+ } catch {
12897
+ return null;
12898
+ }
12899
+ }
12900
+ __name(readComposed, "readComposed");
12901
+ function killProcessGroup(pid, signal) {
12902
+ if (process.platform === "win32") {
12903
+ try {
12904
+ execFileSync6("taskkill", ["/pid", String(pid), "/T", "/F"], {
12905
+ stdio: "ignore"
12906
+ });
12907
+ } catch {
12908
+ }
12909
+ return;
12910
+ }
12911
+ try {
12912
+ process.kill(-pid, signal);
12913
+ } catch {
12914
+ }
12915
+ }
12916
+ __name(killProcessGroup, "killProcessGroup");
12917
+ async function runReview(args) {
12918
+ const startMs = Date.now();
12919
+ const prompt = buildReviewPrompt(args);
12920
+ const cutoffMs = startMs - 2e3;
12921
+ const child = spawn(
12922
+ process.execPath,
12923
+ [
12924
+ "--expose-gc",
12925
+ process.argv[1],
12926
+ "--prompt",
12927
+ prompt,
12928
+ "--approval-mode",
12929
+ args.approvalMode
12930
+ ],
12931
+ {
12932
+ // stdin CLOSED, not inherited: piped input would be prepended to the
12933
+ // prompt and the leading `/` would no longer be the first character —
12934
+ // the slash command would reach the model as plain text.
12935
+ stdio: ["ignore", "pipe", "pipe"],
12936
+ // The CLI relaunches itself in a child (for --max-old-space-size), so
12937
+ // the pid we spawn is a wrapper whose grandchild is the real review.
12938
+ // A new process group lets the timeout kill reach both.
12939
+ detached: true
12940
+ }
12941
+ );
12942
+ if (!args.quiet) {
12943
+ const writeProgress = /* @__PURE__ */ __name((chunk) => {
12944
+ try {
12945
+ process.stderr.write(chunk);
12946
+ } catch {
12947
+ }
12948
+ }, "writeProgress");
12949
+ child.stdout?.on("data", writeProgress);
12950
+ child.stderr?.on("data", writeProgress);
12951
+ } else {
12952
+ child.stdout?.resume();
12953
+ child.stderr?.resume();
12954
+ }
12955
+ let capturedPath = null;
12956
+ let capturedVerdict = null;
12957
+ const captureTimer = setInterval(() => {
12958
+ if (capturedVerdict !== null) return;
12959
+ const path3 = newestArtifactSince(
12960
+ REVIEW_TMP_DIR,
12961
+ COMPOSED_PATTERN,
12962
+ cutoffMs
12963
+ );
12964
+ if (path3 === null) return;
12965
+ const verdict = readComposed(path3);
12966
+ if (verdict !== null) {
12967
+ capturedPath = path3;
12968
+ capturedVerdict = verdict;
12969
+ }
12970
+ }, COMPOSED_POLL_MS);
12971
+ let timedOut = false;
12972
+ const timeoutMs = args.timeoutMinutes * 6e4;
12973
+ const timer = setTimeout(() => {
12974
+ timedOut = true;
12975
+ writeStderrLineSafe(
12976
+ `review run: timeout after ${args.timeoutMinutes} minutes \u2014 terminating the review`
12977
+ );
12978
+ const pid = child.pid;
12979
+ if (pid !== void 0) {
12980
+ killProcessGroup(pid, "SIGTERM");
12981
+ setTimeout(() => killProcessGroup(pid, "SIGKILL"), 1e4).unref();
12982
+ }
12983
+ }, timeoutMs);
12984
+ const onParentSignal = /* @__PURE__ */ __name((signal) => {
12985
+ clearTimeout(timer);
12986
+ clearInterval(captureTimer);
12987
+ const pid = child.pid;
12988
+ if (pid !== void 0) {
12989
+ killProcessGroup(pid, "SIGTERM");
12990
+ }
12991
+ process.exit(SIGNAL_EXIT_CODES[signal] ?? 1);
12992
+ }, "onParentSignal");
12993
+ for (const signal of PARENT_SIGNALS) process.on(signal, onParentSignal);
12994
+ const childOutcome = await new Promise((resolvePromise) => {
12995
+ child.on("close", (code, signal) => resolvePromise({ code, signal }));
12996
+ child.on("error", (err) => {
12997
+ writeStderrLineSafe(
12998
+ `review run: failed to launch the CLI: ${err.message}`
12999
+ );
13000
+ resolvePromise({ code: null, signal: null });
13001
+ });
13002
+ });
13003
+ const childExitCode = childOutcome.code;
13004
+ const childSignal = childOutcome.signal;
13005
+ clearTimeout(timer);
13006
+ clearInterval(captureTimer);
13007
+ for (const signal of PARENT_SIGNALS) process.off(signal, onParentSignal);
13008
+ let composedPath = capturedPath;
13009
+ let composed = capturedVerdict;
13010
+ if (composed === null) {
13011
+ composedPath = newestArtifactSince(
13012
+ REVIEW_TMP_DIR,
13013
+ COMPOSED_PATTERN,
13014
+ cutoffMs
13015
+ );
13016
+ composed = composedPath ? readComposed(composedPath) : null;
13017
+ }
13018
+ const reportPath = newestArtifactSince(REVIEWS_DIR, /\.md$/, cutoffMs);
13019
+ const completed = composed !== null;
13020
+ const result = {
13021
+ completed,
13022
+ event: composed?.event ?? null,
13023
+ verdictLine: composed?.verdictLine ?? null,
13024
+ baseEvent: composed?.baseEvent ?? null,
13025
+ cappedBy: composed?.cappedBy ?? [],
13026
+ downgraded: composed?.downgraded ?? false,
13027
+ downgradedFrom: composed?.downgradedFrom ?? null,
13028
+ remediation: composed?.remediation ?? [],
13029
+ composedPath: composedPath ? resolve13(composedPath) : null,
13030
+ reportPath: reportPath ? resolve13(reportPath) : null,
13031
+ childExitCode,
13032
+ childSignal,
13033
+ timedOut,
13034
+ durationMs: Date.now() - startMs
13035
+ };
13036
+ process.exitCode = exitCodeFor(completed, result.event, args.failOn);
13037
+ try {
13038
+ if (args.json) {
13039
+ writeStdoutLine(JSON.stringify(result, null, 2));
13040
+ } else if (completed) {
13041
+ writeStdoutLine(result.verdictLine ?? `Event: ${result.event}`);
13042
+ if (result.reportPath) writeStdoutLine(`Report: ${result.reportPath}`);
13043
+ } else {
13044
+ const detail = composedPath !== null ? `a composed verdict was found at ${resolve13(composedPath)} but could not be parsed` : "no composed verdict was produced";
13045
+ writeStdoutLine(
13046
+ timedOut ? "Review did not complete: timed out." : `Review did not complete: ${detail}${childExitCode !== null ? ` (CLI exit ${childExitCode})` : ""}${childSignal !== null ? ` (killed by ${childSignal})` : ""}.`
13047
+ );
13048
+ }
13049
+ } catch {
13050
+ }
13051
+ }
13052
+ __name(runReview, "runReview");
13053
+ var runCommand = {
13054
+ command: "run [target]",
13055
+ describe: "Run a full /review non-interactively and print the verdict (machine-readable with --json)",
13056
+ builder: /* @__PURE__ */ __name((yargs) => yargs.positional("target", {
13057
+ type: "string",
13058
+ describe: "What to review: a PR number, a PR URL, or a file path; omit to review the local working tree"
13059
+ }).option("effort", {
13060
+ type: "string",
13061
+ choices: [...EFFORT_LEVELS],
13062
+ describe: "The review effort. Defaults to the skill default for the target (high for a PR, medium locally)."
13063
+ }).option("comment", {
13064
+ type: "boolean",
13065
+ default: false,
13066
+ describe: "Authorise posting the review to GitHub (PR targets only) \u2014 same meaning as `/review <pr> --comment`"
13067
+ }).option("json", {
13068
+ type: "boolean",
13069
+ default: false,
13070
+ describe: "Print the full result as JSON on stdout"
13071
+ }).option("fail-on", {
13072
+ type: "string",
13073
+ choices: ["none", "request-changes"],
13074
+ default: "none",
13075
+ describe: "Exit 3 when the review completes with this outcome \u2014 lets CI gate on the verdict without parsing output"
13076
+ }).option("timeout-minutes", {
13077
+ type: "number",
13078
+ default: 120,
13079
+ describe: "Terminate the review after this long without a verdict (exit 1)"
13080
+ }).option("approval-mode", {
13081
+ type: "string",
13082
+ default: "yolo",
13083
+ choices: ["plan", "default", "auto-edit", "auto", "yolo"],
13084
+ describe: "Approval mode for the child CLI. The default is yolo: headless runs cannot answer confirmation prompts, and anything still unapproved would be auto-denied mid-review."
13085
+ }).option("quiet", {
13086
+ type: "boolean",
13087
+ default: false,
13088
+ describe: "Suppress the child CLI progress stream on stderr"
13089
+ }), "builder"),
13090
+ handler: /* @__PURE__ */ __name(async (argv) => {
13091
+ await runReview({
13092
+ target: argv["target"],
13093
+ effort: argv["effort"],
13094
+ comment: Boolean(argv["comment"]),
13095
+ json: Boolean(argv["json"]),
13096
+ failOn: argv["fail-on"] ?? "none",
13097
+ // `|| 120` would treat an explicit `--timeout-minutes 0` as falsy and
13098
+ // silently substitute the default; decide default-vs-value by finiteness
13099
+ // so 0 still reaches the 1-minute floor.
13100
+ timeoutMinutes: Number.isFinite(Number(argv["timeout-minutes"])) ? Math.max(1, Number(argv["timeout-minutes"])) : 120,
13101
+ approvalMode: String(argv["approval-mode"] ?? "yolo"),
13102
+ quiet: Boolean(argv["quiet"])
13103
+ });
13104
+ }, "handler")
13105
+ };
13106
+
12333
13107
  // packages/cli/src/commands/review.ts
12334
13108
  var reviewCommand = {
12335
13109
  command: "review",
12336
- describe: "Internal helpers used by the /review skill (PR worktree setup, context fetch, rules loading, presubmit checks, cleanup)",
12337
- builder: /* @__PURE__ */ __name((yargs) => yargs.command(parseArgsCommand).command(fetchPrCommand).command(captureLocalCommand).command(planDiffCommand).command(prContextCommand).command(commentStatusCommand).command(loadRulesCommand).command(agentPromptCommand).command(buildTestCommand).command(scriptLintCommand).command(resolveAnchorsCommand).command(checkCoverageCommand).command(presubmitCommand).command(testEfficacyCommand).command(composeReviewCommand).command(submitCommand).command(cleanupCommand).demandCommand(
13110
+ describe: "Run a review non-interactively (`run`), plus the internal helpers used by the /review skill (PR worktree setup, context fetch, rules loading, presubmit checks, cleanup)",
13111
+ builder: /* @__PURE__ */ __name((yargs) => yargs.command(runCommand).command(parseArgsCommand).command(fetchPrCommand).command(captureLocalCommand).command(planDiffCommand).command(prContextCommand).command(commentStatusCommand).command(loadRulesCommand).command(agentPromptCommand).command(buildTestCommand).command(scriptLintCommand).command(resolveAnchorsCommand).command(checkCoverageCommand).command(presubmitCommand).command(testEfficacyCommand).command(composeReviewCommand).command(submitCommand).command(cleanupCommand).demandCommand(
12338
13112
  1,
12339
- "Specify a subcommand: parse-args, fetch-pr, capture-local, plan-diff, pr-context, comment-status, load-rules, agent-prompt, build-test, script-lint, resolve-anchors, check-coverage, presubmit, test-efficacy, compose-review, submit, or cleanup."
13113
+ "Specify a subcommand: run, parse-args, fetch-pr, capture-local, plan-diff, pr-context, comment-status, load-rules, agent-prompt, build-test, script-lint, resolve-anchors, check-coverage, presubmit, test-efficacy, compose-review, submit, or cleanup."
12340
13114
  ).version(false), "builder"),
12341
13115
  handler: /* @__PURE__ */ __name(() => {
12342
13116
  }, "handler")
@@ -12536,10 +13310,10 @@ var updateCommand3 = {
12536
13310
  stdioHelpers,
12537
13311
  { updateEventEmitter }
12538
13312
  ] = await Promise.all([
12539
- import("./settings-DJDXFDZ3.js"),
12540
- import("./updateCheck-KAQH67DV.js"),
12541
- import("./installationInfo-6AM4I2Y3.js"),
12542
- import("./standalone-update-MK3Z7KBI.js"),
13313
+ import("./settings-LN7RNKBS.js"),
13314
+ import("./updateCheck-4Q6RIKFW.js"),
13315
+ import("./installationInfo-4MGG4WVI.js"),
13316
+ import("./standalone-update-JAKIM2NF.js"),
12543
13317
  import("./stdioHelpers-HGIYTWAY.js"),
12544
13318
  import("./updateEventEmitter-5MKC7BLQ.js")
12545
13319
  ]);
@@ -13686,6 +14460,7 @@ async function loadCliConfig(settings, argv, cwd = process.cwd(), overrideExtens
13686
14460
  ).map((d) => d.trim()),
13687
14461
  disabledTools: disabledTools.length > 0 ? disabledTools : void 0,
13688
14462
  visibleTools: visibleTools.length > 0 ? visibleTools : void 0,
14463
+ toolSearchThreshold: bareMode || safeMode ? 0 : settings.tools?.toolSearch?.threshold,
13689
14464
  // New unified permissions (PermissionManager source of truth).
13690
14465
  permissions: {
13691
14466
  allow: mergedAllow.length > 0 ? mergedAllow : void 0,
@@ -13796,6 +14571,7 @@ async function loadCliConfig(settings, argv, cwd = process.cwd(), overrideExtens
13796
14571
  bareMode,
13797
14572
  safeMode,
13798
14573
  allowedHttpHookUrls: bareMode || safeMode ? [] : settings.security?.allowedHttpHookUrls ?? [],
14574
+ allowPrivateNetworkHooks: bareMode || safeMode ? false : settings.security?.allowPrivateNetworkHooks ?? false,
13799
14575
  cliVersion: await getCliVersion(),
13800
14576
  ideMode,
13801
14577
  chatCompression: settings.model?.chatCompression,