@qwen-code/qwen-code 0.19.12 → 0.20.0-nightly.20260721.cda0e0348

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 (280) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +1 -1
  2. package/bundled/qc-helper/docs/features/commands.md +54 -0
  3. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  4. package/bundled/qc-helper/docs/qwen-serve.md +44 -6
  5. package/bundled/review/DESIGN.md +2 -2
  6. package/bundled/review/SKILL.md +13 -9
  7. package/chunks/{MaxSizedBox-QOXLJGAF.js → MaxSizedBox-EE76OHAP.js} +30 -27
  8. package/chunks/{StandaloneSessionPicker-FLV6CGYJ.js → StandaloneSessionPicker-WZH4PC3K.js} +50 -45
  9. package/chunks/{acpAgent-OB2CTF3P.js → acpAgent-2ATF4LMP.js} +437 -156
  10. package/chunks/{agent-CKSI7BTR.js → agent-KTOOFWMV.js} +22 -22
  11. package/chunks/{agent-headless-U36LIYTU.js → agent-headless-WVJCQ27D.js} +22 -22
  12. package/chunks/{anthropicContentGenerator-ZZRGFEES.js → anthropicContentGenerator-W4JLNYWQ.js} +6 -5
  13. package/chunks/{artifact-tool-PHO5XEGZ.js → artifact-tool-WBCAMD3O.js} +2 -2
  14. package/chunks/{askUserQuestion-CEPBT47X.js → askUserQuestion-6DZC4UV5.js} +2 -2
  15. package/chunks/{bridge-AIKTINJG.js → bridge-T4TLAZSJ.js} +25 -25
  16. package/chunks/build-SSCNEHZZ.js +62 -0
  17. package/chunks/{ca-2SL2BXTK.js → ca-ISKASTR5.js} +606 -200
  18. package/chunks/{channel-worker-group-NEUVTPB2.js → channel-worker-group-QZV2SP5U.js} +4 -4
  19. package/chunks/{channel-worker-manager-7CQVOVWV.js → channel-worker-manager-3GMAU45H.js} +4 -4
  20. package/chunks/{channel-worker-supervisor-3BU2KNCZ.js → channel-worker-supervisor-QCXSXCRY.js} +3 -3
  21. package/chunks/{chunk-6ETOSWAO.js → chunk-246TW4IX.js} +3 -3
  22. package/chunks/{chunk-2CCDMJM7.js → chunk-25Y6JSH2.js} +3 -3
  23. package/chunks/{chunk-XSEWNUMZ.js → chunk-2CWOJ2FA.js} +8 -8
  24. package/chunks/{chunk-UZC5VPOJ.js → chunk-2GFRA3MN.js} +3 -3
  25. package/chunks/chunk-2GOPPEHK.js +442 -0
  26. package/chunks/{chunk-MRE77ST5.js → chunk-2ITGJJE2.js} +69 -2216
  27. package/chunks/{chunk-BABX5XRO.js → chunk-2LI23QA6.js} +1 -1
  28. package/chunks/{chunk-EFAXBOQO.js → chunk-32F7BZSK.js} +7 -7
  29. package/chunks/chunk-43T5WDQ7.js +127 -0
  30. package/chunks/{chunk-DJ4VHAFJ.js → chunk-4CWPMWCD.js} +7 -3
  31. package/chunks/{chunk-GMUPIMHF.js → chunk-4RA7PWIY.js} +3 -3
  32. package/chunks/{chunk-6IITZE7O.js → chunk-5JX5EWR5.js} +7 -7
  33. package/chunks/{chunk-OBSLEYCD.js → chunk-5PZ6R37W.js} +29 -2
  34. package/chunks/{chunk-HTHUX2T5.js → chunk-5QWWOFGG.js} +0 -1
  35. package/chunks/{chunk-3DJY4IFO.js → chunk-5SCI6E3E.js} +1 -1
  36. package/chunks/{chunk-GSPWDTYY.js → chunk-5WG2K5RH.js} +53 -16
  37. package/chunks/{chunk-NPMVLWYL.js → chunk-5YVZ2XLV.js} +6 -6
  38. package/chunks/{chunk-TKASNYDS.js → chunk-6DHWO5ZF.js} +3 -3
  39. package/chunks/{chunk-4CHDYDG3.js → chunk-6EFTQYW7.js} +1 -1
  40. package/chunks/{chunk-RKUMFUFM.js → chunk-6MC5ASQK.js} +4 -4
  41. package/chunks/{chunk-HZ4M2UQD.js → chunk-6RVJRVQR.js} +1 -1
  42. package/chunks/{chunk-W6CQPLWM.js → chunk-6ZBPS62S.js} +1 -1
  43. package/chunks/chunk-7KGXAXF7.js +114 -0
  44. package/chunks/{chunk-PK7COE5O.js → chunk-ABIL4ZQU.js} +1 -1
  45. package/chunks/{chunk-OEHCAWUA.js → chunk-ACW3VNUE.js} +2 -2
  46. package/chunks/{chunk-APOFULHK.js → chunk-AWVS63WA.js} +7 -6
  47. package/chunks/{chunk-KGWA7XYL.js → chunk-AY3CSB6F.js} +6 -226
  48. package/chunks/{chunk-XAAEDML2.js → chunk-AYCDXHZB.js} +1 -1
  49. package/chunks/{chunk-42VIHAYT.js → chunk-B452RETY.js} +1 -1
  50. package/chunks/{chunk-VAJS2E2D.js → chunk-BDBMYST4.js} +1 -1
  51. package/chunks/{chunk-5N7M4XYN.js → chunk-BUKOHGBE.js} +5 -5
  52. package/chunks/{chunk-F2RR4HO2.js → chunk-BVLROR2T.js} +1 -1
  53. package/chunks/{chunk-WIYV7CSF.js → chunk-BWK3FX3K.js} +3 -3
  54. package/chunks/{chunk-UE5TZ55T.js → chunk-C27BYUX6.js} +29 -2
  55. package/chunks/{chunk-KRMARA3A.js → chunk-CG2HPAVD.js} +29 -13
  56. package/chunks/{chunk-UOA2IHRI.js → chunk-CPCVCKKF.js} +1 -1
  57. package/chunks/{chunk-HD6EGS5K.js → chunk-CUJX3F4X.js} +31 -6
  58. package/chunks/{chunk-4RPARQ5D.js → chunk-D2VIDMVM.js} +2 -2
  59. package/chunks/{chunk-PUKUUASO.js → chunk-DMRO4GU2.js} +1 -1
  60. package/chunks/{chunk-64GC5EMF.js → chunk-DZZIOIVF.js} +1 -1
  61. package/chunks/{chunk-FUSMC3SZ.js → chunk-E5QFCC4X.js} +13 -8
  62. package/chunks/{chunk-LKR7QQ63.js → chunk-EAUYY7SS.js} +3 -3
  63. package/chunks/{chunk-NE6HHLL3.js → chunk-EDMGFJ3E.js} +2 -2
  64. package/chunks/{chunk-J2MKYJKZ.js → chunk-EIAK6Q2B.js} +2 -2
  65. package/chunks/{chunk-WEPXQKGP.js → chunk-EZVDJFZ7.js} +1 -1
  66. package/chunks/{chunk-NALRQ3SG.js → chunk-FCUUJKZF.js} +394 -128
  67. package/chunks/{chunk-4XCVGEEX.js → chunk-FSL5W5TI.js} +3 -3
  68. package/chunks/{chunk-CHPQFLW6.js → chunk-FYA3Y5JR.js} +5 -5
  69. package/chunks/{chunk-V4PCIS25.js → chunk-FZVSFBNW.js} +69 -7
  70. package/chunks/{chunk-4MPYGENG.js → chunk-G45NOBV7.js} +6 -6
  71. package/chunks/{chunk-OSSDHJDU.js → chunk-G45X5TRN.js} +1 -1
  72. package/chunks/{chunk-3B6PSWHE.js → chunk-GH7OEOYU.js} +4 -4
  73. package/chunks/{chunk-KANTXY7B.js → chunk-GKY2OJ7R.js} +2 -2
  74. package/chunks/chunk-GMGDLUC7.js +37 -0
  75. package/chunks/{chunk-2476XGOU.js → chunk-GPILFVPY.js} +1 -1
  76. package/chunks/{chunk-EISVEV45.js → chunk-H24SOJIQ.js} +2 -2
  77. package/chunks/{chunk-J6NT5YTN.js → chunk-H2XVO6NE.js} +1 -289
  78. package/chunks/{chunk-QIFTJDBY.js → chunk-IM2A6YO3.js} +1 -1
  79. package/chunks/{chunk-R3EDIMYZ.js → chunk-IYZENXFW.js} +1 -1
  80. package/chunks/{chunk-LPHGXXZX.js → chunk-JD3MKVKL.js} +1 -1
  81. package/chunks/{chunk-NUHSLBJZ.js → chunk-JNWZQ27S.js} +15 -9
  82. package/chunks/{chunk-ETN2G32U.js → chunk-JPRLCXAO.js} +4 -4
  83. package/chunks/{chunk-WHQNBBWW.js → chunk-JQMBPGOU.js} +2 -2
  84. package/chunks/{chunk-5QSVANRT.js → chunk-JR6UJ24K.js} +2 -2
  85. package/chunks/{chunk-VLHQMOZK.js → chunk-JRW46GQX.js} +3 -3
  86. package/chunks/{chunk-DUR7BZYK.js → chunk-KRI4VCHX.js} +53 -28
  87. package/chunks/{chunk-PR5XQ73G.js → chunk-KTNIZG2C.js} +2 -2
  88. package/chunks/{chunk-QSG4ZFG4.js → chunk-KTUQMDEP.js} +1 -1
  89. package/chunks/{chunk-HVGJWOR6.js → chunk-L4YSPHR4.js} +2 -2
  90. package/chunks/{chunk-BEZPRKD3.js → chunk-LC5CAVMS.js} +160 -2
  91. package/chunks/{chunk-67Q33DQY.js → chunk-LLDGOZMJ.js} +4 -4
  92. package/chunks/{chunk-UCTCDLDS.js → chunk-LWQ4IAOJ.js} +136 -4
  93. package/chunks/{chunk-GEHSF7MS.js → chunk-NEEB7UEN.js} +2545 -1974
  94. package/chunks/{chunk-GCY7QTCE.js → chunk-NO6XTCYT.js} +1822 -424
  95. package/chunks/{chunk-JCJPZMJV.js → chunk-OOCI5VVU.js} +1 -1
  96. package/chunks/{chunk-XSPFQQRE.js → chunk-OONJNQ42.js} +3 -3
  97. package/chunks/{chunk-ANRANWVE.js → chunk-OP4MOGXF.js} +1 -1
  98. package/chunks/{chunk-GW7BONBU.js → chunk-OV2KB55J.js} +5 -5
  99. package/chunks/{chunk-CPU6I5YV.js → chunk-P64HXIC5.js} +115 -32
  100. package/chunks/{chunk-SGPFJMRP.js → chunk-PBATSWUQ.js} +1 -1
  101. package/chunks/{chunk-GXFYV7MP.js → chunk-PFKNXN67.js} +1106 -592
  102. package/chunks/{chunk-KNGZ5EYL.js → chunk-PYNCSQSI.js} +198 -120
  103. package/chunks/{chunk-I7RRHHYG.js → chunk-QKTHJXCS.js} +1 -1
  104. package/chunks/chunk-QKYTTBYW.js +624 -0
  105. package/chunks/{chunk-76BFY7AF.js → chunk-QTERJVPZ.js} +1 -6
  106. package/chunks/{chunk-W4UN42YP.js → chunk-R3VZNHRX.js} +85 -21
  107. package/chunks/chunk-R5N7NF5D.js +1187 -0
  108. package/chunks/{chunk-ZSDFNE6Y.js → chunk-RF34V75B.js} +3 -3
  109. package/chunks/{chunk-HCCR43AY.js → chunk-RFIAR4YL.js} +1 -1
  110. package/chunks/chunk-RS7MT2QG.js +305 -0
  111. package/chunks/{chunk-BKNPMEN6.js → chunk-RVLZCXEE.js} +162 -17
  112. package/chunks/chunk-SV5PQVQE.js +71 -0
  113. package/chunks/{chunk-3ESL7JXA.js → chunk-U4VGYZN7.js} +3 -3
  114. package/chunks/{chunk-4CA4WUMS.js → chunk-UEY4AYUL.js} +2 -2
  115. package/chunks/{chunk-ZGT623SG.js → chunk-USTF7LPI.js} +12 -12
  116. package/chunks/chunk-V7RNNPGC.js +44 -0
  117. package/chunks/{chunk-VEFR4XJQ.js → chunk-W3BKN3LO.js} +1 -1
  118. package/chunks/{chunk-4SJJT466.js → chunk-WQQDJE2P.js} +94 -177
  119. package/chunks/{chunk-KMJOMWHE.js → chunk-WRRF6TEQ.js} +1 -1
  120. package/chunks/{chunk-GLH2NTPB.js → chunk-XCHUDLER.js} +1 -1
  121. package/chunks/{chunk-7SX6WZNO.js → chunk-XVVH63JG.js} +3 -3
  122. package/chunks/{chunk-N47VAEAJ.js → chunk-XZOBDSDG.js} +2379 -1291
  123. package/chunks/chunk-YGIUIIIF.js +125 -0
  124. package/chunks/{chunk-335ECZTA.js → chunk-ZEOZL37W.js} +1 -1
  125. package/chunks/{computer-use-4PUGCUQK.js → computer-use-M6MGRJF2.js} +22 -22
  126. package/chunks/{config-utils-6PJUXHLI.js → config-utils-MOGE4EVB.js} +3 -3
  127. package/chunks/{contextCommand-C57KTWFV.js → contextCommand-HTRJJYNE.js} +25 -26
  128. package/chunks/{create-sub-session-5Q42XR6I.js → create-sub-session-MB35IHCR.js} +22 -22
  129. package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-P26FE5GG.js} +2 -2
  130. package/chunks/{cron-create-X462ERYA.js → cron-create-JWFHBDRQ.js} +4 -4
  131. package/chunks/{cron-delete-SL5UJUM3.js → cron-delete-GDX4E26G.js} +4 -4
  132. package/chunks/{cron-list-3MD6SVXI.js → cron-list-USMAIWPT.js} +4 -4
  133. package/chunks/{daemon-ZW6LHOXT.js → daemon-KLPTQIE4.js} +287 -143
  134. package/chunks/{daemon-status-provider-YPV3UXHT.js → daemon-status-provider-67EKK6S3.js} +29 -29
  135. package/chunks/{dist-NUXRQHC5.js → dist-OAV7LJGJ.js} +1 -1
  136. package/chunks/{dist-XLE6ODMB.js → dist-OMW6WDEO.js} +1 -1
  137. package/chunks/{dist-J2H4KTLB.js → dist-PJLG2XYX.js} +1 -1
  138. package/chunks/{dist-IEQSDXS7.js → dist-UIFWIFRO.js} +2 -2
  139. package/chunks/{dist-IGZMVS5R.js → dist-VGJTZL4E.js} +33 -22
  140. package/chunks/{dist-3DQNQJ6H.js → dist-XBJVSWS2.js} +1 -1
  141. package/chunks/{earlyInputCapture-5VDWSYAM.js → earlyInputCapture-7QJX25AC.js} +23 -23
  142. package/chunks/{edit-GORZTX2U.js → edit-BTPQWGAA.js} +23 -23
  143. package/chunks/{enter-worktree-LJB2AW4L.js → enter-worktree-N3SEYKOO.js} +22 -22
  144. package/chunks/{enterPlanMode-LIIPP37T.js → enterPlanMode-TN2JV5MY.js} +28 -23
  145. package/chunks/{environment-HQ2UHJ35.js → environment-HP6RK262.js} +24 -24
  146. package/chunks/{errors-6JD5VMVQ.js → errors-VHGRDDOQ.js} +24 -24
  147. package/chunks/{exit-worktree-IEP2WHOV.js → exit-worktree-FI3SQY3U.js} +22 -22
  148. package/chunks/{exitPlanMode-U5Z6XBLO.js → exitPlanMode-NZWRVIIY.js} +22 -22
  149. package/chunks/{fast-path-HFKNMP23.js → fast-path-EGP7AXNR.js} +3 -2
  150. package/chunks/{gemini-C2SCJH3N.js → gemini-AN5YMD5O.js} +70 -68
  151. package/chunks/{geminiContentGenerator-ADZTXEKV.js → geminiContentGenerator-ABTMU4FE.js} +4 -4
  152. package/chunks/{glob-GOAPGD6G.js → glob-5YABOPJB.js} +22 -22
  153. package/chunks/{grep-HZLSTX7D.js → grep-U67FKUJT.js} +22 -22
  154. package/chunks/{handleAutoUpdate-UF74WGFE.js → handleAutoUpdate-OOKBP5VD.js} +27 -28
  155. package/chunks/{i18n-FMXIYUOC.js → i18n-GMQV324P.js} +23 -23
  156. package/chunks/{initializer-ERDBM3DU.js → initializer-NWALZGQ5.js} +28 -28
  157. package/chunks/{installationInfo-LROMXYLX.js → installationInfo-Y3M433E7.js} +25 -23
  158. package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-DWRJMNH3.js} +2 -2
  159. package/chunks/{list-6JPJROU5.js → list-CQDDWHTS.js} +30 -30
  160. package/chunks/{loadedSettingsAdapter-QCWYUBBF.js → loadedSettingsAdapter-I5KG37EI.js} +27 -27
  161. package/chunks/{loop-wakeup-6H7OENTB.js → loop-wakeup-5GLTUBHA.js} +5 -5
  162. package/chunks/{ls-APTSOOS5.js → ls-FHBY3Y7I.js} +4 -4
  163. package/chunks/{lsp-HPACPJAN.js → lsp-B6VMEW6Y.js} +2 -2
  164. package/chunks/{mcp-3P3KWYWO.js → mcp-24HHCBSP.js} +27 -27
  165. package/chunks/{monitor-LMYKCF6R.js → monitor-Z7NZNNRC.js} +22 -22
  166. package/chunks/nonInteractiveCli-GVF2XDJT.js +126 -0
  167. package/chunks/{notebook-edit-IBEOVZ6A.js → notebook-edit-GFOYAQAZ.js} +23 -23
  168. package/chunks/{openaiContentGenerator-42PZKET5.js → openaiContentGenerator-XAAYV6WR.js} +11 -11
  169. package/chunks/{pidfile-VTBDIGOH.js → pidfile-ILI37KRQ.js} +23 -23
  170. package/chunks/{processUtils-L7ZKOGDG.js → processUtils-LIPJMLVZ.js} +2 -2
  171. package/chunks/{qwenContentGenerator-VR2CNFGI.js → qwenContentGenerator-DLJ3KKGZ.js} +24 -24
  172. package/chunks/{qwenOAuth2-6LS2T3Q6.js → qwenOAuth2-J47FU5PW.js} +11 -11
  173. package/chunks/react-SG7JAQSZ.js +8 -0
  174. package/chunks/{read-file-VSKOE22I.js → read-file-LCQ2KNNP.js} +8 -8
  175. package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-AKCL7I43.js} +2 -2
  176. package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-PEUB7727.js} +2 -2
  177. package/chunks/resumeHistoryUtils-PSCSAKA6.js +78 -0
  178. package/chunks/{ripGrep-5V5FLW2A.js → ripGrep-Y2XW4EFC.js} +22 -22
  179. package/chunks/{run-qwen-serve-LSOPP4R2.js → run-qwen-serve-DQ5ZIR36.js} +1459 -148
  180. package/chunks/{runtime-LT7R4CS5.js → runtime-6MQFF2A6.js} +33 -31
  181. package/chunks/{scheduler-YOWQ7KZP.js → scheduler-K4S7NY3G.js} +22 -22
  182. package/chunks/{send-message-5GZ4FX2V.js → send-message-3RHE7HSM.js} +3 -3
  183. package/chunks/{serve-VWLBXKGK.js → serve-JFAAPC5J.js} +27 -27
  184. package/chunks/{server-3RW3FYOH.js → server-QB6CHRZN.js} +866 -271
  185. package/chunks/{session-ZONXFOBQ.js → session-FKPVXAAB.js} +79 -163
  186. package/chunks/{settings-JC3VC53L.js → settings-CADELKSU.js} +26 -26
  187. package/chunks/{shell-2NGEMAVM.js → shell-EON6WVVH.js} +22 -22
  188. package/chunks/{skill-3U2T6H3E.js → skill-FKSYXJ5U.js} +10 -10
  189. package/chunks/{spawnChannel-QEAUPARQ.js → spawnChannel-VM5IHLJO.js} +24 -24
  190. package/chunks/{src-75ZPXO7B.js → src-Q4XB6SVD.js} +66 -22
  191. package/chunks/{standalone-update-UUJWJWYY.js → standalone-update-KGZHPBMA.js} +24 -24
  192. package/chunks/{startInteractiveUI-V7XISPQ6.js → startInteractiveUI-EYDJIIIZ.js} +5484 -2045
  193. package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-FG5PQKIR.js} +3 -3
  194. package/chunks/{task-create-DUE2PMNI.js → task-create-HX32YXO7.js} +7 -7
  195. package/chunks/{task-list-WVPNX7BZ.js → task-list-QWSY4ZIU.js} +5 -5
  196. package/chunks/{task-stop-CPEQWOT6.js → task-stop-GWC6UWAL.js} +2 -2
  197. package/chunks/{task-update-HY2LNFFB.js → task-update-NCTAB73Q.js} +7 -7
  198. package/chunks/{team-create-R6AXDYPG.js → team-create-CYP3YKYT.js} +22 -22
  199. package/chunks/{team-delete-JJV6IUOA.js → team-delete-KK37HTOG.js} +5 -5
  200. package/chunks/{team-plan-approval-O2ZPPT64.js → team-plan-approval-5LXIFKNV.js} +22 -22
  201. package/chunks/{theme-manager-YIX2IC2D.js → theme-manager-QOUMDWMP.js} +23 -23
  202. package/chunks/{todoWrite-JHHIDOIV.js → todoWrite-ERCAMLFS.js} +4 -4
  203. package/chunks/{tool-search-5IE2VO7X.js → tool-search-Q27QHQU3.js} +9 -9
  204. package/chunks/{total-session-admission-K6APQYEF.js → total-session-admission-HWVCZ2WR.js} +25 -25
  205. package/chunks/{trustedFolders-GPSSPVBF.js → trustedFolders-C6664IQC.js} +23 -23
  206. package/chunks/{update-relaunch-4BVAPX6Y.js → update-relaunch-QC3E4FZW.js} +9 -9
  207. package/chunks/{updateCheck-AHTHWLAM.js → updateCheck-MVUKJMBX.js} +33 -26
  208. package/chunks/useAutoAcceptIndicator-J234IFIS.js +80 -0
  209. package/chunks/{validateNonInterActiveAuth-UKAPCWDM.js → validateNonInterActiveAuth-YPPEKX4N.js} +61 -63
  210. package/chunks/{version-EXGWKKQE.js → version-5IXFQ4PT.js} +1 -1
  211. package/chunks/{web-fetch-ZDNE6FF2.js → web-fetch-L62NQVKN.js} +10 -10
  212. package/chunks/{workflow-G7U6OQWS.js → workflow-6MHBBFQU.js} +23 -23
  213. package/chunks/{workspace-providers-status-W6CEA6YM.js → workspace-providers-status-ZTW2B5QU.js} +30 -30
  214. package/chunks/{workspace-registration-store-OGBMWCLC.js → workspace-registration-store-P6QHCSMU.js} +7 -1
  215. package/chunks/{workspace-registry-ZUWQM44P.js → workspace-registry-R54M5O3W.js} +25 -25
  216. package/chunks/{workspace-service-UXX5P7GU.js → workspace-service-WYLRGM4A.js} +32 -32
  217. package/chunks/{workspace-skills-status-635B5R7N.js → workspace-skills-status-NN5QFU3A.js} +28 -28
  218. package/chunks/{write-file-DR3HN7IH.js → write-file-EAT3CHUK.js} +23 -23
  219. package/cli.js +11 -11
  220. package/locales/ca.js +763 -201
  221. package/package.json +3 -3
  222. package/web-shell/assets/{arc-_dVIKMdB.js → arc-B0iTWRo2.js} +1 -1
  223. package/web-shell/assets/{architectureDiagram-3BPJPVTR-MuN3nKpL.js → architectureDiagram-3BPJPVTR-DSQP4-9D.js} +1 -1
  224. package/web-shell/assets/{blockDiagram-GPEHLZMM-BtmvJjzx.js → blockDiagram-GPEHLZMM-BNPVXVT3.js} +1 -1
  225. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dvi58_BU.js → c4Diagram-AAUBKEIU-DEHfJFiD.js} +1 -1
  226. package/web-shell/assets/channel-tVz-qNSq.js +1 -0
  227. package/web-shell/assets/{chunk-2J33WTMH-YqxOVhS1.js → chunk-2J33WTMH-VZ0uL1p9.js} +1 -1
  228. package/web-shell/assets/{chunk-4BX2VUAB-DoBgbC9z.js → chunk-4BX2VUAB-D5TKmvwG.js} +1 -1
  229. package/web-shell/assets/{chunk-55IACEB6-3NEQrBAr.js → chunk-55IACEB6-BDW1Lcq-.js} +1 -1
  230. package/web-shell/assets/{chunk-727SXJPM-DrCZQxp0.js → chunk-727SXJPM-Cj4h85iM.js} +1 -1
  231. package/web-shell/assets/{chunk-AQP2D5EJ-m_g3zjgv.js → chunk-AQP2D5EJ-5LeqiOhZ.js} +1 -1
  232. package/web-shell/assets/{chunk-FMBD7UC4-D1_crABJ.js → chunk-FMBD7UC4-BaTgsco7.js} +1 -1
  233. package/web-shell/assets/{chunk-ND2GUHAM-BdhgVtBx.js → chunk-ND2GUHAM-t3uGlIUk.js} +1 -1
  234. package/web-shell/assets/{chunk-QZHKN3VN-BlmThhm-.js → chunk-QZHKN3VN-rOnNXL2Q.js} +1 -1
  235. package/web-shell/assets/classDiagram-4FO5ZUOK-CWuaBxYV.js +1 -0
  236. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CWuaBxYV.js +1 -0
  237. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cbjm_00Z.js → cose-bilkent-S5V4N54A-CcqXykgA.js} +1 -1
  238. package/web-shell/assets/{dagre-BM42HDAG-C39QNVgC.js → dagre-BM42HDAG-Dkjrchoy.js} +1 -1
  239. package/web-shell/assets/{diagram-2AECGRRQ-DNXSAixC.js → diagram-2AECGRRQ-B6lcra9M.js} +1 -1
  240. package/web-shell/assets/{diagram-5GNKFQAL-BCbGUPEA.js → diagram-5GNKFQAL-bAIzq3PT.js} +1 -1
  241. package/web-shell/assets/{diagram-KO2AKTUF-1eujKSDC.js → diagram-KO2AKTUF-G9MAZDNW.js} +1 -1
  242. package/web-shell/assets/{diagram-LMA3HP47-DUMKXgql.js → diagram-LMA3HP47-DVLF1uWZ.js} +1 -1
  243. package/web-shell/assets/{diagram-OG6HWLK6-BFktU3_u.js → diagram-OG6HWLK6-Cf7y20Tc.js} +1 -1
  244. package/web-shell/assets/{erDiagram-TEJ5UH35-BvJC7DLk.js → erDiagram-TEJ5UH35-C7ETZB3o.js} +1 -1
  245. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cgu3PlOt.js → flowDiagram-I6XJVG4X-Cl2xgL6J.js} +1 -1
  246. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DLNXN5Xh.js → ganttDiagram-6RSMTGT7-BgjbMs3q.js} +1 -1
  247. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BQFRDv6R.js → gitGraphDiagram-PVQCEYII-JVX34Omm.js} +1 -1
  248. package/web-shell/assets/index-48bIcdqF.js +1197 -0
  249. package/web-shell/assets/{index-CdC3pjP3.js → index-BG7Zc4f_.js} +1 -1
  250. package/web-shell/assets/index-BI-JAO07.css +5 -0
  251. package/web-shell/assets/{infoDiagram-5YYISTIA-DT2mOSvp.js → infoDiagram-5YYISTIA-3NYyMeZU.js} +1 -1
  252. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-9fy_K4bd.js → ishikawaDiagram-YF4QCWOH-C03VCu-U.js} +1 -1
  253. package/web-shell/assets/{journeyDiagram-JHISSGLW-CoGSEuhE.js → journeyDiagram-JHISSGLW-C9PuBRZW.js} +1 -1
  254. package/web-shell/assets/{kanban-definition-UN3LZRKU-BP9hHYIj.js → kanban-definition-UN3LZRKU-C3LvioWR.js} +1 -1
  255. package/web-shell/assets/{linear-uIroDsmp.js → linear-Du6Yw8N_.js} +1 -1
  256. package/web-shell/assets/{mermaid.core-BUwoStsA.js → mermaid.core-BXY5D2-X.js} +5 -5
  257. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DZB-FWim.js → mindmap-definition-RKZ34NQL-2UrHLaDp.js} +1 -1
  258. package/web-shell/assets/{pieDiagram-4H26LBE5-YPptloKl.js → pieDiagram-4H26LBE5-dC03ml45.js} +1 -1
  259. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-dgk3DSzm.js → quadrantDiagram-W4KKPZXB-CD6jARrp.js} +1 -1
  260. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BH2En2i9.js → requirementDiagram-4Y6WPE33-BrK8aXfv.js} +1 -1
  261. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BB98feeI.js → sankeyDiagram-5OEKKPKP-B5Vitki_.js} +1 -1
  262. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CunAIGh8.js → sequenceDiagram-3UESZ5HK-CBy2t6Bo.js} +1 -1
  263. package/web-shell/assets/{stateDiagram-AJRCARHV-DTJs_-I2.js → stateDiagram-AJRCARHV-Enrka6T2.js} +1 -1
  264. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DUtYfXpW.js +1 -0
  265. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cd4AN7O0.js → timeline-definition-PNZ67QCA-CwFq78ss.js} +1 -1
  266. package/web-shell/assets/{vennDiagram-CIIHVFJN-xIG-rUU9.js → vennDiagram-CIIHVFJN-BkOidM0g.js} +1 -1
  267. package/web-shell/assets/{wardley-L42UT6IY-D1UyjIcG.js → wardley-L42UT6IY-D_j13hQW.js} +1 -1
  268. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BVM0Mb99.js → wardleyDiagram-YWT4CUSO-7EveB1w6.js} +1 -1
  269. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BX31JDSz.js → xychartDiagram-2RQKCTM6-DRkBhMXr.js} +1 -1
  270. package/web-shell/index.html +2 -2
  271. package/chunks/chunk-EDFD7VOX.js +0 -368
  272. package/chunks/chunk-GFYFLDEG.js +0 -709
  273. package/chunks/chunk-LUJQUNKY.js +0 -3288
  274. package/chunks/nonInteractiveCli-YURFHZV5.js +0 -129
  275. package/web-shell/assets/channel-Bi5TehaT.js +0 -1
  276. package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +0 -1
  277. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +0 -1
  278. package/web-shell/assets/index-C_ouplMQ.js +0 -1187
  279. package/web-shell/assets/index-XGDFJE-X.css +0 -5
  280. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DrfFMYta.js +0 -1
