@qwen-code/qwen-code 0.20.1-preview.7215 → 0.20.1

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 (326) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +1 -1
  2. package/bundled/qc-helper/docs/features/auto-mode.md +19 -16
  3. package/bundled/qc-helper/docs/features/commands.md +54 -0
  4. package/bundled/qc-helper/docs/features/sub-agents.md +16 -7
  5. package/bundled/qc-helper/docs/integration-github-action.md +10 -10
  6. package/bundled/qc-helper/docs/qwen-serve.md +2 -1
  7. package/bundled/review/DESIGN.md +2 -2
  8. package/bundled/review/SKILL.md +4 -4
  9. package/chunks/{MaxSizedBox-EH6G5AEH.js → MaxSizedBox-4WZYPSRU.js} +40 -36
  10. package/chunks/{StandaloneSessionPicker-264A3TEA.js → StandaloneSessionPicker-PE4JAIFA.js} +58 -54
  11. package/chunks/{acpAgent-6RBIJFDI.js → acpAgent-BVIKGJ2C.js} +1503 -520
  12. package/chunks/{agent-QURXGAA3.js → agent-DHLFAOUV.js} +36 -32
  13. package/chunks/{agent-headless-CRGX4ICQ.js → agent-headless-ZP5WTNXZ.js} +36 -32
  14. package/chunks/{anthropicContentGenerator-BWBAZGTW.js → anthropicContentGenerator-NMSS7IMV.js} +11 -11
  15. package/chunks/{artifact-tool-IUJ7QWCX.js → artifact-tool-56T5IMBP.js} +3 -3
  16. package/chunks/{askUserQuestion-IUMUUTDQ.js → askUserQuestion-E25OBIC2.js} +3 -3
  17. package/chunks/{bridge-MNFVKPMI.js → bridge-XAK7JKMD.js} +41 -37
  18. package/chunks/{build-SSCNEHZZ.js → build-GHIZ4MSZ.js} +1 -1
  19. package/chunks/{ca-2SL2BXTK.js → ca-N6VVUFVB.js} +611 -201
  20. package/chunks/{channel-worker-group-53CMOPFT.js → channel-worker-group-LFBT7K64.js} +5 -5
  21. package/chunks/{channel-worker-manager-UTXILKC2.js → channel-worker-manager-3RUPERG2.js} +5 -5
  22. package/chunks/{channel-worker-supervisor-ZGO2W2MD.js → channel-worker-supervisor-A3KVATD3.js} +4 -4
  23. package/chunks/{chunk-IUSNI6IX.js → chunk-27CLX4FV.js} +1 -1
  24. package/chunks/{chunk-2HOVDT7W.js → chunk-2LI23QA6.js} +1 -1
  25. package/chunks/chunk-2RFKHEXL.js +74 -0
  26. package/chunks/{chunk-LZYWWWCZ.js → chunk-3KQSDUK3.js} +3 -3
  27. package/chunks/{chunk-NOWTNYC7.js → chunk-3LH5Q2AR.js} +8 -8
  28. package/chunks/{chunk-IB35C3IL.js → chunk-3SXF4GMQ.js} +1 -1
  29. package/chunks/chunk-43T5WDQ7.js +127 -0
  30. package/chunks/{chunk-KXEGCGUG.js → chunk-4BRH6FP5.js} +31 -6
  31. package/chunks/{chunk-TTSKHF43.js → chunk-4DSBFQMI.js} +2 -2
  32. package/chunks/{chunk-JD3MKVKL.js → chunk-4K56OJFJ.js} +1 -1
  33. package/chunks/{chunk-KTUQMDEP.js → chunk-4K7VDKAD.js} +1 -1
  34. package/chunks/{chunk-QKYTTBYW.js → chunk-4LVZNIDO.js} +1 -1
  35. package/chunks/{chunk-OF2BBLYQ.js → chunk-52T5UHAZ.js} +2 -2
  36. package/chunks/{chunk-ZEOZL37W.js → chunk-57FIIFJN.js} +1 -1
  37. package/chunks/{chunk-WAX3ITOA.js → chunk-5EA5NVXS.js} +1 -1
  38. package/chunks/chunk-5G2SK2OO.js +20600 -0
  39. package/chunks/{chunk-6EFTQYW7.js → chunk-5I5BM454.js} +1 -1
  40. package/chunks/{chunk-GMGDLUC7.js → chunk-6IL7KRLE.js} +1 -1
  41. package/chunks/{chunk-26LLB6FM.js → chunk-6NHK6HS7.js} +2 -2
  42. package/chunks/{chunk-FVS747N7.js → chunk-6PRNSLMB.js} +11 -6
  43. package/chunks/chunk-6PVPNMXU.js +29 -0
  44. package/chunks/{chunk-BDBMYST4.js → chunk-6X4GWOPW.js} +1 -1
  45. package/chunks/{chunk-4ODB7WIB.js → chunk-6ZBPS62S.js} +1 -1
  46. package/chunks/{chunk-E5GIFWE3.js → chunk-766HLFAG.js} +54 -33
  47. package/chunks/{chunk-SDXIH6OA.js → chunk-76OFFG6L.js} +137 -5
  48. package/chunks/{chunk-ANHT55MR.js → chunk-7LH6CHKG.js} +1 -1
  49. package/chunks/{chunk-Y4CRUWFZ.js → chunk-7NDXG4MB.js} +60 -35
  50. package/chunks/{chunk-KPZNOZPC.js → chunk-7SWFAKVH.js} +22 -22
  51. package/chunks/{chunk-AYCDXHZB.js → chunk-7Z6JQEL6.js} +1 -1
  52. package/chunks/{chunk-5NWV4NFB.js → chunk-AZD6KAV7.js} +3 -3
  53. package/chunks/{chunk-7YBZGNEC.js → chunk-BKZEHVPV.js} +176 -168
  54. package/chunks/{chunk-WXAXH7IJ.js → chunk-BWQRDISK.js} +1 -1
  55. package/chunks/{chunk-X4CGDBKA.js → chunk-BZAEENUV.js} +3 -3
  56. package/chunks/{chunk-BF32GYSY.js → chunk-CHXKGIMK.js} +1 -1
  57. package/chunks/{chunk-4SLLEAQP.js → chunk-D53NR4GO.js} +562 -301
  58. package/chunks/{chunk-FLTN6NRU.js → chunk-D6ZOVZLF.js} +5 -1
  59. package/chunks/{chunk-NBMIC7DR.js → chunk-D7WXIW7H.js} +4 -4
  60. package/chunks/{chunk-MKLKHZAK.js → chunk-DPRMI6NU.js} +1 -1
  61. package/chunks/{chunk-AR27OPIU.js → chunk-DRIXALGM.js} +2 -2
  62. package/chunks/{chunk-5SCI6E3E.js → chunk-E4IMU4Y5.js} +1 -1
  63. package/chunks/{chunk-Z5Q65RVH.js → chunk-EC2ET5ZZ.js} +1 -1
  64. package/chunks/{chunk-B453NMZJ.js → chunk-EFIOE2EH.js} +3 -3
  65. package/chunks/{chunk-OKWRU4NO.js → chunk-EWXXMRMP.js} +3 -3
  66. package/chunks/{chunk-NEEB7UEN.js → chunk-FFFM6NJV.js} +1 -2
  67. package/chunks/{chunk-JVTCARQ6.js → chunk-G6LRTI62.js} +4 -4
  68. package/chunks/{chunk-6OH6A5EX.js → chunk-GEB2CGUV.js} +20262 -17752
  69. package/chunks/{chunk-OONJNQ42.js → chunk-GPSKDNEE.js} +3 -3
  70. package/chunks/{chunk-FNGK2Z5B.js → chunk-H4AR2JQF.js} +3 -3
  71. package/chunks/chunk-HTR4WV6U.js +327 -0
  72. package/chunks/chunk-IS2SBY6T.js +2256 -0
  73. package/chunks/{chunk-G45X5TRN.js → chunk-JCW2R7WC.js} +1 -72
  74. package/chunks/{chunk-6GUTHAN7.js → chunk-JHFVJQRO.js} +1 -1
  75. package/chunks/{chunk-IE4JSQ5L.js → chunk-JIBBZH37.js} +27 -23
  76. package/chunks/{chunk-UJEZQ562.js → chunk-JJEFX6U5.js} +3 -3
  77. package/chunks/{chunk-QOK6RMIP.js → chunk-JKFHJK5U.js} +4 -4
  78. package/chunks/{chunk-GA7VRJVN.js → chunk-JO7FGOSY.js} +5 -5
  79. package/chunks/{chunk-WOT64EP2.js → chunk-JTUAAVUT.js} +2 -2
  80. package/chunks/{chunk-MAQQGNQ5.js → chunk-JYS55H6Z.js} +66 -7
  81. package/chunks/{chunk-DA7OOKVN.js → chunk-KDPIV6WC.js} +29 -2
  82. package/chunks/{chunk-EIAK6Q2B.js → chunk-KHOVYUHX.js} +2 -2
  83. package/chunks/{chunk-OLMETXLX.js → chunk-KQQ757OQ.js} +2 -2
  84. package/chunks/{chunk-Z6UEAQTP.js → chunk-KSZZBDVD.js} +165 -48
  85. package/chunks/chunk-KWK7UE6L.js +6194 -0
  86. package/chunks/{chunk-OOCI5VVU.js → chunk-LIZRAKPB.js} +1 -1
  87. package/chunks/{chunk-VFAE4AGH.js → chunk-LPMBFOWH.js} +73 -68
  88. package/chunks/{chunk-IKP5DXZY.js → chunk-LYEKAAEH.js} +5 -5
  89. package/chunks/chunk-M7WBGLYP.js +151 -0
  90. package/chunks/{chunk-P2YAOGJD.js → chunk-MTSYH4MB.js} +3 -3
  91. package/chunks/{chunk-WKRXIHD6.js → chunk-N5ARKAVE.js} +8 -8
  92. package/chunks/chunk-NABLFI57.js +82 -0
  93. package/chunks/{chunk-CVDW42JT.js → chunk-NNFK277W.js} +1 -1
  94. package/chunks/{chunk-467G3SV5.js → chunk-NPQDJGKU.js} +1 -1
  95. package/chunks/chunk-OQ5SYCPE.js +10017 -0
  96. package/chunks/{chunk-C27BYUX6.js → chunk-OQB4EXO4.js} +14 -11
  97. package/chunks/{chunk-RELYEO3R.js → chunk-OUDZVU7H.js} +242 -1607
  98. package/chunks/{chunk-3EUZWNWA.js → chunk-PBED7USE.js} +1 -1
  99. package/chunks/{chunk-WBTZGWQ6.js → chunk-PIHKWN7M.js} +1 -1
  100. package/chunks/{chunk-XNP57UDV.js → chunk-PPIHLGNE.js} +2 -2
  101. package/chunks/{chunk-Q4RBU7WX.js → chunk-PSVSP2OS.js} +6 -6
  102. package/chunks/{chunk-BRXIO5WY.js → chunk-Q2V2ADXF.js} +7 -7
  103. package/chunks/{chunk-JDI67JFB.js → chunk-Q2YKNMLS.js} +3 -3
  104. package/chunks/{chunk-BAIEQKR5.js → chunk-Q3GGJDYN.js} +5 -5
  105. package/chunks/{chunk-PBATSWUQ.js → chunk-QBUDF33N.js} +1 -1
  106. package/chunks/{chunk-OMH3276Y.js → chunk-QD6BRERJ.js} +7 -7
  107. package/chunks/{chunk-Y2ENGUD6.js → chunk-QKTHJXCS.js} +1 -1
  108. package/chunks/{chunk-BVLROR2T.js → chunk-QLJUC7TG.js} +1 -1
  109. package/chunks/{chunk-UEY4AYUL.js → chunk-QNLNLENL.js} +2 -2
  110. package/chunks/{chunk-7KDI2IB2.js → chunk-QSJ6JIF5.js} +4 -4
  111. package/chunks/{chunk-Q3ZBFXK4.js → chunk-QUHJRRUA.js} +126 -30
  112. package/chunks/{chunk-N6YTEVLV.js → chunk-R3BCL5XW.js} +10 -4
  113. package/chunks/{chunk-EVSTCA7S.js → chunk-R7MPKABX.js} +307 -86
  114. package/chunks/{chunk-RFIAR4YL.js → chunk-RV4C2ZFG.js} +1 -1
  115. package/chunks/{chunk-NIJEXGV6.js → chunk-RVLZCXEE.js} +79 -10
  116. package/chunks/{chunk-T7DDD7CZ.js → chunk-RYSMKY43.js} +4 -4
  117. package/chunks/{chunk-MC2DOZS7.js → chunk-S3YQCNJE.js} +3 -3
  118. package/chunks/{chunk-4WUAQ2DO.js → chunk-SP32MK6J.js} +2 -2
  119. package/chunks/{chunk-JNWZQ27S.js → chunk-SP5WRGVG.js} +3 -3
  120. package/chunks/{chunk-FSL5W5TI.js → chunk-T2L47JJK.js} +3 -3
  121. package/chunks/{chunk-TB6UDU4T.js → chunk-THJNPLI4.js} +16 -16
  122. package/chunks/{chunk-TCKTNY66.js → chunk-TPR35HHZ.js} +6 -6
  123. package/chunks/{chunk-UQES76OO.js → chunk-TXRKCFWS.js} +6 -6
  124. package/chunks/chunk-U7ZFW55U.js +2098 -0
  125. package/chunks/{chunk-W7H223ZZ.js → chunk-UGYMA4EI.js} +1 -1
  126. package/chunks/{chunk-X6YQWCIJ.js → chunk-UH3WSE5L.js} +13 -1
  127. package/chunks/{chunk-R3VWUU2E.js → chunk-VYPFXUCB.js} +1 -1
  128. package/chunks/{chunk-2DXOIVUI.js → chunk-WCFTQD7H.js} +11 -11
  129. package/chunks/chunk-WHGVTP7Q.js +1049 -0
  130. package/chunks/{chunk-PWVTCGBP.js → chunk-WML6JOGQ.js} +31 -19
  131. package/chunks/{chunk-D2VIDMVM.js → chunk-X6N25LXS.js} +2 -2
  132. package/chunks/{chunk-Z5R4JMOL.js → chunk-X7XWGRDT.js} +4 -4
  133. package/chunks/chunk-XHATNRQA.js +1500 -0
  134. package/chunks/{chunk-V25Z5UUB.js → chunk-Y2DAH52F.js} +7 -6
  135. package/chunks/{chunk-S35ZDXOS.js → chunk-YM3SZTH4.js} +2 -1
  136. package/chunks/{chunk-GKY2OJ7R.js → chunk-ZHERRXZJ.js} +1 -1
  137. package/chunks/{computer-use-R7KA6UJ6.js → computer-use-MV4K6WJM.js} +41 -37
  138. package/chunks/{config-utils-6FXFJUYB.js → config-utils-WYUQ7II4.js} +3 -3
  139. package/chunks/{contextCommand-KAQQPHZ4.js → contextCommand-TQD36VNX.js} +38 -34
  140. package/chunks/{create-sub-session-X5RVIHCK.js → create-sub-session-AZ77LBL3.js} +3 -3
  141. package/chunks/{create-sub-session-TDPDBU4K.js → create-sub-session-JOW4BKMC.js} +36 -32
  142. package/chunks/{cron-create-AC5FFLN7.js → cron-create-KTWJM7QT.js} +5 -5
  143. package/chunks/{cron-delete-JEB3FAHA.js → cron-delete-2P3I5ULL.js} +5 -5
  144. package/chunks/{cron-list-NBYPCNIB.js → cron-list-PXDPGEDQ.js} +5 -5
  145. package/chunks/{daemon-RG2MAI6T.js → daemon-KLPTQIE4.js} +138 -81
  146. package/chunks/daemon-status-provider-TII4SMCZ.js +81 -0
  147. package/chunks/{de-I7ZIYXZC.js → de-4IBXM7CN.js} +5 -1
  148. package/chunks/{dist-2BHAYBKP.js → dist-HMU6CYS4.js} +2 -2
  149. package/chunks/{dist-AU7NQQRP.js → dist-OAV7LJGJ.js} +1 -1
  150. package/chunks/{dist-FUTEXY6A.js → dist-OMW6WDEO.js} +1 -1
  151. package/chunks/{dist-2MIU4UUH.js → dist-PJLG2XYX.js} +1 -1
  152. package/chunks/{dist-53PZYC5B.js → dist-UIFWIFRO.js} +2 -2
  153. package/chunks/{dist-WGTQO7F2.js → dist-XRYV6TJP.js} +65 -25
  154. package/chunks/{earlyInputCapture-WC7RI5HV.js → earlyInputCapture-2V57RG6H.js} +37 -33
  155. package/chunks/{edit-6MHKCJCM.js → edit-TTUH7PWR.js} +43 -41
  156. package/chunks/{en-XE34GKAA.js → en-USMCCJAJ.js} +5 -1
  157. package/chunks/{enter-worktree-O7VJ2E7A.js → enter-worktree-D4IVCXYB.js} +41 -37
  158. package/chunks/{enterPlanMode-5XYAALIO.js → enterPlanMode-WRUJTVYN.js} +47 -38
  159. package/chunks/{environment-LSKFNLBU.js → environment-SEPKXB2C.js} +38 -34
  160. package/chunks/{errors-ZFVCY6HG.js → errors-YSVGBLBU.js} +38 -34
  161. package/chunks/{exit-worktree-MYIK66T7.js → exit-worktree-MZ4JSSP6.js} +41 -37
  162. package/chunks/{exitPlanMode-7MBNU76O.js → exitPlanMode-HAZLSSOJ.js} +41 -37
  163. package/chunks/{fast-path-RNLIB64C.js → fast-path-EVBVIE2U.js} +4 -3
  164. package/chunks/{fast-path-settings-DAOVFADC.js → fast-path-settings-XB3CPUJT.js} +2 -2
  165. package/chunks/{fr-X7KDVZIY.js → fr-WVHEBDDB.js} +5 -1
  166. package/chunks/{gemini-WK5ISEAQ.js → gemini-APQ76464.js} +100 -95
  167. package/chunks/{geminiContentGenerator-NUJQBZBW.js → geminiContentGenerator-LB4MA2LI.js} +5 -5
  168. package/chunks/{getMachineId-bsd-EXV7SWPA.js → getMachineId-bsd-QFVLPUPT.js} +1 -1
  169. package/chunks/{getMachineId-darwin-IUOMFXU3.js → getMachineId-darwin-DGMQQE2E.js} +1 -1
  170. package/chunks/{getMachineId-linux-K7XJYFHL.js → getMachineId-linux-R4Z6CSWC.js} +1 -1
  171. package/chunks/{getMachineId-unsupported-EA5FDRJ6.js → getMachineId-unsupported-Z3SBVBUV.js} +1 -1
  172. package/chunks/{getMachineId-win-KBA6RAI5.js → getMachineId-win-SCK5UFDT.js} +1 -1
  173. package/chunks/{glob-7P6RYY4L.js → glob-LABYMYKG.js} +43 -39
  174. package/chunks/{grep-V3QHNP2J.js → grep-HKIKJCAS.js} +43 -39
  175. package/chunks/{handleAutoUpdate-AAQ6PL3E.js → handleAutoUpdate-RWAAL2UM.js} +40 -36
  176. package/chunks/{i18n-B7IO7WQT.js → i18n-ZUVDAJIJ.js} +37 -33
  177. package/chunks/{initializer-E5TIC3CW.js → initializer-7YUHIC36.js} +43 -39
  178. package/chunks/{installationInfo-XLPNAISK.js → installationInfo-DVEOMWDE.js} +39 -33
  179. package/chunks/{ja-2ICT3KXF.js → ja-KY4ROZTE.js} +5 -1
  180. package/chunks/{keychain-token-storage-DWRJMNH3.js → keychain-token-storage-6ACJDYIB.js} +3 -3
  181. package/chunks/list-WHCZSIR2.js +82 -0
  182. package/chunks/{loadedSettingsAdapter-X5BSC6CE.js → loadedSettingsAdapter-YCWN6AK3.js} +42 -38
  183. package/chunks/{loop-wakeup-HMHCT5GU.js → loop-wakeup-RNMRVA66.js} +6 -6
  184. package/chunks/{ls-IW5HYDG4.js → ls-J2ZI5XYK.js} +5 -5
  185. package/chunks/{lsp-4RL52YIZ.js → lsp-UMS3NUB5.js} +3 -3
  186. package/chunks/managed-npm-update-PG3463CJ.js +333 -0
  187. package/chunks/{mcp-4C4HWXAR.js → mcp-VLHDCKAN.js} +42 -38
  188. package/chunks/{monitor-3CJDNZB2.js → monitor-GG4F4YM6.js} +41 -37
  189. package/chunks/nonInteractiveCli-UYXYV4YX.js +133 -0
  190. package/chunks/{notebook-edit-MX366HCT.js → notebook-edit-US4VLN6Q.js} +44 -42
  191. package/chunks/{openaiContentGenerator-KRPNNJGZ.js → openaiContentGenerator-CVEDTMDB.js} +20 -18
  192. package/chunks/{pidfile-K7T2JLUJ.js → pidfile-QQ45OIOY.js} +37 -33
  193. package/chunks/{processUtils-YXL3VIBR.js → processUtils-3WMHLQE5.js} +2 -2
  194. package/chunks/{pt-JJ4XPIBP.js → pt-OK455PLH.js} +5 -1
  195. package/chunks/{qwenContentGenerator-GJVXFZ3U.js → qwenContentGenerator-Y2GRNYZQ.js} +42 -38
  196. package/chunks/{qwenOAuth2-UZTIBQLY.js → qwenOAuth2-J2X6E5VO.js} +18 -16
  197. package/chunks/{read-file-S5XQSYOW.js → read-file-C7Z266CU.js} +13 -11
  198. package/chunks/{read-mcp-resource-OIBCNIX7.js → read-mcp-resource-F6HYMDUY.js} +3 -3
  199. package/chunks/{record-artifact-HDMK4LHG.js → record-artifact-7GCFLDD7.js} +3 -3
  200. package/chunks/{resumeHistoryUtils-IKR6XD2S.js → resumeHistoryUtils-KBQWX77U.js} +43 -39
  201. package/chunks/{ripGrep-H65GRSQX.js → ripGrep-RW26MTQ3.js} +36 -32
  202. package/chunks/{ru-STR4KTW7.js → ru-7SPDGMGD.js} +5 -1
  203. package/chunks/{run-qwen-serve-7SKAQOAA.js → run-qwen-serve-MXFMOMEL.js} +104 -82
  204. package/chunks/{runtime-I2STBGPR.js → runtime-APNO3V6D.js} +48 -42
  205. package/chunks/{scheduler-6F7HETNO.js → scheduler-L6FYCGVO.js} +36 -32
  206. package/chunks/sdk-exporters-grpc-ETLH47EP.js +23214 -0
  207. package/chunks/sdk-exporters-http-IDGLRBGP.js +563 -0
  208. package/chunks/sdk-impl-5ESZBGJQ.js +9186 -0
  209. package/chunks/{send-message-WXVVK4DB.js → send-message-PYIJ2PZL.js} +6 -4
  210. package/chunks/{serve-4ATEWSEA.js → serve-6QBXDVWT.js} +42 -38
  211. package/chunks/{server-YPUPFV2O.js → server-5TJJEMVQ.js} +1006 -305
  212. package/chunks/{session-AZFIERIY.js → session-BWEUHKQB.js} +92 -176
  213. package/chunks/{settings-EFQHLTM3.js → settings-O7IUQNRR.js} +45 -41
  214. package/chunks/{shell-FWXWBJ4Q.js → shell-R5L4NQYY.js} +36 -32
  215. package/chunks/{skill-A634MNCD.js → skill-ITEOSNW6.js} +24 -20
  216. package/chunks/{spawnChannel-KKBGGR47.js → spawnChannel-E7NTWSGW.js} +38 -34
  217. package/chunks/{src-BVROLD6N.js → src-FFXGUTNL.js} +303 -237
  218. package/chunks/{standalone-update-ERLA3BDC.js → standalone-update-JCJOXW4P.js} +38 -34
  219. package/chunks/{startInteractiveUI-3VZ23WAY.js → startInteractiveUI-IJSBLZFO.js} +1057 -864
  220. package/chunks/{syntheticOutput-HCUFXSIA.js → syntheticOutput-H7RTI5KL.js} +4 -4
  221. package/chunks/{task-create-RIY5JTFC.js → task-create-7474AJJD.js} +10 -8
  222. package/chunks/{task-list-XBUCV3CO.js → task-list-633HGOIB.js} +6 -6
  223. package/chunks/{task-stop-QDFCCYR5.js → task-stop-MNUGHPIA.js} +3 -3
  224. package/chunks/{task-update-7PXKJQOI.js → task-update-66GQB5LI.js} +10 -8
  225. package/chunks/{team-create-ZZO7QFQ7.js → team-create-OVSZTJZO.js} +44 -40
  226. package/chunks/{team-delete-TNSSE2S5.js → team-delete-BB3CG3QF.js} +6 -6
  227. package/chunks/{team-plan-approval-3BZBJ46K.js → team-plan-approval-SLEVDLT5.js} +41 -37
  228. package/chunks/{theme-manager-FSFWNXFJ.js → theme-manager-V6ZQISHM.js} +37 -33
  229. package/chunks/{todoWrite-OMAIGB6V.js → todoWrite-KRAUN54W.js} +5 -5
  230. package/chunks/{tool-search-VYXAAIDW.js → tool-search-KYIF6C6E.js} +21 -17
  231. package/chunks/{total-session-admission-PSMLQICS.js → total-session-admission-EU77XTL7.js} +42 -38
  232. package/chunks/{trustedFolders-QA3RK2NV.js → trustedFolders-DDEF3ADH.js} +37 -33
  233. package/chunks/{update-relaunch-LNLZFX3J.js → update-relaunch-XEZTDP6K.js} +17 -17
  234. package/chunks/updateCheck-KZ5LZ545.js +89 -0
  235. package/chunks/{useAutoAcceptIndicator-DIWN27LT.js → useAutoAcceptIndicator-47EZERGQ.js} +47 -43
  236. package/chunks/{validateNonInterActiveAuth-LOEOFCAF.js → validateNonInterActiveAuth-J2DM4LWZ.js} +79 -75
  237. package/chunks/{version-HBF2VBLE.js → version-PN7WYXHP.js} +1 -1
  238. package/chunks/{web-fetch-BWGSD2BD.js → web-fetch-WRI5QRFR.js} +100 -42
  239. package/chunks/{web-search-OOHTCVR3.js → web-search-2HCXNAVX.js} +111 -60
  240. package/chunks/{workflow-LJAJBOR4.js → workflow-U5XBPGQZ.js} +48 -43
  241. package/chunks/workspace-providers-status-2T54GIJZ.js +79 -0
  242. package/chunks/{workspace-registration-store-4EHGQW4Y.js → workspace-registration-store-F3V4KBIW.js} +8 -2
  243. package/chunks/{workspace-registry-BKD7VC4Y.js → workspace-registry-U6QVZ5BU.js} +42 -38
  244. package/chunks/{workspace-service-75RHX6KR.js → workspace-service-734D36QD.js} +49 -45
  245. package/chunks/{workspace-skills-status-WBZBZI6A.js → workspace-skills-status-5ABUKOAQ.js} +43 -39
  246. package/chunks/write-file-CIH4I4CS.js +66 -0
  247. package/chunks/{zh-TW-4RR3YHNN.js → zh-TW-BM47YBFH.js} +5 -1
  248. package/chunks/{zh-6ANG2HTL.js → zh-WY5DWYZD.js} +5 -1
  249. package/cli-entry.js +164 -12
  250. package/cli.js +18 -11
  251. package/locales/ca.js +772 -203
  252. package/locales/de.js +8 -2
  253. package/locales/en.js +8 -2
  254. package/locales/fr.js +8 -2
  255. package/locales/ja.js +8 -2
  256. package/locales/pt.js +8 -2
  257. package/locales/ru.js +8 -2
  258. package/locales/zh-TW.js +8 -2
  259. package/locales/zh.js +8 -2
  260. package/package.json +3 -3
  261. package/web-shell/assets/{arc-Buk1besA.js → arc-ByltRugA.js} +1 -1
  262. package/web-shell/assets/{architectureDiagram-3BPJPVTR-B1aUKYDC.js → architectureDiagram-3BPJPVTR-CCRTto5d.js} +1 -1
  263. package/web-shell/assets/{blockDiagram-GPEHLZMM-CRTdg3Zx.js → blockDiagram-GPEHLZMM-Jfy36u1L.js} +1 -1
  264. package/web-shell/assets/{c4Diagram-AAUBKEIU-DFdRMp5g.js → c4Diagram-AAUBKEIU-4d5FfEZ0.js} +1 -1
  265. package/web-shell/assets/channel-4N2UIFcG.js +1 -0
  266. package/web-shell/assets/{chunk-2J33WTMH-4rYQdkEI.js → chunk-2J33WTMH-BPwxCEro.js} +1 -1
  267. package/web-shell/assets/{chunk-4BX2VUAB-Coi-pQJy.js → chunk-4BX2VUAB-jY7ZmJWY.js} +1 -1
  268. package/web-shell/assets/{chunk-55IACEB6-BtBjz02t.js → chunk-55IACEB6-C98HgCsS.js} +1 -1
  269. package/web-shell/assets/{chunk-727SXJPM-CGYOWorl.js → chunk-727SXJPM-cDu-ge-q.js} +1 -1
  270. package/web-shell/assets/{chunk-AQP2D5EJ-CH5AKhqx.js → chunk-AQP2D5EJ-BKdJwxXK.js} +1 -1
  271. package/web-shell/assets/{chunk-FMBD7UC4-Cd50-w85.js → chunk-FMBD7UC4-DnuxqwMu.js} +1 -1
  272. package/web-shell/assets/{chunk-ND2GUHAM-C2wF3KCK.js → chunk-ND2GUHAM-C4fZNPv0.js} +1 -1
  273. package/web-shell/assets/{chunk-QZHKN3VN-pCeRTaWi.js → chunk-QZHKN3VN-Cf4XWOmz.js} +1 -1
  274. package/web-shell/assets/classDiagram-4FO5ZUOK-Q4dYOtsh.js +1 -0
  275. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Q4dYOtsh.js +1 -0
  276. package/web-shell/assets/{cose-bilkent-S5V4N54A-B-_fAB6D.js → cose-bilkent-S5V4N54A-C82mFiqj.js} +1 -1
  277. package/web-shell/assets/{dagre-BM42HDAG-ChSPNHpL.js → dagre-BM42HDAG-Df8KACER.js} +1 -1
  278. package/web-shell/assets/{diagram-2AECGRRQ-BX7cFOF3.js → diagram-2AECGRRQ-EzNs7s_2.js} +1 -1
  279. package/web-shell/assets/{diagram-5GNKFQAL-BQUTW92n.js → diagram-5GNKFQAL-BRLNvreg.js} +1 -1
  280. package/web-shell/assets/{diagram-KO2AKTUF-BkYPh3e4.js → diagram-KO2AKTUF-2HLYHRjC.js} +1 -1
  281. package/web-shell/assets/{diagram-LMA3HP47-Cl6jsNyx.js → diagram-LMA3HP47-DeH0NzSp.js} +1 -1
  282. package/web-shell/assets/{diagram-OG6HWLK6-DRWoHz8n.js → diagram-OG6HWLK6-k5Gn47-G.js} +1 -1
  283. package/web-shell/assets/{erDiagram-TEJ5UH35-CGvFcZco.js → erDiagram-TEJ5UH35-gPHFo79f.js} +1 -1
  284. package/web-shell/assets/{flowDiagram-I6XJVG4X-vms6oVdv.js → flowDiagram-I6XJVG4X-DYBOiTRW.js} +1 -1
  285. package/web-shell/assets/{ganttDiagram-6RSMTGT7-ukT_sfmi.js → ganttDiagram-6RSMTGT7-cxjAuic9.js} +1 -1
  286. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Bn2ZE2Ut.js → gitGraphDiagram-PVQCEYII-3nPqpmCP.js} +1 -1
  287. package/web-shell/assets/index-B7jzUZ_s.css +5 -0
  288. package/web-shell/assets/{index-wFXp7W68.js → index-Cl8d-1bK.js} +1 -1
  289. package/web-shell/assets/index-gE8OWwj_.js +1197 -0
  290. package/web-shell/assets/{infoDiagram-5YYISTIA-DHJdSi7x.js → infoDiagram-5YYISTIA-Dph21pR5.js} +1 -1
  291. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DOvd2Wph.js → ishikawaDiagram-YF4QCWOH-Cjg1hSaG.js} +1 -1
  292. package/web-shell/assets/{journeyDiagram-JHISSGLW-CH_urMCT.js → journeyDiagram-JHISSGLW-CR-IzvnU.js} +1 -1
  293. package/web-shell/assets/{kanban-definition-UN3LZRKU-FKiBdgbH.js → kanban-definition-UN3LZRKU-BYmuybuC.js} +1 -1
  294. package/web-shell/assets/{linear-0ZVQFVKf.js → linear-CngEEoy8.js} +1 -1
  295. package/web-shell/assets/{mermaid.core-DJ05ZZIK.js → mermaid.core-G6fbZRPf.js} +5 -5
  296. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BPuUhkUm.js → mindmap-definition-RKZ34NQL-BtnqnUwJ.js} +1 -1
  297. package/web-shell/assets/{pieDiagram-4H26LBE5-yLFKcXyG.js → pieDiagram-4H26LBE5-XTq6UHIA.js} +1 -1
  298. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-irWqc1pE.js → quadrantDiagram-W4KKPZXB-D1J5PrsS.js} +1 -1
  299. package/web-shell/assets/{requirementDiagram-4Y6WPE33-B_4uMoIV.js → requirementDiagram-4Y6WPE33-CLcBUy3t.js} +1 -1
  300. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-ciA4GPwk.js → sankeyDiagram-5OEKKPKP-iwKV02_6.js} +1 -1
  301. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CRdZvy0U.js → sequenceDiagram-3UESZ5HK-7NFYQcEX.js} +1 -1
  302. package/web-shell/assets/{stateDiagram-AJRCARHV-DaYIkCCn.js → stateDiagram-AJRCARHV-Bvm4Wih6.js} +1 -1
  303. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-xXU_zO2Z.js +1 -0
  304. package/web-shell/assets/{timeline-definition-PNZ67QCA-oBUKv6iH.js → timeline-definition-PNZ67QCA-B4FZFE9O.js} +1 -1
  305. package/web-shell/assets/{vennDiagram-CIIHVFJN-CGW9Sdmb.js → vennDiagram-CIIHVFJN-CvMBpmtL.js} +1 -1
  306. package/web-shell/assets/{wardley-L42UT6IY-CvwKJOCm.js → wardley-L42UT6IY-E3ag2327.js} +1 -1
  307. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-Ipc260sN.js → wardleyDiagram-YWT4CUSO-BEXWlgxC.js} +1 -1
  308. package/web-shell/assets/{xychartDiagram-2RQKCTM6-D6-CM7pK.js → xychartDiagram-2RQKCTM6-CICK05gI.js} +1 -1
  309. package/web-shell/index.html +2 -2
  310. package/chunks/chunk-ETD6K42I.js +0 -358
  311. package/chunks/chunk-I5NLVPZJ.js +0 -45
  312. package/chunks/chunk-ONWW74X6.js +0 -74639
  313. package/chunks/chunk-W7FJ3N32.js +0 -49
  314. package/chunks/daemon-status-provider-LVTVJGAD.js +0 -77
  315. package/chunks/list-3CZR5I42.js +0 -78
  316. package/chunks/nonInteractiveCli-QTEHDDFH.js +0 -129
  317. package/chunks/updateCheck-JJEUQ54U.js +0 -73
  318. package/chunks/workspace-providers-status-FYV7TTHA.js +0 -75
  319. package/chunks/write-file-M2DTFILF.js +0 -599
  320. package/web-shell/assets/channel-04R0vLbG.js +0 -1
  321. package/web-shell/assets/classDiagram-4FO5ZUOK-Bw9SOwAV.js +0 -1
  322. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Bw9SOwAV.js +0 -1
  323. package/web-shell/assets/index-DgkKrjw3.js +0 -1187
  324. package/web-shell/assets/index-Rv6mOAN9.css +0 -5
  325. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DWBoO4UY.js +0 -1
  326. package/chunks/{chunk-PEJWA3QQ.js → chunk-QZJY47IE.js} +5 -5
