@qwen-code/qwen-code 0.20.0-nightly.20260721.cda0e0348 → 0.20.0-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) 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/sub-agents.md +16 -7
  4. package/bundled/qc-helper/docs/integration-github-action.md +9 -9
  5. package/bundled/review/DESIGN.md +2 -2
  6. package/bundled/review/SKILL.md +4 -4
  7. package/chunks/{MaxSizedBox-EE76OHAP.js → MaxSizedBox-53BTJ3JK.js} +41 -34
  8. package/chunks/{StandaloneSessionPicker-WZH4PC3K.js → StandaloneSessionPicker-VMFIXQ44.js} +57 -50
  9. package/chunks/{acpAgent-2ATF4LMP.js → acpAgent-5WYAVSFG.js} +1135 -428
  10. package/chunks/{agent-KTOOFWMV.js → agent-44FM7PBX.js} +37 -30
  11. package/chunks/agent-headless-CDBMKM44.js +68 -0
  12. package/chunks/{anthropicContentGenerator-W4JLNYWQ.js → anthropicContentGenerator-NMSS7IMV.js} +13 -12
  13. package/chunks/{artifact-tool-WBCAMD3O.js → artifact-tool-56T5IMBP.js} +3 -3
  14. package/chunks/{askUserQuestion-6DZC4UV5.js → askUserQuestion-E25OBIC2.js} +3 -3
  15. package/chunks/{bridge-T4TLAZSJ.js → bridge-IQZT3KU2.js} +42 -35
  16. package/chunks/{build-SSCNEHZZ.js → build-GHIZ4MSZ.js} +1 -1
  17. package/chunks/{ca-ISKASTR5.js → ca-N6VVUFVB.js} +5 -1
  18. package/chunks/{channel-worker-group-QZV2SP5U.js → channel-worker-group-LFBT7K64.js} +3 -3
  19. package/chunks/{channel-worker-manager-3GMAU45H.js → channel-worker-manager-3RUPERG2.js} +3 -3
  20. package/chunks/{channel-worker-supervisor-QCXSXCRY.js → channel-worker-supervisor-A3KVATD3.js} +2 -2
  21. package/chunks/{chunk-OV2KB55J.js → chunk-22OH7L7I.js} +5 -5
  22. package/chunks/chunk-2RFKHEXL.js +74 -0
  23. package/chunks/{chunk-KRI4VCHX.js → chunk-45AIVIUL.js} +9 -9
  24. package/chunks/{chunk-2GFRA3MN.js → chunk-45DNGJKC.js} +3 -3
  25. package/chunks/{chunk-JD3MKVKL.js → chunk-4K56OJFJ.js} +1 -1
  26. package/chunks/{chunk-KTUQMDEP.js → chunk-4K7VDKAD.js} +1 -1
  27. package/chunks/{chunk-QKYTTBYW.js → chunk-4LVZNIDO.js} +1 -1
  28. package/chunks/{chunk-ZEOZL37W.js → chunk-57FIIFJN.js} +1 -1
  29. package/chunks/{chunk-6EFTQYW7.js → chunk-5I5BM454.js} +1 -1
  30. package/chunks/{chunk-JR6UJ24K.js → chunk-5JX7FPHW.js} +2 -2
  31. package/chunks/{chunk-25Y6JSH2.js → chunk-5MZSD2JX.js} +6 -6
  32. package/chunks/{chunk-GPILFVPY.js → chunk-66RKDODM.js} +1 -1
  33. package/chunks/{chunk-L4YSPHR4.js → chunk-6AWRQ4T2.js} +8 -6
  34. package/chunks/{chunk-GMGDLUC7.js → chunk-6IL7KRLE.js} +1 -1
  35. package/chunks/{chunk-JQMBPGOU.js → chunk-6NHK6HS7.js} +3 -3
  36. package/chunks/{chunk-EDMGFJ3E.js → chunk-6OHCY3OB.js} +2 -2
  37. package/chunks/chunk-6PVPNMXU.js +29 -0
  38. package/chunks/{chunk-NO6XTCYT.js → chunk-6RQ5IPUX.js} +18366 -16879
  39. package/chunks/{chunk-BDBMYST4.js → chunk-6X4GWOPW.js} +1 -1
  40. package/chunks/chunk-7362QS5B.js +2256 -0
  41. package/chunks/{chunk-USTF7LPI.js → chunk-7KZ2KYAD.js} +27 -23
  42. package/chunks/{chunk-AYCDXHZB.js → chunk-7Z6JQEL6.js} +1 -1
  43. package/chunks/{chunk-ABIL4ZQU.js → chunk-A7CUSHP7.js} +1 -1
  44. package/chunks/{chunk-246TW4IX.js → chunk-BEKZWVJJ.js} +3 -373
  45. package/chunks/{chunk-LC5CAVMS.js → chunk-BKZEHVPV.js} +171 -169
  46. package/chunks/{chunk-4CWPMWCD.js → chunk-BRHHXGWL.js} +6 -4
  47. package/chunks/{chunk-AY3CSB6F.js → chunk-BXXWWCLA.js} +4 -4
  48. package/chunks/{chunk-G45NOBV7.js → chunk-C3YZ5CLY.js} +7 -6
  49. package/chunks/{chunk-XCHUDLER.js → chunk-CHLNJN3C.js} +1 -1
  50. package/chunks/{chunk-JRW46GQX.js → chunk-CJTAUXKG.js} +3 -3
  51. package/chunks/{chunk-KTNIZG2C.js → chunk-CMRYLH67.js} +2 -2
  52. package/chunks/{chunk-WQQDJE2P.js → chunk-DKZISEDB.js} +54 -51
  53. package/chunks/{chunk-2ITGJJE2.js → chunk-DORJSBMF.js} +6 -6
  54. package/chunks/{chunk-5SCI6E3E.js → chunk-E4IMU4Y5.js} +1 -1
  55. package/chunks/{chunk-7KGXAXF7.js → chunk-E5MVGARW.js} +1 -1
  56. package/chunks/{chunk-FYA3Y5JR.js → chunk-EJFHUF3D.js} +5 -5
  57. package/chunks/{chunk-CG2HPAVD.js → chunk-EPN5MKRH.js} +2 -2
  58. package/chunks/{chunk-NEEB7UEN.js → chunk-FFFM6NJV.js} +1 -2
  59. package/chunks/chunk-FMXMKPI5.js +1780 -0
  60. package/chunks/{chunk-FEOZBUMT.js → chunk-FODK6UMO.js} +0 -27
  61. package/chunks/{chunk-DZZIOIVF.js → chunk-FSXCGBXB.js} +1 -1
  62. package/chunks/chunk-GLNBDYUX.js +38 -0
  63. package/chunks/{chunk-6MC5ASQK.js → chunk-GOWMC4CS.js} +4 -4
  64. package/chunks/{chunk-OONJNQ42.js → chunk-GPSKDNEE.js} +3 -3
  65. package/chunks/{chunk-W3BKN3LO.js → chunk-GZBHRTNM.js} +1 -1
  66. package/chunks/{chunk-XVVH63JG.js → chunk-H4AR2JQF.js} +3 -3
  67. package/chunks/{chunk-LWQ4IAOJ.js → chunk-H4OWOFZL.js} +2 -2
  68. package/chunks/chunk-HTR4WV6U.js +327 -0
  69. package/chunks/{chunk-IYZENXFW.js → chunk-IE7TPOXP.js} +1 -1
  70. package/chunks/{chunk-R3VZNHRX.js → chunk-IT27F3ES.js} +290 -80
  71. package/chunks/{chunk-5JX5EWR5.js → chunk-J3VSRG5Y.js} +61 -21
  72. package/chunks/{chunk-R5N7NF5D.js → chunk-J63IP5ZT.js} +7 -7
  73. package/chunks/{chunk-G45X5TRN.js → chunk-JCW2R7WC.js} +1 -72
  74. package/chunks/{chunk-U4VGYZN7.js → chunk-JD5FHQ3N.js} +3 -3
  75. package/chunks/{chunk-5WG2K5RH.js → chunk-JIHHXJFH.js} +90 -31
  76. package/chunks/{chunk-AWVS63WA.js → chunk-JJEFX6U5.js} +28 -1766
  77. package/chunks/{chunk-5PZ6R37W.js → chunk-JT7HACMQ.js} +2 -2
  78. package/chunks/{chunk-2GOPPEHK.js → chunk-JWJVZHT5.js} +2 -2
  79. package/chunks/{chunk-FZVSFBNW.js → chunk-JYS55H6Z.js} +41 -1
  80. package/chunks/{chunk-6DHWO5ZF.js → chunk-K4VB66QF.js} +11 -11
  81. package/chunks/{chunk-EIAK6Q2B.js → chunk-KHOVYUHX.js} +2 -2
  82. package/chunks/{chunk-2CWOJ2FA.js → chunk-KNTYRZD4.js} +8 -8
  83. package/chunks/{chunk-ACW3VNUE.js → chunk-KQQ757OQ.js} +1 -1
  84. package/chunks/chunk-KWK7UE6L.js +6194 -0
  85. package/chunks/{chunk-OOCI5VVU.js → chunk-LIZRAKPB.js} +1 -1
  86. package/chunks/{chunk-4RA7PWIY.js → chunk-LMQNDPVP.js} +3 -3
  87. package/chunks/chunk-M7WBGLYP.js +151 -0
  88. package/chunks/chunk-NABLFI57.js +82 -0
  89. package/chunks/{chunk-EZVDJFZ7.js → chunk-NPQDJGKU.js} +1 -1
  90. package/chunks/{chunk-GH7OEOYU.js → chunk-NYPUWHHC.js} +4 -4
  91. package/chunks/{chunk-DMRO4GU2.js → chunk-OAGG6CRR.js} +1 -1
  92. package/chunks/chunk-OQ5SYCPE.js +10017 -0
  93. package/chunks/{chunk-C27BYUX6.js → chunk-OQB4EXO4.js} +14 -11
  94. package/chunks/chunk-OZYV6F53.js +391 -0
  95. package/chunks/{chunk-EAUYY7SS.js → chunk-Q2YKNMLS.js} +3 -3
  96. package/chunks/{chunk-PYNCSQSI.js → chunk-Q6DEGTYO.js} +50 -1493
  97. package/chunks/{chunk-PBATSWUQ.js → chunk-QBUDF33N.js} +1 -1
  98. package/chunks/{chunk-32F7BZSK.js → chunk-QD6BRERJ.js} +2 -2
  99. package/chunks/{chunk-6RVJRVQR.js → chunk-QF4DPYPH.js} +1 -1
  100. package/chunks/{chunk-BVLROR2T.js → chunk-QLJUC7TG.js} +1 -1
  101. package/chunks/{chunk-UEY4AYUL.js → chunk-QNLNLENL.js} +2 -2
  102. package/chunks/{chunk-XZOBDSDG.js → chunk-QTROYZUC.js} +83 -39
  103. package/chunks/{chunk-BWK3FX3K.js → chunk-RAUHV362.js} +3 -3
  104. package/chunks/{chunk-JPRLCXAO.js → chunk-RUNR5DAE.js} +4 -4
  105. package/chunks/{chunk-RFIAR4YL.js → chunk-RV4C2ZFG.js} +1 -1
  106. package/chunks/{chunk-E5QFCC4X.js → chunk-RWCQJC5W.js} +51 -35
  107. package/chunks/{chunk-BUKOHGBE.js → chunk-S4BT3PX3.js} +3 -3
  108. package/chunks/{chunk-PFKNXN67.js → chunk-SOMSZ6W3.js} +13 -8
  109. package/chunks/{chunk-JNWZQ27S.js → chunk-SP5WRGVG.js} +3 -3
  110. package/chunks/{chunk-FSL5W5TI.js → chunk-T2L47JJK.js} +3 -3
  111. package/chunks/{chunk-TB6UDU4T.js → chunk-THJNPLI4.js} +16 -16
  112. package/chunks/chunk-TJQXJJX7.js +121 -0
  113. package/chunks/chunk-U7ZFW55U.js +2098 -0
  114. package/chunks/{chunk-W7H223ZZ.js → chunk-UGYMA4EI.js} +1 -1
  115. package/chunks/{chunk-X6YQWCIJ.js → chunk-UH3WSE5L.js} +13 -1
  116. package/chunks/{chunk-WRRF6TEQ.js → chunk-VHYCUGOT.js} +5 -1
  117. package/chunks/{chunk-LLDGOZMJ.js → chunk-VI7UU7ZI.js} +4 -4
  118. package/chunks/{chunk-IM2A6YO3.js → chunk-VLBJ7ZUG.js} +1 -1
  119. package/chunks/{chunk-CUJX3F4X.js → chunk-VTKWURCJ.js} +5 -5
  120. package/chunks/{chunk-R3VWUU2E.js → chunk-VYPFXUCB.js} +1 -1
  121. package/chunks/chunk-WHGVTP7Q.js +1049 -0
  122. package/chunks/{chunk-5YVZ2XLV.js → chunk-X6KLM4LZ.js} +8 -8
  123. package/chunks/{chunk-D2VIDMVM.js → chunk-X6N25LXS.js} +2 -2
  124. package/chunks/{chunk-B452RETY.js → chunk-XFWD3PCA.js} +1 -1
  125. package/chunks/chunk-XHATNRQA.js +1500 -0
  126. package/chunks/{chunk-YGIUIIIF.js → chunk-XP32LURS.js} +3 -3
  127. package/chunks/{chunk-FCUUJKZF.js → chunk-YDLVKCZJ.js} +496 -278
  128. package/chunks/{chunk-OP4MOGXF.js → chunk-YM3SZTH4.js} +8 -1
  129. package/chunks/{chunk-GKY2OJ7R.js → chunk-ZHERRXZJ.js} +1 -1
  130. package/chunks/chunk-ZJVVETCV.js +20600 -0
  131. package/chunks/{computer-use-M6MGRJF2.js → computer-use-FMEBQMCB.js} +42 -35
  132. package/chunks/{config-utils-MOGE4EVB.js → config-utils-WYUQ7II4.js} +1 -1
  133. package/chunks/contextCommand-5YK3QNNJ.js +73 -0
  134. package/chunks/{create-sub-session-P26FE5GG.js → create-sub-session-AZ77LBL3.js} +3 -3
  135. package/chunks/{create-sub-session-MB35IHCR.js → create-sub-session-MLELTOCW.js} +37 -30
  136. package/chunks/{cron-create-JWFHBDRQ.js → cron-create-KTWJM7QT.js} +5 -5
  137. package/chunks/{cron-delete-GDX4E26G.js → cron-delete-2P3I5ULL.js} +5 -5
  138. package/chunks/{cron-list-USMAIWPT.js → cron-list-PXDPGEDQ.js} +5 -5
  139. package/chunks/daemon-status-provider-FXMOD242.js +81 -0
  140. package/chunks/{de-I7ZIYXZC.js → de-4IBXM7CN.js} +5 -1
  141. package/chunks/{dist-VGJTZL4E.js → dist-XRYV6TJP.js} +32 -3
  142. package/chunks/{earlyInputCapture-7QJX25AC.js → earlyInputCapture-N3J42S2G.js} +38 -31
  143. package/chunks/{edit-BTPQWGAA.js → edit-T6GO7VPW.js} +42 -37
  144. package/chunks/{en-XE34GKAA.js → en-USMCCJAJ.js} +5 -1
  145. package/chunks/{enter-worktree-N3SEYKOO.js → enter-worktree-OL3FMR3A.js} +42 -35
  146. package/chunks/{enterPlanMode-TN2JV5MY.js → enterPlanMode-LEP7BSBX.js} +42 -35
  147. package/chunks/{environment-HP6RK262.js → environment-6LNBH2LJ.js} +39 -32
  148. package/chunks/{errors-VHGRDDOQ.js → errors-IM3H4DNG.js} +39 -32
  149. package/chunks/{exit-worktree-FI3SQY3U.js → exit-worktree-6MOANJMY.js} +42 -35
  150. package/chunks/{exitPlanMode-NZWRVIIY.js → exitPlanMode-VLBSWDJK.js} +42 -35
  151. package/chunks/{fast-path-EGP7AXNR.js → fast-path-3Z3JY4BL.js} +3 -3
  152. package/chunks/{fast-path-settings-DAOVFADC.js → fast-path-settings-XB3CPUJT.js} +2 -2
  153. package/chunks/{fr-X7KDVZIY.js → fr-WVHEBDDB.js} +5 -1
  154. package/chunks/{gemini-AN5YMD5O.js → gemini-VDE6O6CX.js} +89 -82
  155. package/chunks/{geminiContentGenerator-ABTMU4FE.js → geminiContentGenerator-NN4ZWALY.js} +5 -5
  156. package/chunks/{getMachineId-bsd-EXV7SWPA.js → getMachineId-bsd-QFVLPUPT.js} +1 -1
  157. package/chunks/{getMachineId-darwin-IUOMFXU3.js → getMachineId-darwin-DGMQQE2E.js} +1 -1
  158. package/chunks/{getMachineId-linux-K7XJYFHL.js → getMachineId-linux-R4Z6CSWC.js} +1 -1
  159. package/chunks/{getMachineId-unsupported-EA5FDRJ6.js → getMachineId-unsupported-Z3SBVBUV.js} +1 -1
  160. package/chunks/{getMachineId-win-KBA6RAI5.js → getMachineId-win-SCK5UFDT.js} +1 -1
  161. package/chunks/{glob-5YABOPJB.js → glob-7AZHIY3Z.js} +42 -35
  162. package/chunks/{grep-U67FKUJT.js → grep-E2KEORSD.js} +42 -35
  163. package/chunks/handleAutoUpdate-BCNVTQWW.js +74 -0
  164. package/chunks/{i18n-GMQV324P.js → i18n-VP4NCTZN.js} +38 -31
  165. package/chunks/initializer-5UB4SRPK.js +79 -0
  166. package/chunks/installationInfo-LNYJCXN3.js +73 -0
  167. package/chunks/{ja-2ICT3KXF.js → ja-KY4ROZTE.js} +5 -1
  168. package/chunks/{keychain-token-storage-DWRJMNH3.js → keychain-token-storage-6ACJDYIB.js} +3 -3
  169. package/chunks/list-NIZ77KPE.js +82 -0
  170. package/chunks/loadedSettingsAdapter-IQPRO2SO.js +76 -0
  171. package/chunks/{loop-wakeup-5GLTUBHA.js → loop-wakeup-RNMRVA66.js} +6 -6
  172. package/chunks/{ls-FHBY3Y7I.js → ls-J2ZI5XYK.js} +5 -5
  173. package/chunks/{lsp-B6VMEW6Y.js → lsp-UMS3NUB5.js} +3 -3
  174. package/chunks/managed-npm-update-GFRDCD77.js +333 -0
  175. package/chunks/mcp-TCUL7LT2.js +76 -0
  176. package/chunks/{monitor-Z7NZNNRC.js → monitor-NDYKU5VS.js} +42 -35
  177. package/chunks/nonInteractiveCli-UHSHJDFD.js +133 -0
  178. package/chunks/{notebook-edit-GFOYAQAZ.js → notebook-edit-GF3HSMXN.js} +43 -38
  179. package/chunks/{openaiContentGenerator-XAAYV6WR.js → openaiContentGenerator-GE2I3C2T.js} +22 -17
  180. package/chunks/{pidfile-ILI37KRQ.js → pidfile-KS4IGGNX.js} +38 -31
  181. package/chunks/{processUtils-LIPJMLVZ.js → processUtils-TEQQ47A2.js} +2 -2
  182. package/chunks/{pt-JJ4XPIBP.js → pt-OK455PLH.js} +5 -1
  183. package/chunks/{qwenContentGenerator-DLJ3KKGZ.js → qwenContentGenerator-NDYOEIUY.js} +44 -35
  184. package/chunks/{qwenOAuth2-J47FU5PW.js → qwenOAuth2-CXDOBPSK.js} +18 -15
  185. package/chunks/{read-file-LCQ2KNNP.js → read-file-QDVJX75S.js} +13 -11
  186. package/chunks/{read-mcp-resource-AKCL7I43.js → read-mcp-resource-F6HYMDUY.js} +3 -3
  187. package/chunks/{record-artifact-PEUB7727.js → record-artifact-7GCFLDD7.js} +3 -3
  188. package/chunks/{resumeHistoryUtils-PSCSAKA6.js → resumeHistoryUtils-5EAQ76W4.js} +43 -36
  189. package/chunks/ripGrep-WANMXNVT.js +66 -0
  190. package/chunks/{ru-STR4KTW7.js → ru-7SPDGMGD.js} +5 -1
  191. package/chunks/{run-qwen-serve-DQ5ZIR36.js → run-qwen-serve-TC6M3WTJ.js} +85 -80
  192. package/chunks/{runtime-6MQFF2A6.js → runtime-BB73E3Z3.js} +45 -38
  193. package/chunks/{scheduler-K4S7NY3G.js → scheduler-NDU5OFSJ.js} +37 -30
  194. package/chunks/sdk-exporters-grpc-ETLH47EP.js +23214 -0
  195. package/chunks/sdk-exporters-http-T3POX73F.js +563 -0
  196. package/chunks/sdk-impl-NSLPDH6I.js +9193 -0
  197. package/chunks/{send-message-3RHE7HSM.js → send-message-PYIJ2PZL.js} +6 -4
  198. package/chunks/{serve-JFAAPC5J.js → serve-BTIRWZJ4.js} +43 -36
  199. package/chunks/{server-QB6CHRZN.js → server-JKAQBE2E.js} +277 -208
  200. package/chunks/{session-FKPVXAAB.js → session-66QFVVDS.js} +81 -74
  201. package/chunks/{settings-CADELKSU.js → settings-NBN6GY7E.js} +46 -39
  202. package/chunks/{shell-EON6WVVH.js → shell-JDSLAQVH.js} +37 -30
  203. package/chunks/{skill-FKSYXJ5U.js → skill-TNMHTO3C.js} +24 -20
  204. package/chunks/{spawnChannel-VM5IHLJO.js → spawnChannel-TFLHHXOC.js} +39 -32
  205. package/chunks/{src-Q4XB6SVD.js → src-YFXMPRBL.js} +254 -210
  206. package/chunks/{standalone-update-KGZHPBMA.js → standalone-update-2CQVQRSC.js} +39 -32
  207. package/chunks/{startInteractiveUI-EYDJIIIZ.js → startInteractiveUI-6C6PENRW.js} +370 -266
  208. package/chunks/{syntheticOutput-FG5PQKIR.js → syntheticOutput-H7RTI5KL.js} +4 -4
  209. package/chunks/{task-create-HX32YXO7.js → task-create-7474AJJD.js} +10 -8
  210. package/chunks/{task-list-QWSY4ZIU.js → task-list-633HGOIB.js} +6 -6
  211. package/chunks/{task-stop-GWC6UWAL.js → task-stop-MNUGHPIA.js} +3 -3
  212. package/chunks/{task-update-NCTAB73Q.js → task-update-66GQB5LI.js} +10 -8
  213. package/chunks/{team-create-CYP3YKYT.js → team-create-IPBHD26Z.js} +42 -35
  214. package/chunks/{team-delete-KK37HTOG.js → team-delete-BB3CG3QF.js} +6 -6
  215. package/chunks/{team-plan-approval-5LXIFKNV.js → team-plan-approval-WIGEJXXM.js} +42 -35
  216. package/chunks/theme-manager-OZYKJG3W.js +70 -0
  217. package/chunks/{todoWrite-ERCAMLFS.js → todoWrite-KRAUN54W.js} +5 -5
  218. package/chunks/{tool-search-Q27QHQU3.js → tool-search-J3CBYJRB.js} +21 -17
  219. package/chunks/total-session-admission-CNBQRM44.js +76 -0
  220. package/chunks/{trustedFolders-C6664IQC.js → trustedFolders-5FJRCHGN.js} +38 -31
  221. package/chunks/{update-relaunch-QC3E4FZW.js → update-relaunch-S5APSFJS.js} +13 -13
  222. package/chunks/{updateCheck-MVUKJMBX.js → updateCheck-BPSMOZXS.js} +46 -34
  223. package/chunks/{useAutoAcceptIndicator-J234IFIS.js → useAutoAcceptIndicator-WZVJ52U3.js} +47 -40
  224. package/chunks/{validateNonInterActiveAuth-YPPEKX4N.js → validateNonInterActiveAuth-64SVMELJ.js} +75 -68
  225. package/chunks/{version-5IXFQ4PT.js → version-SQL27GUA.js} +1 -1
  226. package/chunks/{web-fetch-L62NQVKN.js → web-fetch-K7QCHIOJ.js} +100 -41
  227. package/chunks/web-search-KQPQFM7A.js +731 -0
  228. package/chunks/{workflow-6MHBBFQU.js → workflow-BFTW72A5.js} +47 -39
  229. package/chunks/workspace-providers-status-4PLI2VFC.js +79 -0
  230. package/chunks/{workspace-registration-store-P6QHCSMU.js → workspace-registration-store-VAVPVIF3.js} +2 -2
  231. package/chunks/workspace-registry-I4ZRHGBS.js +80 -0
  232. package/chunks/workspace-service-RXYBWBDJ.js +91 -0
  233. package/chunks/workspace-skills-status-35Z2FU4I.js +78 -0
  234. package/chunks/write-file-KCL5RI2I.js +66 -0
  235. package/chunks/{zh-TW-4RR3YHNN.js → zh-TW-BM47YBFH.js} +5 -1
  236. package/chunks/{zh-6ANG2HTL.js → zh-WY5DWYZD.js} +5 -1
  237. package/cli-entry.js +164 -12
  238. package/cli.js +18 -11
  239. package/locales/ca.js +10 -3
  240. package/locales/de.js +8 -2
  241. package/locales/en.js +8 -2
  242. package/locales/fr.js +8 -2
  243. package/locales/ja.js +8 -2
  244. package/locales/pt.js +8 -2
  245. package/locales/ru.js +8 -2
  246. package/locales/zh-TW.js +8 -2
  247. package/locales/zh.js +8 -2
  248. package/package.json +3 -3
  249. package/web-shell/assets/{arc-B0iTWRo2.js → arc-ByltRugA.js} +1 -1
  250. package/web-shell/assets/{architectureDiagram-3BPJPVTR-DSQP4-9D.js → architectureDiagram-3BPJPVTR-CCRTto5d.js} +1 -1
  251. package/web-shell/assets/{blockDiagram-GPEHLZMM-BNPVXVT3.js → blockDiagram-GPEHLZMM-Jfy36u1L.js} +1 -1
  252. package/web-shell/assets/{c4Diagram-AAUBKEIU-DEHfJFiD.js → c4Diagram-AAUBKEIU-4d5FfEZ0.js} +1 -1
  253. package/web-shell/assets/channel-4N2UIFcG.js +1 -0
  254. package/web-shell/assets/{chunk-2J33WTMH-VZ0uL1p9.js → chunk-2J33WTMH-BPwxCEro.js} +1 -1
  255. package/web-shell/assets/{chunk-4BX2VUAB-D5TKmvwG.js → chunk-4BX2VUAB-jY7ZmJWY.js} +1 -1
  256. package/web-shell/assets/{chunk-55IACEB6-BDW1Lcq-.js → chunk-55IACEB6-C98HgCsS.js} +1 -1
  257. package/web-shell/assets/{chunk-727SXJPM-Cj4h85iM.js → chunk-727SXJPM-cDu-ge-q.js} +1 -1
  258. package/web-shell/assets/{chunk-AQP2D5EJ-5LeqiOhZ.js → chunk-AQP2D5EJ-BKdJwxXK.js} +1 -1
  259. package/web-shell/assets/{chunk-FMBD7UC4-BaTgsco7.js → chunk-FMBD7UC4-DnuxqwMu.js} +1 -1
  260. package/web-shell/assets/{chunk-ND2GUHAM-t3uGlIUk.js → chunk-ND2GUHAM-C4fZNPv0.js} +1 -1
  261. package/web-shell/assets/{chunk-QZHKN3VN-rOnNXL2Q.js → chunk-QZHKN3VN-Cf4XWOmz.js} +1 -1
  262. package/web-shell/assets/classDiagram-4FO5ZUOK-Q4dYOtsh.js +1 -0
  263. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Q4dYOtsh.js +1 -0
  264. package/web-shell/assets/{cose-bilkent-S5V4N54A-CcqXykgA.js → cose-bilkent-S5V4N54A-C82mFiqj.js} +1 -1
  265. package/web-shell/assets/{dagre-BM42HDAG-Dkjrchoy.js → dagre-BM42HDAG-Df8KACER.js} +1 -1
  266. package/web-shell/assets/{diagram-2AECGRRQ-B6lcra9M.js → diagram-2AECGRRQ-EzNs7s_2.js} +1 -1
  267. package/web-shell/assets/{diagram-5GNKFQAL-bAIzq3PT.js → diagram-5GNKFQAL-BRLNvreg.js} +1 -1
  268. package/web-shell/assets/{diagram-KO2AKTUF-G9MAZDNW.js → diagram-KO2AKTUF-2HLYHRjC.js} +1 -1
  269. package/web-shell/assets/{diagram-LMA3HP47-DVLF1uWZ.js → diagram-LMA3HP47-DeH0NzSp.js} +1 -1
  270. package/web-shell/assets/{diagram-OG6HWLK6-Cf7y20Tc.js → diagram-OG6HWLK6-k5Gn47-G.js} +1 -1
  271. package/web-shell/assets/{erDiagram-TEJ5UH35-C7ETZB3o.js → erDiagram-TEJ5UH35-gPHFo79f.js} +1 -1
  272. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cl2xgL6J.js → flowDiagram-I6XJVG4X-DYBOiTRW.js} +1 -1
  273. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BgjbMs3q.js → ganttDiagram-6RSMTGT7-cxjAuic9.js} +1 -1
  274. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-JVX34Omm.js → gitGraphDiagram-PVQCEYII-3nPqpmCP.js} +1 -1
  275. package/web-shell/assets/index-B7jzUZ_s.css +5 -0
  276. package/web-shell/assets/{index-BG7Zc4f_.js → index-Cl8d-1bK.js} +1 -1
  277. package/web-shell/assets/index-gE8OWwj_.js +1197 -0
  278. package/web-shell/assets/{infoDiagram-5YYISTIA-3NYyMeZU.js → infoDiagram-5YYISTIA-Dph21pR5.js} +1 -1
  279. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-C03VCu-U.js → ishikawaDiagram-YF4QCWOH-Cjg1hSaG.js} +1 -1
  280. package/web-shell/assets/{journeyDiagram-JHISSGLW-C9PuBRZW.js → journeyDiagram-JHISSGLW-CR-IzvnU.js} +1 -1
  281. package/web-shell/assets/{kanban-definition-UN3LZRKU-C3LvioWR.js → kanban-definition-UN3LZRKU-BYmuybuC.js} +1 -1
  282. package/web-shell/assets/{linear-Du6Yw8N_.js → linear-CngEEoy8.js} +1 -1
  283. package/web-shell/assets/{mermaid.core-BXY5D2-X.js → mermaid.core-G6fbZRPf.js} +5 -5
  284. package/web-shell/assets/{mindmap-definition-RKZ34NQL-2UrHLaDp.js → mindmap-definition-RKZ34NQL-BtnqnUwJ.js} +1 -1
  285. package/web-shell/assets/{pieDiagram-4H26LBE5-dC03ml45.js → pieDiagram-4H26LBE5-XTq6UHIA.js} +1 -1
  286. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CD6jARrp.js → quadrantDiagram-W4KKPZXB-D1J5PrsS.js} +1 -1
  287. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BrK8aXfv.js → requirementDiagram-4Y6WPE33-CLcBUy3t.js} +1 -1
  288. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-B5Vitki_.js → sankeyDiagram-5OEKKPKP-iwKV02_6.js} +1 -1
  289. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CBy2t6Bo.js → sequenceDiagram-3UESZ5HK-7NFYQcEX.js} +1 -1
  290. package/web-shell/assets/{stateDiagram-AJRCARHV-Enrka6T2.js → stateDiagram-AJRCARHV-Bvm4Wih6.js} +1 -1
  291. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-xXU_zO2Z.js +1 -0
  292. package/web-shell/assets/{timeline-definition-PNZ67QCA-CwFq78ss.js → timeline-definition-PNZ67QCA-B4FZFE9O.js} +1 -1
  293. package/web-shell/assets/{vennDiagram-CIIHVFJN-BkOidM0g.js → vennDiagram-CIIHVFJN-CvMBpmtL.js} +1 -1
  294. package/web-shell/assets/{wardley-L42UT6IY-D_j13hQW.js → wardley-L42UT6IY-E3ag2327.js} +1 -1
  295. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-7EveB1w6.js → wardleyDiagram-YWT4CUSO-BEXWlgxC.js} +1 -1
  296. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DRkBhMXr.js → xychartDiagram-2RQKCTM6-CICK05gI.js} +1 -1
  297. package/web-shell/index.html +2 -2
  298. package/chunks/agent-headless-WVJCQ27D.js +0 -61
  299. package/chunks/chunk-CPCVCKKF.js +0 -358
  300. package/chunks/chunk-P64HXIC5.js +0 -74712
  301. package/chunks/chunk-RF34V75B.js +0 -45
  302. package/chunks/chunk-W7FJ3N32.js +0 -49
  303. package/chunks/contextCommand-HTRJJYNE.js +0 -66
  304. package/chunks/daemon-status-provider-67EKK6S3.js +0 -74
  305. package/chunks/handleAutoUpdate-OOKBP5VD.js +0 -67
  306. package/chunks/initializer-NWALZGQ5.js +0 -72
  307. package/chunks/installationInfo-Y3M433E7.js +0 -66
  308. package/chunks/list-CQDDWHTS.js +0 -75
  309. package/chunks/loadedSettingsAdapter-I5KG37EI.js +0 -69
  310. package/chunks/mcp-24HHCBSP.js +0 -69
  311. package/chunks/nonInteractiveCli-GVF2XDJT.js +0 -126
  312. package/chunks/ripGrep-Y2XW4EFC.js +0 -59
  313. package/chunks/theme-manager-QOUMDWMP.js +0 -63
  314. package/chunks/total-session-admission-HWVCZ2WR.js +0 -69
  315. package/chunks/workspace-providers-status-ZTW2B5QU.js +0 -72
  316. package/chunks/workspace-registry-R54M5O3W.js +0 -73
  317. package/chunks/workspace-service-WYLRGM4A.js +0 -84
  318. package/chunks/workspace-skills-status-NN5QFU3A.js +0 -71
  319. package/chunks/write-file-EAT3CHUK.js +0 -596
  320. package/web-shell/assets/channel-tVz-qNSq.js +0 -1
  321. package/web-shell/assets/classDiagram-4FO5ZUOK-CWuaBxYV.js +0 -1
  322. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CWuaBxYV.js +0 -1
  323. package/web-shell/assets/index-48bIcdqF.js +0 -1197
  324. package/web-shell/assets/index-BI-JAO07.css +0 -5
  325. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DUtYfXpW.js +0 -1
  326. package/chunks/{chunk-H24SOJIQ.js → chunk-D7WXIW7H.js} +3 -3
  327. package/chunks/{chunk-PEJWA3QQ.js → chunk-QZJY47IE.js} +5 -5
  328. package/chunks/{dist-XBJVSWS2.js → dist-HMU6CYS4.js} +1 -1