@@ -1,11 +1,8 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import {
4
- recomputeMcpGating
5
- } from "./chunk-GW7BONBU.js";
6
3
  import {
7
4
  classifyApiError
8
- } from "./chunk-LUJQUNKY.js";
5
+ } from "./chunk-V7RNNPGC.js";
9
6
  import {
10
7
  EXTENSION_CONTEXT_BUDGET,
11
8
  buildExtensionMentionContext,
@@ -15,40 +12,40 @@ import {
15
12
  matchMcpServerByRef,
16
13
  parseExtensionRef,
17
14
  parseMcpServerRef
18
- } from "./chunk-KGWA7XYL.js";
15
+ } from "./chunk-AY3CSB6F.js";
19
16
  import {
20
17
  getAvailableCommands,
21
18
  handleSlashCommand,
22
19
  insertAfterFunctionResponses,
23
20
  isSlashCommand,
24
21
  normalizePartList
25
- } from "./chunk-4SJJT466.js";
22
+ } from "./chunk-WQQDJE2P.js";
23
+ import {
24
+ recomputeMcpGating
25
+ } from "./chunk-OV2KB55J.js";
26
26
  import {
27
27
  appEvents,
28
28
  buildDisabledSkillNamesProvider,
29
29
  loadCliConfig,
30
30
  normalizeDisabledToolList
31
- } from "./chunk-NALRQ3SG.js";
32
- import "./chunk-5DTTYNB7.js";
33
- import {
34
- collectContextData,
35
- formatContextUsageText
36
- } from "./chunk-NPMVLWYL.js";
31
+ } from "./chunk-FCUUJKZF.js";
37
32
  import {
38
33
  getCommandSubcommandNames
39
- } from "./chunk-GFYFLDEG.js";
40
- import "./chunk-EDFD7VOX.js";
34
+ } from "./chunk-7KGXAXF7.js";
41
35
  import {
42
36
  getEffectiveSupportedModes
43
- } from "./chunk-MRE77ST5.js";
37
+ } from "./chunk-2GOPPEHK.js";
38
+ import "./chunk-5DTTYNB7.js";
39
+ import "./chunk-QKYTTBYW.js";
40
+ import {
41
+ collectContextData,
42
+ formatContextUsageText
43
+ } from "./chunk-5YVZ2XLV.js";
44
44
  import "./chunk-4WGODMVR.js";