@@ -1,599 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- checkTeamMemorySecrets
5
- } from "./chunk-I5NLVPZJ.js";
6
- import {
7
- CommitAttributionService,
8
- FileEncoding,
9
- StructuredToolError,
10
- checkPriorRead,
11
- createPatchSmart,
12
- detectLineEnding,
13
- getDiffStat,
14
- needsUtf8Bom
15
- } from "./chunk-6OH6A5EX.js";
16
- import "./chunk-5M6IDOMF.js";
17
- import "./chunk-T4TZQJ7W.js";
18
- import "./chunk-H6XPXXMH.js";
19
- import "./chunk-OONJNQ42.js";
20
- import "./chunk-JDI67JFB.js";
21
- import "./chunk-XU457J4V.js";
22
- import "./chunk-VDDGDZMA.js";
23
- import "./chunk-EIAK6Q2B.js";
24
- import "./chunk-FSL5W5TI.js";
25
- import "./chunk-D2VIDMVM.js";
26
- import "./chunk-E2UVIFI2.js";
27
- import "./chunk-WBTZGWQ6.js";
28
- import "./chunk-SZRN75WQ.js";
29
- import "./chunk-HTO4JFDZ.js";
30
- import "./chunk-CPBF7KYF.js";
31
- import "./chunk-ETD6K42I.js";
32
- import "./chunk-6AM5D4ME.js";
33
- import "./chunk-G45X5TRN.js";
34
- import "./chunk-PBATSWUQ.js";
35
- import "./chunk-ZEOZL37W.js";
36
- import "./chunk-OOCI5VVU.js";
37
- import "./chunk-UQES76OO.js";
38
- import "./chunk-OKWRU4NO.js";
39
- import "./chunk-XNP57UDV.js";
40
- import "./chunk-JESCGQM3.js";
41
- import {
42
- FileOperationEvent,
43
- fileExists,
44
- getLanguageFromFilePath,
45
- getSpecificMimeType,
46
- logFileOperation
47
- } from "./chunk-ONWW74X6.js";
48
- import "./chunk-4WKAA4KS.js";
49
- import "./chunk-CR3C7WXL.js";
50
- import "./chunk-VGC4I5JJ.js";
51
- import {
52
- isAnyAutoMemPath,
53
- isTeamAutoMemPath
54
- } from "./chunk-JD3MKVKL.js";
55
- import "./chunk-UEY4AYUL.js";
56
- import "./chunk-BDBMYST4.js";
57
- import "./chunk-467G3SV5.js";
58
- import {
59
- BaseDeclarativeTool,
60
- BaseToolInvocation,
61
- ToolDisplayNames,
62
- ToolNames
63
- } from "./chunk-S35ZDXOS.js";
64
- import "./chunk-XVNQMZ2I.js";
65
- import "./chunk-FODK6UMO.js";
66
- import "./chunk-GLNBDYUX.js";
67
- import "./chunk-DJ2GSRLV.js";
68
- import "./chunk-6EFTQYW7.js";
69
- import "./chunk-MAQQGNQ5.js";
70
- import "./chunk-A4UCTEB5.js";
71
- import "./chunk-XWRJCPHC.js";
72
- import "./chunk-TYQMGACW.js";
73
- import "./chunk-TYAMGABM.js";
74
- import "./chunk-FCMNKVXT.js";
75
- import {
76
- createDebugLogger,
77
- getErrorMessage,
78
- isNodeError,
79
- makeRelative,
80
- shortenPath,
81
- unescapePath
82
- } from "./chunk-C27BYUX6.js";
83
- import "./chunk-75DOP5OR.js";
84
- import "./chunk-DMTGGOSA.js";
85
- import "./chunk-YQ3U5MUC.js";
86
- import "./chunk-TB6UDU4T.js";
87
- import {
88
- init_esbuild_shims
89
- } from "./chunk-5O2XNYP6.js";
90
- import {
91
- __name
92
- } from "./chunk-J2S4EL5Y.js";
93
-
94
- // packages/core/src/tools/write-file.ts
95
- init_esbuild_shims();
96
- import fs from "node:fs";
97
- import path from "node:path";
98
- var debugLogger = createDebugLogger("WRITE_FILE");
99
- var ARTIFACT_LIKE_EXTENSIONS = /* @__PURE__ */ new Set([
100
- ".htm",
101
- ".html",
102
- ".ipynb",
103
- ".jpeg",
104
- ".jpg",
105
- ".pdf",
106
- ".png",
107
- ".svg",
108
- ".webp"
109
- ]);
110
- var WriteFileToolInvocation = class extends BaseToolInvocation {
111
- constructor(config, params) {
112
- super(params);
113
- this.config = config;
114
- }
115
- static {
116
- __name(this, "WriteFileToolInvocation");
117
- }
118
- toolLocations() {
119
- return [{ path: this.params.file_path }];
120
- }
121
- getDescription() {
122
- const relativePath = makeRelative(
123
- this.params.file_path,
124
- this.config.getTargetDir()
125
- );
126
- return `Writing to ${shortenPath(relativePath)}`;
127
- }
128
- /**
129
- * Write operations always need user confirmation, except for the private
130
- * managed auto-memory files (user/project) which are written autonomously.
131
- * Team memory is shared and committed to the repo, so it is NOT auto-allowed
132
- * like the private tiers — writes default to 'ask'. (In AUTO_EDIT/YOLO the
133
- * user has globally opted into auto-approval; team writes still surface in the
134
- * git diff for review before commit.)
135
- */
136
- async getDefaultPermission() {
137
- const projectRoot = this.config.getProjectRoot();
138
- const filePath = path.resolve(this.params.file_path);
139
- if (isTeamAutoMemPath(filePath, projectRoot)) {
140
- return "ask";
141
- }
142
- if (isAnyAutoMemPath(filePath, projectRoot)) {
143
- return "allow";
144
- }
145
- return "ask";
146
- }
147
- /**
148
- * Constructs the write-file diff confirmation details.
149
- */
150
- async getConfirmationDetails(_abortSignal) {
151
- let originalContent = "";
152
- let fileExists2 = await fileExists(this.params.file_path);
153
- if (!this.config.getFileReadCacheDisabled()) {
154
- const decision = await checkPriorRead(
155
- this.config.getFileReadCache(),
156
- this.params.file_path,
157
- "overwriting"
158
- );
159
- if (!decision.ok) {
160
- throw new StructuredToolError(decision.rawMessage, decision.type);
161
- }
162
- }
163
- if (fileExists2) {
164
- try {
165
- const { content } = await this.config.getFileSystemService().readTextFile({ path: this.params.file_path });
166
- originalContent = content;
167
- } catch (err) {
168
- if (isNodeError(err) && err.code === "ENOENT") {
169
- fileExists2 = false;
170
- } else {
171
- throw new Error(
172
- `Error reading existing file for confirmation: ${getErrorMessage(err)}`
173
- );
174
- }
175
- }
176
- }
177
- if (fileExists2 && !this.config.getFileReadCacheDisabled()) {
178
- const postDecision = await checkPriorRead(
179
- this.config.getFileReadCache(),
180
- this.params.file_path,
181
- "overwriting",
182
- { expectExisting: true }
183
- );
184
- if (!postDecision.ok) {
185
- debugLogger.warn("post-read TOCTOU rejection (confirmation)", {
186
- path: this.params.file_path,
187
- reason: postDecision.type
188
- });
189
- throw new StructuredToolError(
190
- postDecision.rawMessage,
191
- postDecision.type
192
- );
193
- }
194
- }
195
- const relativePath = makeRelative(
196
- this.params.file_path,
197
- this.config.getTargetDir()
198
- );
199
- const fileName = path.basename(this.params.file_path);
200
- const fileDiff = createPatchSmart(
201
- fileName,
202
- originalContent,
203
- this.params.content,
204
- "Current",
205
- "Proposed"
206
- );
207
- const confirmationDetails = {
208
- type: "edit",
209
- title: `Confirm Write: ${shortenPath(relativePath)}`,
210
- fileName,
211
- filePath: this.params.file_path,
212
- fileDiff,
213
- originalContent,
214
- newContent: this.params.content,
215
- onConfirm: /* @__PURE__ */ __name(async (outcome) => {
216
- if (outcome === "proceed_always" /* ProceedAlways */) {
217
- this.config.setApprovalMode("auto-edit" /* AUTO_EDIT */);
218
- }
219
- }, "onConfirm")
220
- };
221
- return confirmationDetails;
222
- }
223
- async execute(_abortSignal) {
224
- const { file_path, content, ai_proposed_content, modified_by_user } = this.params;
225
- let fileExists2 = await fileExists(file_path);
226
- let originalContent = "";
227
- let useBOM = false;
228
- let detectedEncoding;
229
- let detectedLineEnding;
230
- const dirName = path.dirname(file_path);
231
- const teamMemoryError = checkTeamMemorySecrets(
232
- file_path,
233
- content,
234
- this.config.getProjectRoot()
235
- );
236
- if (teamMemoryError) {
237
- return {
238
- llmContent: `[ERROR: ${teamMemoryError}]`,
239
- returnDisplay: teamMemoryError,
240
- error: {
241
- message: teamMemoryError,
242
- type: "invalid_tool_params" /* INVALID_TOOL_PARAMS */
243
- }
244
- };
245
- }
246
- if (!this.config.getFileReadCacheDisabled()) {
247
- const decision = await checkPriorRead(
248
- this.config.getFileReadCache(),
249
- file_path,
250
- "overwriting"
251
- );
252
- if (!decision.ok) {
253
- return {
254
- llmContent: decision.rawMessage,
255
- returnDisplay: `Error: ${decision.displayMessage}`,
256
- error: {
257
- message: decision.rawMessage,
258
- type: decision.type
259
- }
260
- };
261
- }
262
- }
263
- if (fileExists2) {
264
- try {
265
- const fileInfo = await this.config.getFileSystemService().readTextFile({ path: file_path });
266
- if (fileInfo._meta?.bom !== void 0) {
267
- useBOM = fileInfo._meta.bom;
268
- } else {
269
- useBOM = fileInfo.content.length > 0 && fileInfo.content.codePointAt(0) === 65279;
270
- }
271
- detectedEncoding = fileInfo._meta?.encoding || "utf-8";
272
- detectedLineEnding = detectLineEnding(fileInfo.content);
273
- originalContent = fileInfo.content;
274
- fileExists2 = true;
275
- } catch (err) {
276
- if (isNodeError(err) && err.code === "ENOENT") {
277
- fileExists2 = false;
278
- } else {
279
- const error = {
280
- message: getErrorMessage(err),
281
- code: isNodeError(err) ? err.code : void 0
282
- };
283
- const errorMsg = error.code ? `Error checking existing file '${file_path}': ${error.message} (${error.code})` : `Error checking existing file: ${error.message}`;
284
- return {
285
- llmContent: errorMsg,
286
- returnDisplay: errorMsg,
287
- error: {
288
- message: errorMsg,
289
- type: "file_write_failure" /* FILE_WRITE_FAILURE */
290
- }
291
- };
292
- }
293
- }
294
- }
295
- if (fileExists2 && !this.config.getFileReadCacheDisabled()) {
296
- const postDecision = await checkPriorRead(
297
- this.config.getFileReadCache(),
298
- file_path,
299
- "overwriting",
300
- { expectExisting: true }
301
- );
302
- if (!postDecision.ok) {
303
- debugLogger.warn("post-read TOCTOU rejection (execute)", {
304
- path: file_path,
305
- reason: postDecision.type
306
- });
307
- return {
308
- llmContent: postDecision.rawMessage,
309
- returnDisplay: `Error: ${postDecision.displayMessage}`,
310
- error: {
311
- message: postDecision.rawMessage,
312
- type: postDecision.type
313
- }
314
- };
315
- }
316
- }
317
- if (!fileExists2) {
318
- const userEncoding = this.config.getDefaultFileEncoding();
319
- if (userEncoding === FileEncoding.UTF8_BOM) {
320
- useBOM = true;
321
- } else if (userEncoding === void 0) {
322
- useBOM = needsUtf8Bom(file_path);
323
- }
324
- detectedEncoding = void 0;
325
- }
326
- try {
327
- await this.config.getFileHistoryService().trackEdit(file_path);
328
- } catch {
329
- }
330
- if (!this.config.getFileReadCacheDisabled()) {
331
- const writeDecision = await checkPriorRead(
332
- this.config.getFileReadCache(),
333
- file_path,
334
- "overwriting",
335
- // If the file existed when we read it (`fileExists` is still
336
- // true after readTextFile), ENOENT here means the original
337
- // target disappeared between the post-read check and now —
338
- // reject rather than fall through and silently re-create the
339
- // file from stale bytes. For new-file creation
340
- // (`fileExists === false`), ENOENT is the expected pre-write
341
- // state (ok:true → writeTextFile creates).
342
- { expectExisting: fileExists2 }
343
- );
344
- if (!writeDecision.ok) {
345
- debugLogger.warn("pre-write TOCTOU rejection", {
346
- path: file_path,
347
- reason: writeDecision.type
348
- });
349
- return {
350
- llmContent: writeDecision.rawMessage,
351
- returnDisplay: `Error: ${writeDecision.displayMessage}`,
352
- error: {
353
- message: writeDecision.rawMessage,
354
- type: writeDecision.type
355
- }
356
- };
357
- }
358
- }
359
- if (!fileExists2) {
360
- fs.mkdirSync(dirName, { recursive: true });
361
- }
362
- try {
363
- await this.config.getFileSystemService().writeTextFile({
364
- path: file_path,
365
- content,
366
- _meta: {
367
- bom: useBOM,
368
- encoding: detectedEncoding,
369
- lineEnding: detectedLineEnding
370
- }
371
- });
372
- if (!modified_by_user) {
373
- CommitAttributionService.getInstance().recordEdit(
374
- file_path,
375
- fileExists2 ? originalContent : null,
376
- content
377
- );
378
- }
379
- try {
380
- const postWriteStats = fs.statSync(file_path);
381
- this.config.getFileReadCache().recordWrite(file_path, postWriteStats);
382
- } catch {
383
- }
384
- const fileName = path.basename(file_path);
385
- const currentContentForDiff = originalContent;
386
- const fileDiff = createPatchSmart(
387
- fileName,
388
- currentContentForDiff,
389
- content,
390
- "Original",
391
- "Written"
392
- );
393
- const originallyProposedContent = ai_proposed_content || content;
394
- const diffStat = getDiffStat(
395
- fileName,
396
- currentContentForDiff,
397
- originallyProposedContent,
398
- content
399
- );
400
- const llmSuccessMessageParts = [
401
- !fileExists2 ? `Successfully created and wrote to new file: ${file_path}.` : `Successfully overwrote file: ${file_path}.`
402
- ];
403
- if (modified_by_user) {
404
- llmSuccessMessageParts.push(
405
- `User modified the \`content\` to be: ${content}`
406
- );
407
- }
408
- const artifactReminder = buildRecordArtifactReminder(
409
- this.config,
410
- file_path
411
- );
412
- if (artifactReminder) {
413
- llmSuccessMessageParts.push(artifactReminder);
414
- }
415
- const mimetype = getSpecificMimeType(file_path);
416
- const programmingLanguage = getLanguageFromFilePath(file_path);
417
- const extension = path.extname(file_path);
418
- const operation = !fileExists2 ? "create" /* CREATE */ : "update" /* UPDATE */;
419
- const lineCount = content.split("\n").length;
420
- logFileOperation(
421
- this.config,
422
- new FileOperationEvent(
423
- WriteFileTool.Name,
424
- operation,
425
- lineCount,
426
- mimetype,
427
- extension,
428
- programmingLanguage
429
- )
430
- );
431
- const displayResult = {
432
- fileDiff,
433
- fileName,
434
- originalContent,
435
- newContent: content,
436
- diffStat
437
- };
438
- return {
439
- llmContent: llmSuccessMessageParts.join(" "),
440
- returnDisplay: displayResult
441
- };
442
- } catch (error) {
443
- let errorMsg;
444
- let errorType = "file_write_failure" /* FILE_WRITE_FAILURE */;
445
- if (isNodeError(error)) {
446
- errorMsg = `Error writing to file '${file_path}': ${error.message} (${error.code})`;
447
- if (error.code === "EACCES") {
448
- errorMsg = `Permission denied writing to file: ${file_path} (${error.code})`;
449
- errorType = "permission_denied" /* PERMISSION_DENIED */;
450
- } else if (error.code === "ENOSPC") {
451
- errorMsg = `No space left on device: ${file_path} (${error.code})`;
452
- errorType = "no_space_left" /* NO_SPACE_LEFT */;
453
- } else if (error.code === "EISDIR") {
454
- errorMsg = `Target is a directory, not a file: ${file_path} (${error.code})`;
455
- errorType = "target_is_directory" /* TARGET_IS_DIRECTORY */;
456
- }
457
- if (this.config.getDebugMode() && error.stack) {
458
- debugLogger.debug("Write file error stack:", error.stack);
459
- }
460
- } else {
461
- errorMsg = `Error writing to file: ${getErrorMessage(error)}`;
462
- }
463
- return {
464
- llmContent: errorMsg,
465
- returnDisplay: errorMsg,
466
- error: {
467
- message: errorMsg,
468
- type: errorType
469
- }
470
- };
471
- }
472
- }
473
- };
474
- function buildRecordArtifactReminder(config, filePath) {
475
- if (!config.isRecordArtifactEnabled()) {
476
- return null;
477
- }
478
- if (!ARTIFACT_LIKE_EXTENSIONS.has(path.extname(filePath).toLowerCase())) {
479
- return null;
480
- }
481
- const relativePath = path.relative(config.getTargetDir(), filePath);
482
- if (!relativePath || relativePath === ".." || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath)) {
483
- return null;
484
- }
485
- const workspacePath = relativePath.split(path.sep).join("/");
486
- return `If this file is a reusable user-facing artifact, call record_artifact with workspacePath "${workspacePath}" before telling the user it is available in the artifacts panel.`;
487
- }
488
- __name(buildRecordArtifactReminder, "buildRecordArtifactReminder");
489
- var WriteFileTool = class _WriteFileTool extends BaseDeclarativeTool {
490
- constructor(config) {
491
- super(
492
- _WriteFileTool.Name,
493
- ToolDisplayNames.WRITE_FILE,
494
- `Writes content to a specified file in the local filesystem. The file_path argument MUST be an absolute path. Always construct it by combining the project root with the file's relative path (e.g. project root '/path/to/project/' + relative 'foo/bar.txt' = '/path/to/project/foo/bar.txt'). If the user provides a relative path, resolve it against the project root first.
495
-
496
- The user has the ability to modify \`content\`. If modified, this will be stated in the response.`,
497
- "edit" /* Edit */,
498
- {
499
- properties: {
500
- file_path: {
501
- description: "The absolute path to the file to write to (e.g., '/home/user/project/file.txt'). Relative paths are not supported.",
502
- type: "string"
503
- },
504
- content: {
505
- description: "The content to write to the file.",
506
- type: "string"
507
- }
508
- },
509
- required: ["file_path", "content"],
510
- type: "object"
511
- }
512
- );
513
- this.config = config;
514
- }
515
- static {
516
- __name(this, "WriteFileTool");
517
- }
518
- static Name = ToolNames.WRITE_FILE;
519
- validateToolParamValues(params) {
520
- const filePath = unescapePath(params.file_path.trim());
521
- params.file_path = filePath;
522
- if (!filePath) {
523
- return `Missing or empty "file_path"`;
524
- }
525
- if (!path.isAbsolute(filePath)) {
526
- return `File path must be absolute: ${filePath}`;
527
- }
528
- try {
529
- if (fs.existsSync(filePath)) {
530
- const stats = fs.lstatSync(filePath);
531
- if (stats.isDirectory()) {
532
- return `Path is a directory, not a file: ${filePath}`;
533
- }
534
- }
535
- } catch (statError) {
536
- return `Error accessing path properties for validation: ${filePath}. Reason: ${getErrorMessage(
537
- statError
538
- )}`;
539
- }
540
- const teamMemoryError = checkTeamMemorySecrets(
541
- filePath,
542
- params.content ?? "",
543
- this.config.getProjectRoot()
544
- );
545
- if (teamMemoryError) {
546
- return teamMemoryError;
547
- }
548
- return null;
549
- }
550
- createInvocation(params) {
551
- return new WriteFileToolInvocation(this.config, params);
552
- }
553
- toAutoClassifierInput(params) {
554
- const content = params.content ?? "";
555
- return {
556
- file_path: params.file_path,
557
- byte_count: Buffer.byteLength(content, "utf8"),
558
- content_preview: content.slice(0, 300),
559
- content_truncated: content.length > 300
560
- };
561
- }
562
- getModifyContext(_abortSignal) {
563
- return {
564
- getFilePath: /* @__PURE__ */ __name((params) => params.file_path, "getFilePath"),
565
- getCurrentContent: /* @__PURE__ */ __name(async (params) => {
566
- const fileExists2 = await fileExists(params.file_path);
567
- if (fileExists2) {
568
- try {
569
- const { content } = await this.config.getFileSystemService().readTextFile({ path: params.file_path });
570
- return content;
571
- } catch (err) {
572
- if (!isNodeError(err) || err.code !== "ENOENT") throw err;
573
- return "";
574
- }
575
- } else {
576
- return "";
577
- }
578
- }, "getCurrentContent"),
579
- getProposedContent: /* @__PURE__ */ __name(async (params) => params.content, "getProposedContent"),
580
- createUpdatedParams: /* @__PURE__ */ __name((_oldContent, modifiedProposedContent, originalParams) => {
581
- const content = originalParams.content;
582
- return {
583
- ...originalParams,
584
- ai_proposed_content: content,
585
- content: modifiedProposedContent,
586
- modified_by_user: true
587
- };
588
- }, "createUpdatedParams")
589
- };
590
- }
591
- };
592
- export {
593
- WriteFileTool
594
- };
595
- /**
596
- * @license
597
- * Copyright 2025 Google LLC
598
- * SPDX-License-Identifier: Apache-2.0
599
- */
@@ -1 +0,0 @@
1
- import{U as a,D as n}from"./mermaid.core-DJ05ZZIK.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-CGYOWorl.js";import{_ as i}from"./mermaid.core-DJ05ZZIK.js";import"./chunk-FMBD7UC4-Cd50-w85.js";import"./chunk-ND2GUHAM-C2wF3KCK.js";import"./chunk-55IACEB6-BtBjz02t.js";import"./chunk-2J33WTMH-4rYQdkEI.js";import"./index-DgkKrjw3.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-CGYOWorl.js";import{_ as i}from"./mermaid.core-DJ05ZZIK.js";import"./chunk-FMBD7UC4-Cd50-w85.js";import"./chunk-ND2GUHAM-C2wF3KCK.js";import"./chunk-55IACEB6-BtBjz02t.js";import"./chunk-2J33WTMH-4rYQdkEI.js";import"./index-DgkKrjw3.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};