@@ -1,596 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- checkTeamMemorySecrets
5
- } from "./chunk-RF34V75B.js";
6
- import {
7
- CommitAttributionService,
8
- FileEncoding,
9
- StructuredToolError,
10
- checkPriorRead,
11
- createPatchSmart,
12
- detectLineEnding,
13
- getDiffStat,
14
- needsUtf8Bom
15
- } from "./chunk-NO6XTCYT.js";
16
- import "./chunk-5M6IDOMF.js";
17
- import "./chunk-T4TZQJ7W.js";
18
- import "./chunk-H6XPXXMH.js";
19
- import "./chunk-EAUYY7SS.js";
20
- import "./chunk-FSL5W5TI.js";
21
- import "./chunk-OONJNQ42.js";
22
- import "./chunk-D2VIDMVM.js";
23
- import "./chunk-E2UVIFI2.js";
24
- import "./chunk-XU457J4V.js";
25
- import "./chunk-VDDGDZMA.js";
26
- import "./chunk-EIAK6Q2B.js";
27
- import "./chunk-SZRN75WQ.js";
28
- import "./chunk-HTO4JFDZ.js";
29
- import "./chunk-CPBF7KYF.js";
30
- import "./chunk-CPCVCKKF.js";
31
- import "./chunk-6AM5D4ME.js";
32
- import "./chunk-G45X5TRN.js";
33
- import "./chunk-PBATSWUQ.js";
34
- import "./chunk-ZEOZL37W.js";
35
- import "./chunk-OOCI5VVU.js";
36
- import "./chunk-25Y6JSH2.js";
37
- import "./chunk-246TW4IX.js";
38
- import "./chunk-JESCGQM3.js";
39
- import {
40
- FileOperationEvent,
41
- fileExists,
42
- getLanguageFromFilePath,
43
- getSpecificMimeType,
44
- logFileOperation
45
- } from "./chunk-P64HXIC5.js";
46
- import "./chunk-4WKAA4KS.js";
47
- import "./chunk-CR3C7WXL.js";
48
- import "./chunk-VGC4I5JJ.js";
49
- import {
50
- isAnyAutoMemPath,
51
- isTeamAutoMemPath
52
- } from "./chunk-JD3MKVKL.js";
53
- import "./chunk-UEY4AYUL.js";
54
- import "./chunk-BDBMYST4.js";
55
- import "./chunk-EZVDJFZ7.js";
56
- import {
57
- BaseDeclarativeTool,
58
- BaseToolInvocation,
59
- ToolDisplayNames,
60
- ToolNames
61
- } from "./chunk-OP4MOGXF.js";
62
- import "./chunk-XVNQMZ2I.js";
63
- import "./chunk-FEOZBUMT.js";
64
- import "./chunk-DJ2GSRLV.js";
65
- import "./chunk-6EFTQYW7.js";
66
- import "./chunk-FZVSFBNW.js";
67
- import "./chunk-A4UCTEB5.js";
68
- import "./chunk-XWRJCPHC.js";
69
- import "./chunk-TYQMGACW.js";
70
- import "./chunk-TYAMGABM.js";
71
- import "./chunk-FCMNKVXT.js";
72
- import {
73
- createDebugLogger,
74
- getErrorMessage,
75
- isNodeError,
76
- makeRelative,
77
- shortenPath,
78
- unescapePath
79
- } from "./chunk-C27BYUX6.js";
80
- import "./chunk-75DOP5OR.js";
81
- import "./chunk-DMTGGOSA.js";
82
- import "./chunk-YQ3U5MUC.js";
83
- import "./chunk-TB6UDU4T.js";
84
- import {
85
- init_esbuild_shims
86
- } from "./chunk-5O2XNYP6.js";
87
- import {
88
- __name
89
- } from "./chunk-J2S4EL5Y.js";
90
-
91
- // packages/core/src/tools/write-file.ts
92
- init_esbuild_shims();
93
- import fs from "node:fs";
94
- import path from "node:path";
95
- var debugLogger = createDebugLogger("WRITE_FILE");
96
- var ARTIFACT_LIKE_EXTENSIONS = /* @__PURE__ */ new Set([
97
- ".htm",
98
- ".html",
99
- ".ipynb",
100
- ".jpeg",
101
- ".jpg",
102
- ".pdf",
103
- ".png",
104
- ".svg",
105
- ".webp"
106
- ]);
107
- var WriteFileToolInvocation = class extends BaseToolInvocation {
108
- constructor(config, params) {
109
- super(params);
110
- this.config = config;
111
- }
112
- static {
113
- __name(this, "WriteFileToolInvocation");
114
- }
115
- toolLocations() {
116
- return [{ path: this.params.file_path }];
117
- }
118
- getDescription() {
119
- const relativePath = makeRelative(
120
- this.params.file_path,
121
- this.config.getTargetDir()
122
- );
123
- return `Writing to ${shortenPath(relativePath)}`;
124
- }
125
- /**
126
- * Write operations always need user confirmation, except for the private
127
- * managed auto-memory files (user/project) which are written autonomously.
128
- * Team memory is shared and committed to the repo, so it is NOT auto-allowed
129
- * like the private tiers — writes default to 'ask'. (In AUTO_EDIT/YOLO the
130
- * user has globally opted into auto-approval; team writes still surface in the
131
- * git diff for review before commit.)
132
- */
133
- async getDefaultPermission() {
134
- const projectRoot = this.config.getProjectRoot();
135
- const filePath = path.resolve(this.params.file_path);
136
- if (isTeamAutoMemPath(filePath, projectRoot)) {
137
- return "ask";
138
- }
139
- if (isAnyAutoMemPath(filePath, projectRoot)) {
140
- return "allow";
141
- }
142
- return "ask";
143
- }
144
- /**
145
- * Constructs the write-file diff confirmation details.
146
- */
147
- async getConfirmationDetails(_abortSignal) {
148
- let originalContent = "";
149
- let fileExists2 = await fileExists(this.params.file_path);
150
- if (!this.config.getFileReadCacheDisabled()) {
151
- const decision = await checkPriorRead(
152
- this.config.getFileReadCache(),
153
- this.params.file_path,
154
- "overwriting"
155
- );
156
- if (!decision.ok) {
157
- throw new StructuredToolError(decision.rawMessage, decision.type);
158
- }
159
- }
160
- if (fileExists2) {
161
- try {
162
- const { content } = await this.config.getFileSystemService().readTextFile({ path: this.params.file_path });
163
- originalContent = content;
164
- } catch (err) {
165
- if (isNodeError(err) && err.code === "ENOENT") {
166
- fileExists2 = false;
167
- } else {
168
- throw new Error(
169
- `Error reading existing file for confirmation: ${getErrorMessage(err)}`
170
- );
171
- }
172
- }
173
- }
174
- if (fileExists2 && !this.config.getFileReadCacheDisabled()) {
175
- const postDecision = await checkPriorRead(
176
- this.config.getFileReadCache(),
177
- this.params.file_path,
178
- "overwriting",
179
- { expectExisting: true }
180
- );
181
- if (!postDecision.ok) {
182
- debugLogger.warn("post-read TOCTOU rejection (confirmation)", {
183
- path: this.params.file_path,
184
- reason: postDecision.type
185
- });
186
- throw new StructuredToolError(
187
- postDecision.rawMessage,
188
- postDecision.type
189
- );
190
- }
191
- }
192
- const relativePath = makeRelative(
193
- this.params.file_path,
194
- this.config.getTargetDir()
195
- );
196
- const fileName = path.basename(this.params.file_path);
197
- const fileDiff = createPatchSmart(
198
- fileName,
199
- originalContent,
200
- this.params.content,
201
- "Current",
202
- "Proposed"
203
- );
204
- const confirmationDetails = {
205
- type: "edit",
206
- title: `Confirm Write: ${shortenPath(relativePath)}`,
207
- fileName,
208
- filePath: this.params.file_path,
209
- fileDiff,
210
- originalContent,
211
- newContent: this.params.content,
212
- onConfirm: /* @__PURE__ */ __name(async (outcome) => {
213
- if (outcome === "proceed_always" /* ProceedAlways */) {
214
- this.config.setApprovalMode("auto-edit" /* AUTO_EDIT */);
215
- }
216
- }, "onConfirm")
217
- };
218
- return confirmationDetails;
219
- }
220
- async execute(_abortSignal) {
221
- const { file_path, content, ai_proposed_content, modified_by_user } = this.params;
222
- let fileExists2 = await fileExists(file_path);
223
- let originalContent = "";
224
- let useBOM = false;
225
- let detectedEncoding;
226
- let detectedLineEnding;
227
- const dirName = path.dirname(file_path);
228
- const teamMemoryError = checkTeamMemorySecrets(
229
- file_path,
230
- content,
231
- this.config.getProjectRoot()
232
- );
233
- if (teamMemoryError) {
234
- return {
235
- llmContent: `[ERROR: ${teamMemoryError}]`,
236
- returnDisplay: teamMemoryError,
237
- error: {
238
- message: teamMemoryError,
239
- type: "invalid_tool_params" /* INVALID_TOOL_PARAMS */
240
- }
241
- };
242
- }
243
- if (!this.config.getFileReadCacheDisabled()) {
244
- const decision = await checkPriorRead(
245
- this.config.getFileReadCache(),
246
- file_path,
247
- "overwriting"
248
- );
249
- if (!decision.ok) {
250
- return {
251
- llmContent: decision.rawMessage,
252
- returnDisplay: `Error: ${decision.displayMessage}`,
253
- error: {
254
- message: decision.rawMessage,
255
- type: decision.type
256
- }
257
- };
258
- }
259
- }
260
- if (fileExists2) {
261
- try {
262
- const fileInfo = await this.config.getFileSystemService().readTextFile({ path: file_path });
263
- if (fileInfo._meta?.bom !== void 0) {
264
- useBOM = fileInfo._meta.bom;
265
- } else {
266
- useBOM = fileInfo.content.length > 0 && fileInfo.content.codePointAt(0) === 65279;
267
- }
268
- detectedEncoding = fileInfo._meta?.encoding || "utf-8";
269
- detectedLineEnding = detectLineEnding(fileInfo.content);
270
- originalContent = fileInfo.content;
271
- fileExists2 = true;
272
- } catch (err) {
273
- if (isNodeError(err) && err.code === "ENOENT") {
274
- fileExists2 = false;
275
- } else {
276
- const error = {
277
- message: getErrorMessage(err),
278
- code: isNodeError(err) ? err.code : void 0
279
- };
280
- const errorMsg = error.code ? `Error checking existing file '${file_path}': ${error.message} (${error.code})` : `Error checking existing file: ${error.message}`;
281
- return {
282
- llmContent: errorMsg,
283
- returnDisplay: errorMsg,
284
- error: {
285
- message: errorMsg,
286
- type: "file_write_failure" /* FILE_WRITE_FAILURE */
287
- }
288
- };
289
- }
290
- }
291
- }
292
- if (fileExists2 && !this.config.getFileReadCacheDisabled()) {
293
- const postDecision = await checkPriorRead(
294
- this.config.getFileReadCache(),
295
- file_path,
296
- "overwriting",
297
- { expectExisting: true }
298
- );
299
- if (!postDecision.ok) {
300
- debugLogger.warn("post-read TOCTOU rejection (execute)", {
301
- path: file_path,
302
- reason: postDecision.type
303
- });
304
- return {
305
- llmContent: postDecision.rawMessage,
306
- returnDisplay: `Error: ${postDecision.displayMessage}`,
307
- error: {
308
- message: postDecision.rawMessage,
309
- type: postDecision.type
310
- }
311
- };
312
- }
313
- }
314
- if (!fileExists2) {
315
- const userEncoding = this.config.getDefaultFileEncoding();
316
- if (userEncoding === FileEncoding.UTF8_BOM) {
317
- useBOM = true;
318
- } else if (userEncoding === void 0) {
319
- useBOM = needsUtf8Bom(file_path);
320
- }
321
- detectedEncoding = void 0;
322
- }
323
- try {
324
- await this.config.getFileHistoryService().trackEdit(file_path);
325
- } catch {
326
- }
327
- if (!this.config.getFileReadCacheDisabled()) {
328
- const writeDecision = await checkPriorRead(
329
- this.config.getFileReadCache(),
330
- file_path,
331
- "overwriting",
332
- // If the file existed when we read it (`fileExists` is still
333
- // true after readTextFile), ENOENT here means the original
334
- // target disappeared between the post-read check and now —
335
- // reject rather than fall through and silently re-create the
336
- // file from stale bytes. For new-file creation
337
- // (`fileExists === false`), ENOENT is the expected pre-write
338
- // state (ok:true → writeTextFile creates).
339
- { expectExisting: fileExists2 }
340
- );
341
- if (!writeDecision.ok) {
342
- debugLogger.warn("pre-write TOCTOU rejection", {
343
- path: file_path,
344
- reason: writeDecision.type
345
- });
346
- return {
347
- llmContent: writeDecision.rawMessage,
348
- returnDisplay: `Error: ${writeDecision.displayMessage}`,
349
- error: {
350
- message: writeDecision.rawMessage,
351
- type: writeDecision.type
352
- }
353
- };
354
- }
355
- }
356
- if (!fileExists2) {
357
- fs.mkdirSync(dirName, { recursive: true });
358
- }
359
- try {
360
- await this.config.getFileSystemService().writeTextFile({
361
- path: file_path,
362
- content,
363
- _meta: {
364
- bom: useBOM,
365
- encoding: detectedEncoding,
366
- lineEnding: detectedLineEnding
367
- }
368
- });
369
- if (!modified_by_user) {
370
- CommitAttributionService.getInstance().recordEdit(
371
- file_path,
372
- fileExists2 ? originalContent : null,
373
- content
374
- );
375
- }
376
- try {
377
- const postWriteStats = fs.statSync(file_path);
378
- this.config.getFileReadCache().recordWrite(file_path, postWriteStats);
379
- } catch {
380
- }
381
- const fileName = path.basename(file_path);
382
- const currentContentForDiff = originalContent;
383
- const fileDiff = createPatchSmart(
384
- fileName,
385
- currentContentForDiff,
386
- content,
387
- "Original",
388
- "Written"
389
- );
390
- const originallyProposedContent = ai_proposed_content || content;
391
- const diffStat = getDiffStat(
392
- fileName,
393
- currentContentForDiff,
394
- originallyProposedContent,
395
- content
396
- );
397
- const llmSuccessMessageParts = [
398
- !fileExists2 ? `Successfully created and wrote to new file: ${file_path}.` : `Successfully overwrote file: ${file_path}.`
399
- ];
400
- if (modified_by_user) {
401
- llmSuccessMessageParts.push(
402
- `User modified the \`content\` to be: ${content}`
403
- );
404
- }
405
- const artifactReminder = buildRecordArtifactReminder(
406
- this.config,
407
- file_path
408
- );
409
- if (artifactReminder) {
410
- llmSuccessMessageParts.push(artifactReminder);
411
- }
412
- const mimetype = getSpecificMimeType(file_path);
413
- const programmingLanguage = getLanguageFromFilePath(file_path);
414
- const extension = path.extname(file_path);
415
- const operation = !fileExists2 ? "create" /* CREATE */ : "update" /* UPDATE */;
416
- const lineCount = content.split("\n").length;
417
- logFileOperation(
418
- this.config,
419
- new FileOperationEvent(
420
- WriteFileTool.Name,
421
- operation,
422
- lineCount,
423
- mimetype,
424
- extension,
425
- programmingLanguage
426
- )
427
- );
428
- const displayResult = {
429
- fileDiff,
430
- fileName,
431
- originalContent,
432
- newContent: content,
433
- diffStat
434
- };
435
- return {
436
- llmContent: llmSuccessMessageParts.join(" "),
437
- returnDisplay: displayResult
438
- };
439
- } catch (error) {
440
- let errorMsg;
441
- let errorType = "file_write_failure" /* FILE_WRITE_FAILURE */;
442
- if (isNodeError(error)) {
443
- errorMsg = `Error writing to file '${file_path}': ${error.message} (${error.code})`;
444
- if (error.code === "EACCES") {
445
- errorMsg = `Permission denied writing to file: ${file_path} (${error.code})`;
446
- errorType = "permission_denied" /* PERMISSION_DENIED */;
447
- } else if (error.code === "ENOSPC") {
448
- errorMsg = `No space left on device: ${file_path} (${error.code})`;
449
- errorType = "no_space_left" /* NO_SPACE_LEFT */;
450
- } else if (error.code === "EISDIR") {
451
- errorMsg = `Target is a directory, not a file: ${file_path} (${error.code})`;
452
- errorType = "target_is_directory" /* TARGET_IS_DIRECTORY */;
453
- }
454
- if (this.config.getDebugMode() && error.stack) {
455
- debugLogger.debug("Write file error stack:", error.stack);
456
- }
457
- } else {
458
- errorMsg = `Error writing to file: ${getErrorMessage(error)}`;
459
- }
460
- return {
461
- llmContent: errorMsg,
462
- returnDisplay: errorMsg,
463
- error: {
464
- message: errorMsg,
465
- type: errorType
466
- }
467
- };
468
- }
469
- }
470
- };
471
- function buildRecordArtifactReminder(config, filePath) {
472
- if (!config.isRecordArtifactEnabled()) {
473
- return null;
474
- }
475
- if (!ARTIFACT_LIKE_EXTENSIONS.has(path.extname(filePath).toLowerCase())) {
476
- return null;
477
- }
478
- const relativePath = path.relative(config.getTargetDir(), filePath);
479
- if (!relativePath || relativePath === ".." || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath)) {
480
- return null;
481
- }
482
- const workspacePath = relativePath.split(path.sep).join("/");
483
- 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.`;
484
- }
485
- __name(buildRecordArtifactReminder, "buildRecordArtifactReminder");
486
- var WriteFileTool = class _WriteFileTool extends BaseDeclarativeTool {
487
- constructor(config) {
488
- super(
489
- _WriteFileTool.Name,
490
- ToolDisplayNames.WRITE_FILE,
491
- `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.
492
-
493
- The user has the ability to modify \`content\`. If modified, this will be stated in the response.`,
494
- "edit" /* Edit */,
495
- {
496
- properties: {
497
- file_path: {
498
- description: "The absolute path to the file to write to (e.g., '/home/user/project/file.txt'). Relative paths are not supported.",
499
- type: "string"
500
- },
501
- content: {
502
- description: "The content to write to the file.",
503
- type: "string"
504
- }
505
- },
506
- required: ["file_path", "content"],
507
- type: "object"
508
- }
509
- );
510
- this.config = config;
511
- }
512
- static {
513
- __name(this, "WriteFileTool");
514
- }
515
- static Name = ToolNames.WRITE_FILE;
516
- validateToolParamValues(params) {
517
- const filePath = unescapePath(params.file_path.trim());
518
- params.file_path = filePath;
519
- if (!filePath) {
520
- return `Missing or empty "file_path"`;
521
- }
522
- if (!path.isAbsolute(filePath)) {
523
- return `File path must be absolute: ${filePath}`;
524
- }
525
- try {
526
- if (fs.existsSync(filePath)) {
527
- const stats = fs.lstatSync(filePath);
528
- if (stats.isDirectory()) {
529
- return `Path is a directory, not a file: ${filePath}`;
530
- }
531
- }
532
- } catch (statError) {
533
- return `Error accessing path properties for validation: ${filePath}. Reason: ${getErrorMessage(
534
- statError
535
- )}`;
536
- }
537
- const teamMemoryError = checkTeamMemorySecrets(
538
- filePath,
539
- params.content ?? "",
540
- this.config.getProjectRoot()
541
- );
542
- if (teamMemoryError) {
543
- return teamMemoryError;
544
- }
545
- return null;
546
- }
547
- createInvocation(params) {
548
- return new WriteFileToolInvocation(this.config, params);
549
- }
550
- toAutoClassifierInput(params) {
551
- const content = params.content ?? "";
552
- return {
553
- file_path: params.file_path,
554
- byte_count: Buffer.byteLength(content, "utf8"),
555
- content_preview: content.slice(0, 300),
556
- content_truncated: content.length > 300
557
- };
558
- }
559
- getModifyContext(_abortSignal) {
560
- return {
561
- getFilePath: /* @__PURE__ */ __name((params) => params.file_path, "getFilePath"),
562
- getCurrentContent: /* @__PURE__ */ __name(async (params) => {
563
- const fileExists2 = await fileExists(params.file_path);
564
- if (fileExists2) {
565
- try {
566
- const { content } = await this.config.getFileSystemService().readTextFile({ path: params.file_path });
567
- return content;
568
- } catch (err) {
569
- if (!isNodeError(err) || err.code !== "ENOENT") throw err;
570
- return "";
571
- }
572
- } else {
573
- return "";
574
- }
575
- }, "getCurrentContent"),
576
- getProposedContent: /* @__PURE__ */ __name(async (params) => params.content, "getProposedContent"),
577
- createUpdatedParams: /* @__PURE__ */ __name((_oldContent, modifiedProposedContent, originalParams) => {
578
- const content = originalParams.content;
579
- return {
580
- ...originalParams,
581
- ai_proposed_content: content,
582
- content: modifiedProposedContent,
583
- modified_by_user: true
584
- };
585
- }, "createUpdatedParams")
586
- };
587
- }
588
- };
589
- export {
590
- WriteFileTool
591
- };
592
- /**
593
- * @license
594
- * Copyright 2025 Google LLC
595
- * SPDX-License-Identifier: Apache-2.0
596
- */
@@ -1 +0,0 @@
1
- import{U as a,D as n}from"./mermaid.core-BXY5D2-X.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-Cj4h85iM.js";import{_ as i}from"./mermaid.core-BXY5D2-X.js";import"./chunk-FMBD7UC4-BaTgsco7.js";import"./chunk-ND2GUHAM-t3uGlIUk.js";import"./chunk-55IACEB6-BDW1Lcq-.js";import"./chunk-2J33WTMH-VZ0uL1p9.js";import"./index-48bIcdqF.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-Cj4h85iM.js";import{_ as i}from"./mermaid.core-BXY5D2-X.js";import"./chunk-FMBD7UC4-BaTgsco7.js";import"./chunk-ND2GUHAM-t3uGlIUk.js";import"./chunk-55IACEB6-BDW1Lcq-.js";import"./chunk-2J33WTMH-VZ0uL1p9.js";import"./index-48bIcdqF.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};