45
- import "./chunk-KW7NOTN6.js";
46
- import "./chunk-GEHSF7MS.js";
47
- import "./chunk-XAAEDML2.js";
48
- import "./chunk-ETN2G32U.js";
49
- import "./chunk-NHDKSOEY.js";
50
- import "./chunk-OBSLEYCD.js";
51
- import "./chunk-WIYV7CSF.js";
45
+ import "./chunk-AYCDXHZB.js";
46
+ import "./chunk-JPRLCXAO.js";
47
+ import "./chunk-5PZ6R37W.js";
48
+ import "./chunk-BWK3FX3K.js";
52
49
  import "./chunk-YAF2MQZ6.js";
53
50
  import {
54
51
  GENERATION_MAX_PROMPT_BYTES,
@@ -68,7 +65,7 @@ import {
68
65
  shouldSuppressRememberErrorDetails,
69
66
  workspaceMemoryFailureCode,
70
67
  workspaceMemoryFailureDiagnostics
71
- } from "./chunk-KRMARA3A.js";
68
+ } from "./chunk-CG2HPAVD.js";
72
69
  import {
73
70
  HistoryReplayer,
74
71
  MessageEmitter,
@@ -78,21 +75,21 @@ import {
78
75
  goalTerminalEventToHistoryItem,
79
76
  recordGoalStatusItem,
80
77
  restoreGoalFromHistory
81
- } from "./chunk-GXFYV7MP.js";
82
- import "./chunk-QSG4ZFG4.js";
83
- import "./chunk-HZ4M2UQD.js";
84
- import "./chunk-J6NT5YTN.js";
78
+ } from "./chunk-PFKNXN67.js";
79
+ import "./chunk-KTUQMDEP.js";
80
+ import "./chunk-6RVJRVQR.js";
81
+ import "./chunk-RS7MT2QG.js";
82
+ import "./chunk-H2XVO6NE.js";
85
83
  import "./chunk-QHTIBUWB.js";
86
84
  import {
87
85
  isTerminalGoalStatusKind
88
- } from "./chunk-76BFY7AF.js";
89
- import "./chunk-HTHUX2T5.js";
86
+ } from "./chunk-QTERJVPZ.js";
90
87
  import "./chunk-L573Z2QZ.js";
91
88
  import {
92
89
  computeCpuPercent
93
90
  } from "./chunk-HGT6JR3U.js";
94
91
  import "./chunk-RXFQM6FQ.js";
95
- import "./chunk-DJ4VHAFJ.js";
92
+ import "./chunk-4CWPMWCD.js";
96
93
  import "./chunk-6H67XLET.js";
97
94
  import {
98
95
  beginAcpBootstrapConfigProfiling,
@@ -100,9 +97,9 @@ import {
100
97
  endAcpBootstrapConfigProfiling,
101
98
  markAcpStartup
102
99
  } from "./chunk-TDKQP3M6.js";
103
- import "./chunk-UZC5VPOJ.js";
100
+ import "./chunk-2GFRA3MN.js";
104
101
  import "./chunk-LXXMOYPL.js";
105
- import "./chunk-3B6PSWHE.js";
102
+ import "./chunk-GH7OEOYU.js";
106
103
  import "./chunk-E5Z2AVNV.js";
107
104
  import {
108
105
  ACP_ROUTE_ID_PREFIX,
@@ -112,7 +109,7 @@ import {
112
109
  parseAcpModelOption,
113
110
  resolveAcpModelOption,
114
111
  sanitizeProviderBaseUrl
115
- } from "./chunk-HVGJWOR6.js";
112
+ } from "./chunk-L4YSPHR4.js";
116
113
  import {
117
114
  mapSkillConfigToStatus
118
115
  } from "./chunk-2W3OOD4W.js";
@@ -122,19 +119,19 @@ import {
122
119
  buildPermissionSettings,
123
120
  normalizePermissionRules,
124
121
  readPermissionRuleSet
125
- } from "./chunk-QIFTJDBY.js";
122
+ } from "./chunk-IM2A6YO3.js";
126
123
  import {
127
124
  MAX_AUDIO_BYTES,
128
125
  sanitizeVoiceErrorMessage,
129
126
  transcribeVoiceAudio
130
- } from "./chunk-3ESL7JXA.js";
127
+ } from "./chunk-U4VGYZN7.js";
131
128
  import {
132
129
  readVoiceModel
133
- } from "./chunk-2476XGOU.js";
134
- import "./chunk-F2RR4HO2.js";
130
+ } from "./chunk-GPILFVPY.js";
131
+ import "./chunk-BVLROR2T.js";
135
132
  import {
136
133
  parseSessionSource
137
- } from "./chunk-W4UN42YP.js";
134
+ } from "./chunk-R3VZNHRX.js";
138
135
  import "./chunk-6RLROE6G.js";
139
136
  import "./chunk-COH43MRJ.js";
140
137
  import {
@@ -151,7 +148,7 @@ import {
151
148
  } from "./chunk-QR6U5QPP.js";
152
149
  import {
153
150
  ndJsonStream
154
- } from "./chunk-PUKUUASO.js";
151
+ } from "./chunk-DMRO4GU2.js";
155
152
  import {
156
153
  NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE
157
154
  } from "./chunk-X6YQWCIJ.js";
@@ -162,23 +159,23 @@ import {
162
159
  SERVE_STATUS_EXT_METHODS,
163
160
  STATUS_SCHEMA_VERSION,
164
161
  mapDomainErrorToErrorKind
165
- } from "./chunk-64GC5EMF.js";
166
- import "./chunk-HD6EGS5K.js";
167
- import "./chunk-RKUMFUFM.js";
162
+ } from "./chunk-DZZIOIVF.js";
163
+ import "./chunk-CUJX3F4X.js";
164
+ import "./chunk-6MC5ASQK.js";
168
165
  import "./chunk-57OAHC2Y.js";
169
- import "./chunk-EFAXBOQO.js";
170
- import "./chunk-W6CQPLWM.js";
166
+ import "./chunk-32F7BZSK.js";
167
+ import "./chunk-6ZBPS62S.js";
171
168
  import "./chunk-V6WHFGST.js";
172
169
  import {
173
170
  createLoadedSettingsAdapter
174
- } from "./chunk-42VIHAYT.js";
171
+ } from "./chunk-B452RETY.js";
175
172
  import "./chunk-W7FJ3N32.js";
176
- import "./chunk-I7RRHHYG.js";
173
+ import "./chunk-QKTHJXCS.js";
177
174
  import "./chunk-TJTKSVIV.js";
178
175
  import "./chunk-M5GB774H.js";
179
- import "./chunk-HCCR43AY.js";
180
- import "./chunk-BABX5XRO.js";
181
- import "./chunk-BKNPMEN6.js";
176
+ import "./chunk-RFIAR4YL.js";
177
+ import "./chunk-2LI23QA6.js";
178
+ import "./chunk-RVLZCXEE.js";
182
179
  import {
183
180
  AgentSideConnection,
184
181
  PROTOCOL_VERSION,
@@ -187,7 +184,7 @@ import {
187
184
  import {
188
185
  assembleMcpServers,
189
186
  loadMcpApprovals
190
- } from "./chunk-4MPYGENG.js";
187
+ } from "./chunk-G45NOBV7.js";
191
188
  import {
192
189
  getOutputLanguageFilePath,
193
190
  getPersistScopeForModelSelection,
@@ -196,7 +193,7 @@ import {
196
193
  resolveOutputLanguageOrPreserveAuto,
197
194
  updateOutputLanguageFile,
198
195
  writeOutputLanguageAndRegisterPath
199
- } from "./chunk-6IITZE7O.js";
196
+ } from "./chunk-5JX5EWR5.js";
200
197
  import "./chunk-RKUWKYED.js";
201
198
  import "./chunk-GOXKNSDZ.js";
202
199
  import {
@@ -207,20 +204,20 @@ import {
207
204
  SUPPORTED_LANGUAGES,
208
205
  getCurrentLanguage,
209
206
  setLanguageAsync
210
- } from "./chunk-TKASNYDS.js";
207
+ } from "./chunk-6DHWO5ZF.js";
211
208
  import {
212
209
  findEnvFiles,
213
210
  preResolveHomeEnvOverrides,
214
211
  reloadEnvironment
215
- } from "./chunk-PR5XQ73G.js";
212
+ } from "./chunk-KTNIZG2C.js";
216
213
  import "./chunk-QRUIS3DN.js";
217
- import "./chunk-GLH2NTPB.js";
214
+ import "./chunk-XCHUDLER.js";
218
215
  import "./chunk-VJNBRRZG.js";
219
216
  import {
220
217
  isFolderTrustEnabled,
221
218
  isWorkspaceTrusted,
222
219
  loadTrustedFolders
223
- } from "./chunk-GMUPIMHF.js";
220
+ } from "./chunk-4RA7PWIY.js";
224
221
  import "./chunk-ALGGS7UH.js";
225
222
  import "./chunk-MR3PXB6E.js";
226
223
  import {
@@ -246,6 +243,7 @@ import {
246
243
  McpServerSpawnFailedError,
247
244
  McpTransportPool,
248
245
  MessageDisplayDispatcher,
246
+ PLAN_MODE_ENTRY_SIBLING_SKIP_MESSAGE,
249
247
  POOLED_TRANSPORTS_DEFAULT,
250
248
  SESSION_ARTIFACT_PERSISTENCE_VERSION,
251
249
  SESSION_TITLE_MAX_LENGTH,
@@ -275,13 +273,16 @@ import {
275
273
  convertToFunctionErrorResponse,
276
274
  convertToFunctionResponse,
277
275
  createDuplicateProviderToolCallResponse,
276
+ decoratePlanModeShellConfirmation,
278
277
  dedupeToolCallsById,
279
278
  detectAutonomousSentinel,
280
279
  detectLoopSentinel,
281
280
  encodeSessionTranscriptCursor,
282
281
  evaluateAutoMode,
283
282
  evaluatePermissionFlow,
283
+ evaluatePlanModeShellPolicy,
284
284
  findExistingProviderModels,
285
+ findPlanModeEntryBatchBoundaryIndex,
285
286
  findProviderById,
286
287
  findRepeatedDuplicateProviderToolCall,
287
288
  fireNotificationHook,
@@ -305,6 +306,7 @@ import {
305
306
  getProviderToolCallId,
306
307
  getScopedEnvContents,
307
308
  getStartupContextLength,
309
+ getStopHookContinuationReason,
308
310
  ideContextStore,
309
311
  injectPermissionRulesIfMissing,
310
312
  isApproveOutcome,
@@ -340,21 +342,23 @@ import {
340
342
  shouldRunAutoModeForCall,
341
343
  subagentGenerator,
342
344
  unregisterGoalHook,
343
- updateSetting
344
- } from "./chunk-GCY7QTCE.js";
345
+ updateSetting,
346
+ validatePlanModeShellApproval,
347
+ validatePlanModeShellContext
348
+ } from "./chunk-NO6XTCYT.js";
345
349
  import "./chunk-5M6IDOMF.js";
346
350
  import "./chunk-T4TZQJ7W.js";
347
351
  import {
348
352
  external_exports
349
353
  } from "./chunk-H6XPXXMH.js";
350
- import "./chunk-LKR7QQ63.js";
351
- import "./chunk-4XCVGEEX.js";
352
- import "./chunk-XSPFQQRE.js";
353
- import "./chunk-4RPARQ5D.js";
354
+ import "./chunk-EAUYY7SS.js";
355
+ import "./chunk-FSL5W5TI.js";
356
+ import "./chunk-OONJNQ42.js";
357
+ import "./chunk-D2VIDMVM.js";
354
358
  import "./chunk-E2UVIFI2.js";
355
359
  import "./chunk-XU457J4V.js";
356
360
  import "./chunk-VDDGDZMA.js";
357
- import "./chunk-J2MKYJKZ.js";
361
+ import "./chunk-EIAK6Q2B.js";
358
362
  import "./chunk-SZRN75WQ.js";
359
363
  import "./chunk-HTO4JFDZ.js";
360
364
  import "./chunk-CPBF7KYF.js";
@@ -362,20 +366,20 @@ import {
362
366
  APPROVAL_MODES,
363
367
  FORK_SUBAGENT_TYPE,
364
368
  runWithRuntimeContentGenerator
365
- } from "./chunk-UOA2IHRI.js";
369
+ } from "./chunk-CPCVCKKF.js";
366
370
  import "./chunk-6AM5D4ME.js";
367
- import "./chunk-OSSDHJDU.js";
371
+ import "./chunk-G45X5TRN.js";
368
372
  import {
369
373
  HookEventName,
370
374
  createHookOutput
371
- } from "./chunk-SGPFJMRP.js";
372
- import "./chunk-335ECZTA.js";
373
- import "./chunk-JCJPZMJV.js";
375
+ } from "./chunk-PBATSWUQ.js";
376
+ import "./chunk-ZEOZL37W.js";
377
+ import "./chunk-OOCI5VVU.js";
374
378
  import {
375
379
  clearCachedCredentialFile,
376
380
  qwenOAuth2Events
377
- } from "./chunk-2CCDMJM7.js";
378
- import "./chunk-6ETOSWAO.js";
381
+ } from "./chunk-25Y6JSH2.js";
382
+ import "./chunk-246TW4IX.js";
379
383
  import "./chunk-JESCGQM3.js";
380
384
  import {
381
385
  AuthType,
@@ -412,31 +416,31 @@ import {
412
416
  uiTelemetryService,
413
417
  withDaemonSpan,
414
418
  withInteractionSpan
415
- } from "./chunk-CPU6I5YV.js";
419
+ } from "./chunk-P64HXIC5.js";
416
420
  import "./chunk-4WKAA4KS.js";
417
421
  import "./chunk-CR3C7WXL.js";
418
422
  import "./chunk-VGC4I5JJ.js";
419
423
  import {
420
424
  getAutoMemoryRoot,
421
425
  getUserAutoMemoryRoot
422
- } from "./chunk-LPHGXXZX.js";
423
- import "./chunk-4CA4WUMS.js";
424
- import "./chunk-VAJS2E2D.js";
425
- import "./chunk-WEPXQKGP.js";
426
+ } from "./chunk-JD3MKVKL.js";
427
+ import "./chunk-UEY4AYUL.js";
428
+ import "./chunk-BDBMYST4.js";
429
+ import "./chunk-EZVDJFZ7.js";
426
430
  import {
427
431
  ToolConfirmationOutcome,
428
432
  ToolNames,
429
433
  isShellProgressData
430
- } from "./chunk-ANRANWVE.js";
434
+ } from "./chunk-OP4MOGXF.js";
431
435
  import "./chunk-XVNQMZ2I.js";
432
436
  import "./chunk-FEOZBUMT.js";
433
437
  import "./chunk-DJ2GSRLV.js";
434
- import "./chunk-4CHDYDG3.js";
438
+ import "./chunk-6EFTQYW7.js";
435
439
  import {
436
440
  DEFAULT_TOKEN_LIMIT,
437
441
  getToolCallPreparations,
438
442
  tokenLimit
439
- } from "./chunk-V4PCIS25.js";
443
+ } from "./chunk-FZVSFBNW.js";
440
444
  import "./chunk-A4UCTEB5.js";
441
445
  import "./chunk-XWRJCPHC.js";
442
446
  import "./chunk-TYQMGACW.js";
@@ -448,11 +452,11 @@ import {
448
452
  getErrorMessage,
449
453
  getErrorStatus,
450
454
  isSubpath
451
- } from "./chunk-UE5TZ55T.js";
452
- import "./chunk-PK7COE5O.js";
455
+ } from "./chunk-C27BYUX6.js";
456
+ import "./chunk-ABIL4ZQU.js";
453
457
  import {
454
458
  runExitCleanup
455
- } from "./chunk-KMJOMWHE.js";
459
+ } from "./chunk-WRRF6TEQ.js";
456
460
  import "./chunk-75DOP5OR.js";
457
461
  import "./chunk-DMTGGOSA.js";
458
462
  import "./chunk-YQ3U5MUC.js";
@@ -997,6 +1001,13 @@ function interactionMetaFields(confirmation) {
997
1001
  __name(interactionMetaFields, "interactionMetaFields");
998
1002
  function buildPermissionRequestContent(confirmation) {
999
1003
  const content = [];
1004
+ const warnings = confirmation.type === "exec" || confirmation.type === "edit" ? confirmation.warnings ?? [] : [];
1005
+ for (const warning of warnings) {
1006
+ content.push({
1007
+ type: "content",
1008
+ content: { type: "text", text: warning }
1009
+ });
1010
+ }
1000
1011
  if (confirmation.type === "edit") {
1001
1012
  content.push({
1002
1013
  type: "diff",
@@ -1017,6 +1028,56 @@ function buildPermissionRequestContent(confirmation) {
1017
1028
  return content;
1018
1029
  }
1019
1030
  __name(buildPermissionRequestContent, "buildPermissionRequestContent");
1031
+ function permissionAbortError(signal) {
1032
+ return signal.reason instanceof Error ? signal.reason : new Error("Permission request was aborted.");
1033
+ }
1034
+ __name(permissionAbortError, "permissionAbortError");
1035
+ function requestPermissionWithAbort(client, params, signal) {
1036
+ if (signal.aborted) {
1037
+ return Promise.reject(permissionAbortError(signal));
1038
+ }
1039
+ return new Promise((resolve5, reject) => {
1040
+ let settled = false;
1041
+ const finish = /* @__PURE__ */ __name((callback) => {
1042
+ if (settled) return;
1043
+ settled = true;
1044
+ signal.removeEventListener("abort", onAbort);
1045
+ callback();
1046
+ }, "finish");
1047
+ const onAbort = /* @__PURE__ */ __name(() => finish(() => reject(permissionAbortError(signal))), "onAbort");
1048
+ signal.addEventListener("abort", onAbort, { once: true });
1049
+ let request;
1050
+ try {
1051
+ request = client.requestPermission(params);
1052
+ } catch (error) {
1053
+ finish(() => reject(error));
1054
+ return;
1055
+ }
1056
+ request.then(
1057
+ (response) => finish(() => resolve5(response)),
1058
+ (error) => finish(() => reject(error))
1059
+ );
1060
+ });
1061
+ }
1062
+ __name(requestPermissionWithAbort, "requestPermissionWithAbort");
1063
+ function resolvePermissionOutcome(response, offeredOptions) {
1064
+ if (response.outcome.outcome === "cancelled") {
1065
+ return "cancel" /* Cancel */;
1066
+ }
1067
+ const optionId = response.outcome.optionId;
1068
+ if (!offeredOptions.some((option) => option.optionId === optionId)) {
1069
+ throw new Error(
1070
+ `Permission response selected unoffered option: ${optionId}`
1071
+ );
1072
+ }
1073
+ if (!Object.values(ToolConfirmationOutcome).includes(
1074
+ optionId
1075
+ )) {
1076
+ throw new Error(`Permission response selected invalid option: ${optionId}`);
1077
+ }
1078
+ return optionId;
1079
+ }
1080
+ __name(resolvePermissionOutcome, "resolvePermissionOutcome");
1020
1081
  function toPermissionOptions(confirmation, forceHideAlwaysAllow = false) {
1021
1082
  switch (confirmation.type) {
1022
1083
  case "edit":
@@ -1243,9 +1304,13 @@ var SubAgentTracker = class {
1243
1304
  }, "onConfirm")
1244
1305
  };
1245
1306
  const { title, locations, kind } = this.toolCallEmitter.resolveToolMetadata(event.name, state?.args);
1307
+ const permissionOptions = toPermissionOptions(fullConfirmationDetails);
1308
+ const offeredPermissionOptions = permissionOptions.map((option) => ({
1309
+ ...option
1310
+ }));
1246
1311
  const params = {
1247
1312
  sessionId: this.ctx.sessionId,
1248
- options: toPermissionOptions(fullConfirmationDetails),
1313
+ options: permissionOptions,
1249
1314
  toolCall: {
1250
1315
  toolCallId: event.callId,
1251
1316
  status: "pending",
@@ -1266,8 +1331,15 @@ var SubAgentTracker = class {
1266
1331
  }
1267
1332
  };
1268
1333
  try {
1269
- const output = await this.client.requestPermission(params);
1270
- const outcome = output.outcome.outcome === "cancelled" ? "cancel" /* Cancel */ : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
1334
+ const output = await requestPermissionWithAbort(
1335
+ this.client,
1336
+ params,
1337
+ abortSignal
1338
+ );
1339
+ const outcome = resolvePermissionOutcome(
1340
+ output,
1341
+ offeredPermissionOptions
1342
+ );
1271
1343
  await event.respond(outcome, {
1272
1344
  answers: "answers" in output ? output.answers : void 0
1273
1345
  });
@@ -1859,6 +1931,10 @@ function maskApiKeyForDisplay(apiKey) {
1859
1931
  return `${trimmed.slice(0, 3)}...${trimmed.slice(-4)}`;
1860
1932
  }
1861
1933
  __name(maskApiKeyForDisplay, "maskApiKeyForDisplay");
1934
+ function getAbortAwareEndTurnStopReason(signal) {
1935
+ return signal.aborted ? "cancelled" : "end_turn";
1936
+ }
1937
+ __name(getAbortAwareEndTurnStopReason, "getAbortAwareEndTurnStopReason");
1862
1938
  var DAEMON_INVALID_TOOL_PARAMS_THRESHOLD = 3;
1863
1939
  var PERMISSION_CANCEL_SKIP_MESSAGE = "Skipped because a permission request was cancelled before the user answered; user input is required before continuing.";
1864
1940
  var LOOP_DETECTED_SKIP_MESSAGE = "Skipped because loop detection stopped the current turn before this tool call could run.";
@@ -3406,7 +3482,11 @@ ${this.pendingWorktreeNotice}
3406
3482
  toolRun,
3407
3483
  pendingSend.signal
3408
3484
  );
3409
- return { stopReason: "end_turn" };
3485
+ return {
3486
+ stopReason: getAbortAwareEndTurnStopReason(
3487
+ pendingSend.signal
3488
+ )
3489
+ };
3410
3490
  }
3411
3491
  const nextAfterTools = await this.#buildNextMessageAfterToolRun(
3412
3492
  toolRun,
@@ -3420,7 +3500,11 @@ ${this.pendingWorktreeNotice}
3420
3500
  toolRun,
3421
3501
  pendingSend.signal
3422
3502
  );
3423
- return { stopReason: "end_turn" };
3503
+ return {
3504
+ stopReason: getAbortAwareEndTurnStopReason(
3505
+ pendingSend.signal
3506
+ )
3507
+ };
3424
3508
  }
3425
3509
  }
3426
3510
  }
@@ -3465,7 +3549,7 @@ ${this.pendingWorktreeNotice}
3465
3549
  while (true) {
3466
3550
  if (pendingSend.signal.aborted) {
3467
3551
  this.todoStopGuard.suspend();
3468
- return { stopReason: "end_turn" };
3552
+ return { stopReason: "cancelled" };
3469
3553
  }
3470
3554
  if (this.config.getApprovalMode() === "plan" /* PLAN */) {
3471
3555
  this.#clearTodoStopGuardTrustAndDrainAutomaticQueues();
@@ -3568,7 +3652,7 @@ ${this.pendingWorktreeNotice}
3568
3652
  await this.messageEmitter.emitAgentMessage(stopOutput.systemMessage);
3569
3653
  }
3570
3654
  if (stopOutput?.isBlockingDecision() || stopOutput?.shouldStopExecution()) {
3571
- externalReason = stopOutput.getEffectiveReason();
3655
+ externalReason = getStopHookContinuationReason(stopOutput);
3572
3656
  stopHookIterationCount++;
3573
3657
  stopHookReasons = [...stopHookReasons, externalReason];
3574
3658
  stopHookCount = response.stopHookCount ?? 1;
@@ -3915,7 +3999,7 @@ ${this.pendingWorktreeNotice}
3915
3999
  await this.#preserveStoppedToolRun(toolRun, pendingSend.signal);
3916
4000
  return {
3917
4001
  kind: "terminal",
3918
- stopReason: "end_turn",
4002
+ stopReason: getAbortAwareEndTurnStopReason(pendingSend.signal),
3919
4003
  ...supersededAutomaticContinuation ? { supersededAutomaticContinuation: true } : {}
3920
4004
  };
3921
4005
  }
@@ -4164,13 +4248,18 @@ ${this.pendingWorktreeNotice}
4164
4248
  }
4165
4249
  }
4166
4250
  async #preserveStoppedToolRun(toolRun, abortSignal) {
4251
+ const midTurnParts = abortSignal.aborted ? await this.#buildMidTurnParts(
4252
+ this.#takeRecoveredMidTurnMessages(),
4253
+ abortSignal,
4254
+ { preserveFallbackOnAbort: true }
4255
+ ) : await this.#drainMidTurnUserMessages(abortSignal);
4167
4256
  this.#preserveUnsentMessageHistory(
4168
4257
  {
4169
4258
  role: "user",
4170
4259
  parts: [
4171
4260
  ...toolRun.parts,
4172
4261
  ...toolRun.loopDetected ? [{ text: LOOP_DETECTED_CONTEXT_MESSAGE }] : [],
4173
- ...await this.#drainMidTurnUserMessages(abortSignal)
4262
+ ...midTurnParts
4174
4263
  ]
4175
4264
  },
4176
4265
  true
@@ -4285,11 +4374,7 @@ ${this.pendingWorktreeNotice}
4285
4374
  const recovered = this.#takeRecoveredMidTurnMessages();
4286
4375
  if (this.midTurnDrainUnavailable) {
4287
4376
  return {
4288
- parts: await this.#buildMidTurnParts(
4289
- recovered,
4290
- abortSignal,
4291
- options.onFullTurnModel
4292
- ),
4377
+ parts: await this.#buildMidTurnParts(recovered, abortSignal, options),
4293
4378
  hasQueuedPrompt: false
4294
4379
  };
4295
4380
  }
@@ -4317,7 +4402,7 @@ ${this.pendingWorktreeNotice}
4317
4402
  parts: await this.#buildMidTurnParts(
4318
4403
  [...recovered, ...parseMidTurnDrainResponse(response)],
4319
4404
  abortSignal,
4320
- options.onFullTurnModel
4405
+ options
4321
4406
  ),
4322
4407
  hasQueuedPrompt: isRecord2(response) && response["hasQueuedPrompt"] === true
4323
4408
  };
@@ -4337,11 +4422,7 @@ ${this.pendingWorktreeNotice}
4337
4422
  `Mid-turn queue drain ${isPermanentError ? "permanently " : ""}unavailable [session ${this.sessionId}]: ${errorMessage}`
4338
4423
  );
4339
4424
  return {
4340
- parts: await this.#buildMidTurnParts(
4341
- recovered,
4342
- abortSignal,
4343
- options.onFullTurnModel
4344
- ),
4425
+ parts: await this.#buildMidTurnParts(recovered, abortSignal, options),
4345
4426
  hasQueuedPrompt: false
4346
4427
  };
4347
4428
  }
@@ -4401,7 +4482,7 @@ ${this.pendingWorktreeNotice}
4401
4482
  * happens on injection (here), so a message recovered from an earlier
4402
4483
  * timed-out drain is still recorded exactly once.
4403
4484
  */
4404
- async #buildMidTurnParts(messages, abortSignal, onFullTurnModel) {
4485
+ async #buildMidTurnParts(messages, abortSignal, options = {}) {
4405
4486
  const parts = [];
4406
4487
  for (const message of messages) {
4407
4488
  const displayText = message.kind === "text" ? message.message : message.displayText;
@@ -4411,13 +4492,19 @@ ${this.pendingWorktreeNotice}
4411
4492
  abortSignal,
4412
4493
  MID_TURN_QUEUE_RESOLVE_TIMEOUT_MS,
4413
4494
  (signal) => this.#resolvePrompt(message.content, signal, {
4414
- onFullTurnModel
4495
+ onFullTurnModel: options.onFullTurnModel
4415
4496
  })
4416
4497
  );
4417
4498
  } catch (messageError) {
4418
- if (abortSignal.aborted) return parts;
4419
- const errorMessage = this.#formatError(messageError);
4420
- debugLogger6.warn(`Failed to resolve mid-turn message: ${errorMessage}`);
4499
+ if (abortSignal.aborted && !options.preserveFallbackOnAbort) {
4500
+ return parts;
4501
+ }
4502
+ if (!abortSignal.aborted) {
4503
+ const errorMessage = this.#formatError(messageError);
4504
+ debugLogger6.warn(
4505
+ `Failed to resolve mid-turn message: ${errorMessage}`
4506
+ );
4507
+ }
4421
4508
  rawParts = [{ text: displayText }];
4422
4509
  if (message.kind === "structured" && hasInlineMediaContentBlock(message.content)) {
4423
4510
  rawParts.push({ text: MID_TURN_ATTACHMENT_PROCESSING_FAILURE_TEXT });
@@ -5094,7 +5181,9 @@ ${this.pendingWorktreeNotice}
5094
5181
  if (toolRun.stopAfterPermissionCancel) {
5095
5182
  this.todoStopGuard.suspend();
5096
5183
  await this.#preserveStoppedToolRun(toolRun, ac.signal);
5097
- await this.#emitBackgroundNotificationEndTurn("end_turn");
5184
+ await this.#emitBackgroundNotificationEndTurn(
5185
+ getAbortAwareEndTurnStopReason(ac.signal)
5186
+ );
5098
5187
  return;
5099
5188
  }
5100
5189
  const nextAfterTools = await this.#buildNextMessageAfterToolRun(
@@ -5105,7 +5194,9 @@ ${this.pendingWorktreeNotice}
5105
5194
  if (toolRun.loopDetected) {
5106
5195
  this.todoStopGuard.suspend();
5107
5196
  await this.#preserveStoppedToolRun(toolRun, ac.signal);
5108
- await this.#emitBackgroundNotificationEndTurn("end_turn");
5197
+ await this.#emitBackgroundNotificationEndTurn(
5198
+ getAbortAwareEndTurnStopReason(ac.signal)
5199
+ );
5109
5200
  return;
5110
5201
  }
5111
5202
  }
@@ -5123,7 +5214,9 @@ ${this.pendingWorktreeNotice}
5123
5214
  false
5124
5215
  )).stopReason;
5125
5216
  }
5126
- await this.#emitBackgroundNotificationEndTurn(stopReason);
5217
+ await this.#emitBackgroundNotificationEndTurn(
5218
+ ac.signal.aborted ? "cancelled" : stopReason
5219
+ );
5127
5220
  } catch (error) {
5128
5221
  if (ac.signal.aborted) {
5129
5222
  this.todoStopGuard.suspend();
@@ -5417,7 +5510,7 @@ ${this.pendingWorktreeNotice}
5417
5510
  async runToolCalls(abortSignal, promptId, functionCalls, toolLoopState) {
5418
5511
  const dedupedFunctionCalls = dedupeToolCallsById(functionCalls);
5419
5512
  let skippedToolCallCounter = 0;
5420
- const recordSkippedToolCall = /* @__PURE__ */ __name(async (fc, message = PERMISSION_CANCEL_SKIP_MESSAGE, emitStart = true) => {
5513
+ const recordSkippedToolCall = /* @__PURE__ */ __name(async (fc, message = PERMISSION_CANCEL_SKIP_MESSAGE, emitStart = true, errorType) => {
5421
5514
  const toolName = fc.name ?? "unknown_tool";
5422
5515
  const callId = fc.id ?? `${toolName}-skip-${++skippedToolCallCounter}`;
5423
5516
  const part = {
@@ -5434,7 +5527,7 @@ ${this.pendingWorktreeNotice}
5434
5527
  status: "error",
5435
5528
  resultDisplay: void 0,
5436
5529
  error,
5437
- errorType: void 0
5530
+ errorType
5438
5531
  });
5439
5532
  if (emitStart) {
5440
5533
  await this.toolCallEmitter.emitStart({
@@ -5567,6 +5660,13 @@ ${this.pendingWorktreeNotice}
5567
5660
  batches.push({ kind: "execute", concurrent: isAgent, calls: [fc] });
5568
5661
  }
5569
5662
  }
5663
+ const executableCalls = batches.flatMap(
5664
+ (batch) => batch.kind === "execute" ? batch.calls : []
5665
+ );
5666
+ const planModeEntryBoundaryIndex = findPlanModeEntryBatchBoundaryIndex(
5667
+ executableCalls.map((call) => call.name)
5668
+ );
5669
+ const planModeEntryBoundary = planModeEntryBoundaryIndex === void 0 ? void 0 : executableCalls[planModeEntryBoundaryIndex];
5570
5670
  const appendSkippedAfter = /* @__PURE__ */ __name(async (parts2, fc, message = PERMISSION_CANCEL_SKIP_MESSAGE) => {
5571
5671
  const startIndex = dedupedFunctionCalls.indexOf(fc) + 1;
5572
5672
  for (const remainingCall of dedupedFunctionCalls.slice(startIndex)) {
@@ -5704,6 +5804,19 @@ ${this.pendingWorktreeNotice}
5704
5804
  parts.push(...batch.response.responseParts);
5705
5805
  continue;
5706
5806
  }
5807
+ if (planModeEntryBoundary && !batch.calls.includes(planModeEntryBoundary)) {
5808
+ for (const fc of batch.calls) {
5809
+ parts.push(
5810
+ await recordSkippedToolCall(
5811
+ fc,
5812
+ PLAN_MODE_ENTRY_SIBLING_SKIP_MESSAGE,
5813
+ true,
5814
+ "execution_denied" /* EXECUTION_DENIED */
5815
+ )
5816
+ );
5817
+ }
5818
+ continue;
5819
+ }
5707
5820
  if (batch.concurrent && batch.calls.length > 1) {
5708
5821
  const batchAbortController = new AbortController();
5709
5822
  let batchStopAfterPermissionCancel = false;
@@ -5937,19 +6050,21 @@ ${this.pendingWorktreeNotice}
5937
6050
  { recordInvalidToolParams: true }
5938
6051
  );
5939
6052
  }
5940
- const toolSpan = startToolSpan(toolName, {
6053
+ const policyToolName = tool.name;
6054
+ const originalPolicyRequestArgs = policyToolName === ToolNames.SHELL || policyToolName === ToolNames.MONITOR ? structuredClone(args) : args;
6055
+ const toolSpan = startToolSpan(policyToolName, {
5941
6056
  "tool.call_id": callId,
5942
6057
  // Dual-emit the legacy call_id/tool_name aliases like CoreToolScheduler
5943
6058
  // (coreToolScheduler.ts) so pre-Phase-2 dashboards keyed off call_id keep
5944
6059
  // matching daemon/ACP tool spans during the migration window.
5945
6060
  call_id: callId,
5946
- tool_name: toolName
6061
+ tool_name: policyToolName
5947
6062
  });
5948
6063
  let spanSuccess = false;
5949
6064
  try {
5950
6065
  return await runInToolSpanContext(toolSpan, async () => {
5951
6066
  const pm = this.config.getPermissionManager?.();
5952
- if (pm && !await pm.isToolEnabled(toolName)) {
6067
+ if (pm && !await pm.isToolEnabled(policyToolName)) {
5953
6068
  return earlyErrorResponse(
5954
6069
  new Error(`Tool "${toolName}" is disabled.`),
5955
6070
  toolName
@@ -5978,7 +6093,7 @@ ${this.pendingWorktreeNotice}
5978
6093
  }
5979
6094
  }
5980
6095
  const toolUseId = generateToolUseId();
5981
- const approvalMode = this.config.getApprovalMode();
6096
+ let approvalMode = this.config.getApprovalMode();
5982
6097
  let toolBuildSucceeded = false;
5983
6098
  try {
5984
6099
  const invocation = tool.build(args);
@@ -6003,12 +6118,12 @@ ${this.pendingWorktreeNotice}
6003
6118
  activeToolAbortSignal
6004
6119
  );
6005
6120
  }
6006
- const isAskUserQuestionTool = toolName === ToolNames.ASK_USER_QUESTION;
6007
- const toolParams = invocation.params;
6121
+ const isAskUserQuestionTool = policyToolName === ToolNames.ASK_USER_QUESTION;
6122
+ let toolParams = invocation.params;
6008
6123
  const flowResult = await evaluatePermissionFlow(
6009
6124
  this.config,
6010
6125
  invocation,
6011
- toolName,
6126
+ policyToolName,
6012
6127
  toolParams
6013
6128
  );
6014
6129
  const {
@@ -6018,31 +6133,74 @@ ${this.pendingWorktreeNotice}
6018
6133
  denyMessage,
6019
6134
  requiresUserInteraction
6020
6135
  } = flowResult;
6136
+ approvalMode = this.config.getApprovalMode();
6021
6137
  const isPlanMode = approvalMode === "plan" /* PLAN */;
6138
+ const isPlanShellCall = isPlanMode && (policyToolName === ToolNames.SHELL || policyToolName === ToolNames.MONITOR);
6022
6139
  if (finalPermission === "deny") {
6023
6140
  return earlyErrorResponse(
6024
6141
  new Error(denyMessage ?? `Tool "${toolName}" is denied.`),
6025
6142
  toolName
6026
6143
  );
6027
6144
  }
6028
- const forceAutoReviewForAllow = approvalMode === "auto" /* AUTO */ && (shouldForceAutoModeReviewForAllow(pmCtx, this.config.getCwd()) || shouldClassifyAllShellForAutoMode(toolName, this.config));
6145
+ let planShellAmbientWorkingDirectory;
6146
+ if (isPlanShellCall) {
6147
+ const directory = toolParams["directory"];
6148
+ planShellAmbientWorkingDirectory = typeof directory === "string" && directory.length > 0 ? void 0 : this.config.getTargetDir();
6149
+ invocation.params = {
6150
+ ...structuredClone(invocation.params),
6151
+ directory: typeof directory === "string" && directory.length > 0 ? directory : planShellAmbientWorkingDirectory
6152
+ };
6153
+ toolParams = invocation.params;
6154
+ }
6155
+ const planShellDecision = isPlanShellCall ? await evaluatePlanModeShellPolicy({
6156
+ config: this.config,
6157
+ toolName: policyToolName,
6158
+ requestArgs: originalPolicyRequestArgs,
6159
+ invocationParams: toolParams,
6160
+ permissionContext: pmCtx,
6161
+ ambientWorkingDirectory: planShellAmbientWorkingDirectory,
6162
+ signal: activeToolAbortSignal
6163
+ }) : { classification: "not-applicable" };
6164
+ if (planShellDecision.classification !== "not-applicable") {
6165
+ const initialPlanShellError = await validatePlanModeShellContext({
6166
+ config: this.config,
6167
+ decision: planShellDecision,
6168
+ requestArgs: args,
6169
+ invocationParams: invocation.params,
6170
+ signal: activeToolAbortSignal
6171
+ });
6172
+ if (initialPlanShellError) {
6173
+ return earlyErrorResponse(
6174
+ new Error(initialPlanShellError),
6175
+ toolName
6176
+ );
6177
+ }
6178
+ }
6179
+ if (planShellDecision.classification === "write") {
6180
+ return earlyErrorResponse(
6181
+ new Error(planShellDecision.writeBlockMessage),
6182
+ toolName
6183
+ );
6184
+ }
6185
+ const planShellRequiresConfirmation = planShellDecision.classification === "unknown";
6186
+ const forceAutoReviewForAllow = approvalMode === "auto" /* AUTO */ && (shouldForceAutoModeReviewForAllow(pmCtx, this.config.getCwd()) || shouldClassifyAllShellForAutoMode(policyToolName, this.config));
6029
6187
  const confirmationPermission = getEffectivePermissionForConfirmation(
6030
6188
  finalPermission,
6031
6189
  forceAutoReviewForAllow
6032
6190
  );
6033
6191
  if (finalPermission === "allow" && forceAutoReviewForAllow) {
6034
6192
  debugLogger6.info(
6035
- `Auto mode: L4 allow overridden by protected-write guard for ${toolName}`
6193
+ `Auto mode: L4 allow overridden by protected-write guard for ${policyToolName}`
6036
6194
  );
6037
6195
  }
6038
- let autoModeAllowed = finalPermission === "allow" && !forceAutoReviewForAllow;
6196
+ let autoModeAllowed = finalPermission === "allow" && !forceAutoReviewForAllow && !planShellRequiresConfirmation;
6039
6197
  if (autoModeAllowed && approvalMode === "auto" /* AUTO */) {
6040
6198
  this.config.setAutoModeDenialState(
6041
6199
  recordAllow(this.config.getAutoModeDenialState())
6042
6200
  );
6043
6201
  }
6044
6202
  let wasAutoModeDenialFallback = false;
6045
- if (!autoModeAllowed && !requiresUserInteraction && shouldRunAutoModeForCall(approvalMode, toolName)) {
6203
+ if (!autoModeAllowed && !requiresUserInteraction && shouldRunAutoModeForCall(approvalMode, policyToolName)) {
6046
6204
  const denialState = this.config.getAutoModeDenialState();
6047
6205
  const fallback = shouldFallback(denialState);
6048
6206
  const messages = this.config.getGeminiClient?.()?.getHistoryTail(MAX_TRANSCRIPT_MESSAGES, false) ?? [];
@@ -6064,7 +6222,7 @@ ${this.pendingWorktreeNotice}
6064
6222
  this.config,
6065
6223
  decision,
6066
6224
  outcome,
6067
- toolName,
6225
+ policyToolName,
6068
6226
  toolParams,
6069
6227
  callId,
6070
6228
  abortSignal
@@ -6075,7 +6233,7 @@ ${this.pendingWorktreeNotice}
6075
6233
  break;
6076
6234
  case "blocked":
6077
6235
  debugLogger6.warn(
6078
- `Auto mode blocked (${outcome.reason}): tool=${toolName}, ` + formatDenialStateLog(denialState)
6236
+ `Auto mode blocked (${outcome.reason}): tool=${policyToolName}, ` + formatDenialStateLog(denialState)
6079
6237
  );
6080
6238
  return earlyErrorResponse(
6081
6239
  new Error(outcome.errorMessage),
@@ -6116,14 +6274,45 @@ ${this.pendingWorktreeNotice}
6116
6274
  }
6117
6275
  }, "recordAutoModeFallbackResolution");
6118
6276
  if (!autoModeAllowed && needsConfirmation(
6119
- confirmationPermission,
6277
+ planShellRequiresConfirmation ? "ask" : confirmationPermission,
6120
6278
  approvalMode,
6121
- toolName,
6279
+ policyToolName,
6122
6280
  requiresUserInteraction
6123
6281
  )) {
6124
- confirmationDetails = await invocation.getConfirmationDetails(abortSignal);
6282
+ confirmationDetails = await invocation.getConfirmationDetails(
6283
+ activeToolAbortSignal
6284
+ );
6285
+ if (planShellDecision.classification !== "not-applicable") {
6286
+ const preDisplayPlanShellError = await validatePlanModeShellContext({
6287
+ config: this.config,
6288
+ decision: planShellDecision,
6289
+ requestArgs: args,
6290
+ invocationParams: invocation.params,
6291
+ signal: activeToolAbortSignal
6292
+ });
6293
+ if (preDisplayPlanShellError) {
6294
+ return earlyErrorResponse(
6295
+ new Error(preDisplayPlanShellError),
6296
+ toolName
6297
+ );
6298
+ }
6299
+ }
6300
+ try {
6301
+ confirmationDetails = decoratePlanModeShellConfirmation(
6302
+ planShellDecision,
6303
+ confirmationDetails
6304
+ );
6305
+ } catch {
6306
+ if (planShellDecision.classification === "unknown") {
6307
+ return earlyErrorResponse(
6308
+ new Error(planShellDecision.noApprovalMessage),
6309
+ toolName
6310
+ );
6311
+ }
6312
+ throw new Error("Unable to prepare shell confirmation.");
6313
+ }
6125
6314
  injectPermissionRulesIfMissing(confirmationDetails, pmCtx);
6126
- if (isPlanModeBlocked(
6315
+ if (planShellDecision.classification === "not-applicable" && isPlanModeBlocked(
6127
6316
  isPlanMode,
6128
6317
  isExitPlanModeTool,
6129
6318
  isAskUserQuestionTool,
@@ -6143,23 +6332,50 @@ ${this.pendingWorktreeNotice}
6143
6332
  if (hooksEnabled && messageBus) {
6144
6333
  const hookResult = await firePermissionRequestHook(
6145
6334
  messageBus,
6146
- toolName,
6335
+ policyToolName,
6147
6336
  args,
6148
- String(approvalMode)
6337
+ String(approvalMode),
6338
+ void 0,
6339
+ activeToolAbortSignal
6149
6340
  );
6150
6341
  if (hookResult.hasDecision && (!hookResult.shouldAllow || !requiresUserInteraction)) {
6151
6342
  hookHandled = true;
6152
6343
  if (hookResult.shouldAllow) {
6153
- if (hookResult.updatedInput) {
6154
- args = hookResult.updatedInput;
6155
- invocation.params = hookResult.updatedInput;
6344
+ if (planShellDecision.classification !== "not-applicable") {
6345
+ const approval = await validatePlanModeShellApproval({
6346
+ config: this.config,
6347
+ decision: planShellDecision,
6348
+ requestArgs: args,
6349
+ invocationParams: invocation.params,
6350
+ signal: activeToolAbortSignal,
6351
+ outcome: "proceed_once" /* ProceedOnce */,
6352
+ payload: hookResult.updatedInput ? { updatedInput: hookResult.updatedInput } : void 0
6353
+ });
6354
+ await confirmationDetails.onConfirm(
6355
+ approval.outcome,
6356
+ approval.payload
6357
+ );
6358
+ if (approval.outcome === "cancel" /* Cancel */) {
6359
+ return earlyErrorResponse(
6360
+ new Error(
6361
+ approval.payload?.cancelMessage ?? planShellDecision.noApprovalMessage
6362
+ ),
6363
+ toolName
6364
+ );
6365
+ }
6366
+ recordAutoModeFallbackResolution(approval.outcome);
6367
+ } else {
6368
+ if (hookResult.updatedInput) {
6369
+ args = hookResult.updatedInput;
6370
+ invocation.params = hookResult.updatedInput;
6371
+ }
6372
+ await confirmationDetails.onConfirm(
6373
+ "proceed_once" /* ProceedOnce */
6374
+ );
6375
+ recordAutoModeFallbackResolution(
6376
+ "proceed_once" /* ProceedOnce */
6377
+ );
6156
6378
  }
6157
- await confirmationDetails.onConfirm(
6158
- "proceed_once" /* ProceedOnce */
6159
- );
6160
- recordAutoModeFallbackResolution(
6161
- "proceed_once" /* ProceedOnce */
6162
- );
6163
6379
  } else {
6164
6380
  return earlyErrorResponse(
6165
6381
  new Error(
@@ -6172,11 +6388,26 @@ ${this.pendingWorktreeNotice}
6172
6388
  }
6173
6389
  if (!requiresUserInteraction && approvalMode === "auto-edit" /* AUTO_EDIT */ && (confirmationDetails.type === "edit" || confirmationDetails.type === "info")) {
6174
6390
  } else if (!hookHandled) {
6391
+ if (planShellDecision.classification !== "not-applicable") {
6392
+ const finalPreDisplayPlanShellError = await validatePlanModeShellContext({
6393
+ config: this.config,
6394
+ decision: planShellDecision,
6395
+ requestArgs: args,
6396
+ invocationParams: invocation.params,
6397
+ signal: activeToolAbortSignal
6398
+ });
6399
+ if (finalPreDisplayPlanShellError) {
6400
+ return earlyErrorResponse(
6401
+ new Error(finalPreDisplayPlanShellError),
6402
+ toolName
6403
+ );
6404
+ }
6405
+ }
6175
6406
  didRequestPermission = true;
6176
6407
  const content = buildPermissionRequestContent(confirmationDetails);
6177
6408
  const mappedKind = this.toolCallEmitter.mapToolKind(
6178
6409
  tool.kind,
6179
- toolName
6410
+ policyToolName
6180
6411
  );
6181
6412
  if (hooksEnabled && messageBus) {
6182
6413
  this.fireNotificationHookWithTerminalSequence(
@@ -6186,9 +6417,16 @@ ${this.pendingWorktreeNotice}
6186
6417
  "Permission needed"
6187
6418
  );
6188
6419
  }
6420
+ const permissionOptions = toPermissionOptions(
6421
+ confirmationDetails,
6422
+ pmForcedAsk
6423
+ );
6424
+ const offeredPermissionOptions = permissionOptions.map(
6425
+ (option) => ({ ...option })
6426
+ );
6189
6427
  const params = {
6190
6428
  sessionId: this.sessionId,
6191
- options: toPermissionOptions(confirmationDetails, pmForcedAsk),
6429
+ options: permissionOptions,
6192
6430
  toolCall: {
6193
6431
  toolCallId: callId,
6194
6432
  status: "pending",
@@ -6207,10 +6445,12 @@ ${this.pendingWorktreeNotice}
6207
6445
  }
6208
6446
  }
6209
6447
  };
6210
- const stopAfterPermissionCancel = /* @__PURE__ */ __name(() => {
6448
+ const stopAfterPermissionCancel = /* @__PURE__ */ __name((message) => {
6211
6449
  onStopAfterPermissionCancel?.();
6212
6450
  return earlyErrorResponse(
6213
- new Error(`Tool "${toolName}" was canceled by the user.`),
6451
+ new Error(
6452
+ message ?? `Tool "${toolName}" was canceled by the user.`
6453
+ ),
6214
6454
  toolName,
6215
6455
  { stopAfterPermissionCancel: true }
6216
6456
  );
@@ -6218,10 +6458,15 @@ ${this.pendingWorktreeNotice}
6218
6458
  let output;
6219
6459
  let outcome;
6220
6460
  try {
6221
- output = await this.client.requestPermission(
6222
- params
6461
+ output = await requestPermissionWithAbort(
6462
+ this.client,
6463
+ params,
6464
+ activeToolAbortSignal
6465
+ );
6466
+ outcome = resolvePermissionOutcome(
6467
+ output,
6468
+ offeredPermissionOptions
6223
6469
  );
6224
- outcome = output.outcome.outcome === "cancelled" ? "cancel" /* Cancel */ : external_exports.nativeEnum(ToolConfirmationOutcome).parse(output.outcome.optionId);
6225
6470
  } catch (error) {
6226
6471
  debugLogger6.error(
6227
6472
  `Permission request failed for tool ${toolName}:`,
@@ -6238,7 +6483,9 @@ ${this.pendingWorktreeNotice}
6238
6483
  );
6239
6484
  }
6240
6485
  onStopAfterPermissionCancel?.();
6241
- const permissionFailureMessage = isExitPlanModeTool ? "The host could not present plan-exit approval. Plan mode remains active; use the host mode selector or /plan exit to leave plan mode." : `Permission request failed for "${toolName}": ${this.#formatError(
6486
+ const permissionFailureMessage = isExitPlanModeTool ? "The host could not present plan-exit approval. Plan mode remains active; use the host mode selector or /plan exit to leave plan mode." : planShellDecision.classification === "unknown" ? `Plan mode could not complete approval for this shell command: ${this.#formatError(
6487
+ error
6488
+ )}. The command was not run; Plan mode remains active.` : `Permission request failed for "${toolName}": ${this.#formatError(
6242
6489
  error
6243
6490
  )}`;
6244
6491
  return earlyErrorResponse(
@@ -6247,11 +6494,28 @@ ${this.pendingWorktreeNotice}
6247
6494
  { stopAfterPermissionCancel: true }
6248
6495
  );
6249
6496
  }
6497
+ let confirmationPayload = {
6498
+ answers: output.answers
6499
+ };
6500
+ if (planShellDecision.classification !== "not-applicable") {
6501
+ const approval = await validatePlanModeShellApproval({
6502
+ config: this.config,
6503
+ decision: planShellDecision,
6504
+ requestArgs: args,
6505
+ invocationParams: invocation.params,
6506
+ signal: activeToolAbortSignal,
6507
+ outcome,
6508
+ payload: confirmationPayload
6509
+ });
6510
+ outcome = approval.outcome;
6511
+ confirmationPayload = approval.payload;
6512
+ }
6250
6513
  recordAutoModeFallbackResolution(outcome);
6251
6514
  try {
6252
- await confirmationDetails.onConfirm(outcome, {
6253
- answers: output.answers
6254
- });
6515
+ await confirmationDetails.onConfirm(
6516
+ outcome,
6517
+ confirmationPayload
6518
+ );
6255
6519
  } catch (error) {
6256
6520
  if (outcome !== "cancel" /* Cancel */) {
6257
6521
  throw error;
@@ -6268,7 +6532,7 @@ ${this.pendingWorktreeNotice}
6268
6532
  confirmationDetails,
6269
6533
  this.config.getOnPersistPermissionRule?.(),
6270
6534
  this.config.getPermissionManager?.(),
6271
- { answers: output.answers }
6535
+ confirmationPayload
6272
6536
  );
6273
6537
  }
6274
6538
  if (confirmationDetails.type === "edit" && outcome === "proceed_always" /* ProceedAlways */) {
@@ -6276,7 +6540,9 @@ ${this.pendingWorktreeNotice}
6276
6540
  }
6277
6541
  switch (outcome) {
6278
6542
  case "cancel" /* Cancel */:
6279
- return stopAfterPermissionCancel();
6543
+ return stopAfterPermissionCancel(
6544
+ confirmationPayload?.cancelMessage
6545
+ );
6280
6546
  case "proceed_once" /* ProceedOnce */:
6281
6547
  case "proceed_always" /* ProceedAlways */:
6282
6548
  case "proceed_always_project" /* ProceedAlwaysProject */:
@@ -6308,7 +6574,7 @@ ${this.pendingWorktreeNotice}
6308
6574
  if (hooksEnabledForTool && messageBusForTool) {
6309
6575
  const preHookResult = await firePreToolUseHook(
6310
6576
  messageBusForTool,
6311
- toolName,
6577
+ policyToolName,
6312
6578
  args,
6313
6579
  toolUseId,
6314
6580
  permissionMode,
@@ -6425,7 +6691,7 @@ ${this.pendingWorktreeNotice}
6425
6691
  };
6426
6692
  const postHookResult = await firePostToolUseHook(
6427
6693
  messageBusForTool,
6428
- toolName,
6694
+ policyToolName,
6429
6695
  args,
6430
6696
  toolResponse,
6431
6697
  toolUseId,
@@ -6456,7 +6722,7 @@ ${this.pendingWorktreeNotice}
6456
6722
  const failureHookResult = await firePostToolUseFailureHook(
6457
6723
  messageBusForTool,
6458
6724
  toolUseId,
6459
- toolName,
6725
+ policyToolName,
6460
6726
  args,
6461
6727
  toolResult.error?.message ?? "Tool execution was cancelled",
6462
6728
  isInterrupt,
@@ -6545,7 +6811,7 @@ ${this.pendingWorktreeNotice}
6545
6811
  const failureHookResult = await firePostToolUseFailureHook(
6546
6812
  messageBusForError,
6547
6813
  toolUseId,
6548
- toolName,
6814
+ policyToolName,
6549
6815
  args,
6550
6816
  error.message,
6551
6817
  isInterrupt,
@@ -9409,7 +9675,7 @@ var QwenAgent = class {
9409
9675
  markAcpStartup("initializeHandlerStart");
9410
9676
  this.clientCapabilities = args.clientCapabilities;
9411
9677
  const authMethods = buildAuthMethods();
9412
- const version = "0.19.12";
9678
+ const version = "0.20.0-nightly.20260721.cda0e0348";
9413
9679
  const response = {
9414
9680
  protocolVersion: PROTOCOL_VERSION,
9415
9681
  agentInfo: {
@@ -12845,6 +13111,21 @@ var QwenAgent = class {
12845
13111
  });
12846
13112
  }
12847
13113
  const canonicalPath = await fs2.realpath(targetPath);
13114
+ const allowedRoots = params["allowedRoots"];
13115
+ if (Array.isArray(allowedRoots) && allowedRoots.length > 0) {
13116
+ const contained = allowedRoots.some((root) => {
13117
+ if (typeof root !== "string") return false;
13118
+ const rel = path4.relative(root, canonicalPath);
13119
+ return !rel.startsWith("..") && !path4.isAbsolute(rel);
13120
+ });
13121
+ if (!contained) {
13122
+ throw new RequestError(
13123
+ -32004,
13124
+ `Path outside allowed roots: ${canonicalPath}`,
13125
+ { errorKind: "containment_violation", path: canonicalPath }
13126
+ );
13127
+ }
13128
+ }
12848
13129
  const previousCwd = config.getTargetDir();
12849
13130
  if (canonicalPath === previousCwd) {
12850
13131
  return { previousCwd, newCwd: canonicalPath, warnings: [] };