@tencent-ai/codebuddy-code 2.67.0-next.ed1b89f.20260329 → 2.68.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 (458) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/codebuddy-headless.js +53 -53
  3. package/dist/codebuddy.js +93 -64
  4. package/dist/web-ui/assets/index-BoMlEqUE.js +439 -0
  5. package/dist/web-ui/assets/index-Dt1puyHn.css +32 -0
  6. package/dist/web-ui/docs/cn/cli/acp.md +152 -0
  7. package/dist/web-ui/docs/cn/cli/agent-teams.md +327 -0
  8. package/dist/web-ui/docs/cn/cli/bash-sandboxing.md +290 -0
  9. package/dist/web-ui/docs/cn/cli/best-practices.md +554 -0
  10. package/dist/web-ui/docs/cn/cli/channels-reference.md +293 -0
  11. package/dist/web-ui/docs/cn/cli/channels.md +215 -0
  12. package/dist/web-ui/docs/cn/cli/checkpointing.md +51 -0
  13. package/dist/web-ui/docs/cn/cli/cli-reference.md +187 -0
  14. package/dist/web-ui/docs/cn/cli/common-workflows.md +1013 -0
  15. package/dist/web-ui/docs/cn/cli/costs.md +174 -0
  16. package/dist/web-ui/docs/cn/cli/devcontainer.md +553 -0
  17. package/dist/web-ui/docs/cn/cli/env-vars.md +326 -0
  18. package/dist/web-ui/docs/cn/cli/gitlab-ci-cd.md +357 -0
  19. package/dist/web-ui/docs/cn/cli/headless.md +258 -0
  20. package/dist/web-ui/docs/cn/cli/hooks-guide.md +9 -0
  21. package/dist/web-ui/docs/cn/cli/hooks.md +805 -0
  22. package/dist/web-ui/docs/cn/cli/iam.md +530 -0
  23. package/dist/web-ui/docs/cn/cli/ide-integrations.md +92 -0
  24. package/dist/web-ui/docs/cn/cli/installation.md +291 -0
  25. package/dist/web-ui/docs/cn/cli/interactive-mode.md +233 -0
  26. package/dist/web-ui/docs/cn/cli/mcp.md +739 -0
  27. package/dist/web-ui/docs/cn/cli/memory.md +436 -0
  28. package/dist/web-ui/docs/cn/cli/models.md +356 -0
  29. package/dist/web-ui/docs/cn/cli/overview.md +100 -0
  30. package/dist/web-ui/docs/cn/cli/plugin-marketplaces.md +533 -0
  31. package/dist/web-ui/docs/cn/cli/plugins-reference.md +774 -0
  32. package/dist/web-ui/docs/cn/cli/plugins.md +689 -0
  33. package/dist/web-ui/docs/cn/cli/quickstart.md +249 -0
  34. package/dist/web-ui/docs/cn/cli/release-notes/README.md +199 -0
  35. package/dist/web-ui/docs/cn/cli/release-notes/v2.10.0.md +23 -0
  36. package/dist/web-ui/docs/cn/cli/release-notes/v2.10.1.md +5 -0
  37. package/dist/web-ui/docs/cn/cli/release-notes/v2.11.0.md +24 -0
  38. package/dist/web-ui/docs/cn/cli/release-notes/v2.12.0.md +21 -0
  39. package/dist/web-ui/docs/cn/cli/release-notes/v2.13.0.md +20 -0
  40. package/dist/web-ui/docs/cn/cli/release-notes/v2.14.0.md +22 -0
  41. package/dist/web-ui/docs/cn/cli/release-notes/v2.14.1.md +8 -0
  42. package/dist/web-ui/docs/cn/cli/release-notes/v2.15.0.md +18 -0
  43. package/dist/web-ui/docs/cn/cli/release-notes/v2.15.1.md +11 -0
  44. package/dist/web-ui/docs/cn/cli/release-notes/v2.16.0.md +20 -0
  45. package/dist/web-ui/docs/cn/cli/release-notes/v2.17.0.md +29 -0
  46. package/dist/web-ui/docs/cn/cli/release-notes/v2.18.0.md +17 -0
  47. package/dist/web-ui/docs/cn/cli/release-notes/v2.19.0.md +11 -0
  48. package/dist/web-ui/docs/cn/cli/release-notes/v2.19.1.md +14 -0
  49. package/dist/web-ui/docs/cn/cli/release-notes/v2.19.2.md +11 -0
  50. package/dist/web-ui/docs/cn/cli/release-notes/v2.20.0.md +23 -0
  51. package/dist/web-ui/docs/cn/cli/release-notes/v2.20.1.md +15 -0
  52. package/dist/web-ui/docs/cn/cli/release-notes/v2.21.0.md +13 -0
  53. package/dist/web-ui/docs/cn/cli/release-notes/v2.22.0.md +16 -0
  54. package/dist/web-ui/docs/cn/cli/release-notes/v2.23.0.md +20 -0
  55. package/dist/web-ui/docs/cn/cli/release-notes/v2.23.2.md +5 -0
  56. package/dist/web-ui/docs/cn/cli/release-notes/v2.23.3.md +5 -0
  57. package/dist/web-ui/docs/cn/cli/release-notes/v2.23.4.md +15 -0
  58. package/dist/web-ui/docs/cn/cli/release-notes/v2.23.5.md +11 -0
  59. package/dist/web-ui/docs/cn/cli/release-notes/v2.24.0.md +17 -0
  60. package/dist/web-ui/docs/cn/cli/release-notes/v2.25.0.md +18 -0
  61. package/dist/web-ui/docs/cn/cli/release-notes/v2.25.1.md +21 -0
  62. package/dist/web-ui/docs/cn/cli/release-notes/v2.26.0.md +18 -0
  63. package/dist/web-ui/docs/cn/cli/release-notes/v2.27.0.md +16 -0
  64. package/dist/web-ui/docs/cn/cli/release-notes/v2.27.1.md +16 -0
  65. package/dist/web-ui/docs/cn/cli/release-notes/v2.27.2.md +7 -0
  66. package/dist/web-ui/docs/cn/cli/release-notes/v2.27.3.md +15 -0
  67. package/dist/web-ui/docs/cn/cli/release-notes/v2.28.0.md +26 -0
  68. package/dist/web-ui/docs/cn/cli/release-notes/v2.28.1.md +5 -0
  69. package/dist/web-ui/docs/cn/cli/release-notes/v2.29.0.md +35 -0
  70. package/dist/web-ui/docs/cn/cli/release-notes/v2.3.1.md +16 -0
  71. package/dist/web-ui/docs/cn/cli/release-notes/v2.30.0.md +19 -0
  72. package/dist/web-ui/docs/cn/cli/release-notes/v2.30.1.md +5 -0
  73. package/dist/web-ui/docs/cn/cli/release-notes/v2.31.0.md +51 -0
  74. package/dist/web-ui/docs/cn/cli/release-notes/v2.31.1.md +11 -0
  75. package/dist/web-ui/docs/cn/cli/release-notes/v2.31.2.md +16 -0
  76. package/dist/web-ui/docs/cn/cli/release-notes/v2.32.0.md +19 -0
  77. package/dist/web-ui/docs/cn/cli/release-notes/v2.33.0.md +28 -0
  78. package/dist/web-ui/docs/cn/cli/release-notes/v2.33.1.md +7 -0
  79. package/dist/web-ui/docs/cn/cli/release-notes/v2.36.3.md +17 -0
  80. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.0.md +15 -0
  81. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.1.md +15 -0
  82. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.10.md +5 -0
  83. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.11.md +8 -0
  84. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.12.md +14 -0
  85. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.13.md +11 -0
  86. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.14.md +24 -0
  87. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.15.md +11 -0
  88. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.16.md +9 -0
  89. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.17.md +5 -0
  90. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.18.md +9 -0
  91. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.19.md +5 -0
  92. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.2.md +28 -0
  93. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.20.md +8 -0
  94. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.3.md +22 -0
  95. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.4.md +19 -0
  96. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.5.md +5 -0
  97. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.6.md +5 -0
  98. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.7.md +5 -0
  99. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.8.md +5 -0
  100. package/dist/web-ui/docs/cn/cli/release-notes/v2.37.9.md +8 -0
  101. package/dist/web-ui/docs/cn/cli/release-notes/v2.38.0.md +22 -0
  102. package/dist/web-ui/docs/cn/cli/release-notes/v2.38.1.md +6 -0
  103. package/dist/web-ui/docs/cn/cli/release-notes/v2.38.2.md +9 -0
  104. package/dist/web-ui/docs/cn/cli/release-notes/v2.39.0.md +18 -0
  105. package/dist/web-ui/docs/cn/cli/release-notes/v2.4.0.md +19 -0
  106. package/dist/web-ui/docs/cn/cli/release-notes/v2.40.0.md +20 -0
  107. package/dist/web-ui/docs/cn/cli/release-notes/v2.40.1.md +6 -0
  108. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.0.md +15 -0
  109. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.1.md +6 -0
  110. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.2.md +5 -0
  111. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.3.md +8 -0
  112. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.4.md +5 -0
  113. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.5.md +10 -0
  114. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.6.md +9 -0
  115. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.7.md +14 -0
  116. package/dist/web-ui/docs/cn/cli/release-notes/v2.41.8.md +18 -0
  117. package/dist/web-ui/docs/cn/cli/release-notes/v2.42.0.md +39 -0
  118. package/dist/web-ui/docs/cn/cli/release-notes/v2.42.1.md +8 -0
  119. package/dist/web-ui/docs/cn/cli/release-notes/v2.42.3.md +18 -0
  120. package/dist/web-ui/docs/cn/cli/release-notes/v2.43.0.md +27 -0
  121. package/dist/web-ui/docs/cn/cli/release-notes/v2.43.1.md +27 -0
  122. package/dist/web-ui/docs/cn/cli/release-notes/v2.44.0.md +11 -0
  123. package/dist/web-ui/docs/cn/cli/release-notes/v2.44.1.md +22 -0
  124. package/dist/web-ui/docs/cn/cli/release-notes/v2.45.0.md +34 -0
  125. package/dist/web-ui/docs/cn/cli/release-notes/v2.45.1.md +7 -0
  126. package/dist/web-ui/docs/cn/cli/release-notes/v2.46.0.md +12 -0
  127. package/dist/web-ui/docs/cn/cli/release-notes/v2.47.0.md +20 -0
  128. package/dist/web-ui/docs/cn/cli/release-notes/v2.48.0.md +32 -0
  129. package/dist/web-ui/docs/cn/cli/release-notes/v2.48.1.md +11 -0
  130. package/dist/web-ui/docs/cn/cli/release-notes/v2.49.0.md +26 -0
  131. package/dist/web-ui/docs/cn/cli/release-notes/v2.49.1.md +14 -0
  132. package/dist/web-ui/docs/cn/cli/release-notes/v2.49.2.md +39 -0
  133. package/dist/web-ui/docs/cn/cli/release-notes/v2.49.3.md +7 -0
  134. package/dist/web-ui/docs/cn/cli/release-notes/v2.49.5.md +11 -0
  135. package/dist/web-ui/docs/cn/cli/release-notes/v2.49.6.md +9 -0
  136. package/dist/web-ui/docs/cn/cli/release-notes/v2.49.7.md +7 -0
  137. package/dist/web-ui/docs/cn/cli/release-notes/v2.5.0.md +24 -0
  138. package/dist/web-ui/docs/cn/cli/release-notes/v2.50.0.md +25 -0
  139. package/dist/web-ui/docs/cn/cli/release-notes/v2.50.1.md +9 -0
  140. package/dist/web-ui/docs/cn/cli/release-notes/v2.50.2.md +11 -0
  141. package/dist/web-ui/docs/cn/cli/release-notes/v2.50.3.md +5 -0
  142. package/dist/web-ui/docs/cn/cli/release-notes/v2.50.4.md +17 -0
  143. package/dist/web-ui/docs/cn/cli/release-notes/v2.50.5.md +16 -0
  144. package/dist/web-ui/docs/cn/cli/release-notes/v2.50.6.md +15 -0
  145. package/dist/web-ui/docs/cn/cli/release-notes/v2.50.7.md +15 -0
  146. package/dist/web-ui/docs/cn/cli/release-notes/v2.51.0.md +24 -0
  147. package/dist/web-ui/docs/cn/cli/release-notes/v2.51.1.md +17 -0
  148. package/dist/web-ui/docs/cn/cli/release-notes/v2.51.2.md +5 -0
  149. package/dist/web-ui/docs/cn/cli/release-notes/v2.52.0.md +30 -0
  150. package/dist/web-ui/docs/cn/cli/release-notes/v2.52.1.md +28 -0
  151. package/dist/web-ui/docs/cn/cli/release-notes/v2.52.2.md +12 -0
  152. package/dist/web-ui/docs/cn/cli/release-notes/v2.52.3.md +13 -0
  153. package/dist/web-ui/docs/cn/cli/release-notes/v2.52.4.md +27 -0
  154. package/dist/web-ui/docs/cn/cli/release-notes/v2.52.5.md +21 -0
  155. package/dist/web-ui/docs/cn/cli/release-notes/v2.52.6.md +7 -0
  156. package/dist/web-ui/docs/cn/cli/release-notes/v2.53.0.md +29 -0
  157. package/dist/web-ui/docs/cn/cli/release-notes/v2.54.0.md +26 -0
  158. package/dist/web-ui/docs/cn/cli/release-notes/v2.55.0.md +21 -0
  159. package/dist/web-ui/docs/cn/cli/release-notes/v2.55.1.md +13 -0
  160. package/dist/web-ui/docs/cn/cli/release-notes/v2.56.0.md +20 -0
  161. package/dist/web-ui/docs/cn/cli/release-notes/v2.56.1.md +5 -0
  162. package/dist/web-ui/docs/cn/cli/release-notes/v2.57.0.md +32 -0
  163. package/dist/web-ui/docs/cn/cli/release-notes/v2.57.1.md +10 -0
  164. package/dist/web-ui/docs/cn/cli/release-notes/v2.58.0.md +34 -0
  165. package/dist/web-ui/docs/cn/cli/release-notes/v2.59.0.md +28 -0
  166. package/dist/web-ui/docs/cn/cli/release-notes/v2.6.0.md +5 -0
  167. package/dist/web-ui/docs/cn/cli/release-notes/v2.6.1.md +10 -0
  168. package/dist/web-ui/docs/cn/cli/release-notes/v2.60.0.md +20 -0
  169. package/dist/web-ui/docs/cn/cli/release-notes/v2.61.0.md +29 -0
  170. package/dist/web-ui/docs/cn/cli/release-notes/v2.61.1.md +5 -0
  171. package/dist/web-ui/docs/cn/cli/release-notes/v2.61.2.md +6 -0
  172. package/dist/web-ui/docs/cn/cli/release-notes/v2.61.3.md +13 -0
  173. package/dist/web-ui/docs/cn/cli/release-notes/v2.62.0.md +21 -0
  174. package/dist/web-ui/docs/cn/cli/release-notes/v2.62.1.md +11 -0
  175. package/dist/web-ui/docs/cn/cli/release-notes/v2.63.0.md +19 -0
  176. package/dist/web-ui/docs/cn/cli/release-notes/v2.63.1.md +5 -0
  177. package/dist/web-ui/docs/cn/cli/release-notes/v2.63.2.md +7 -0
  178. package/dist/web-ui/docs/cn/cli/release-notes/v2.63.3.md +6 -0
  179. package/dist/web-ui/docs/cn/cli/release-notes/v2.63.4.md +8 -0
  180. package/dist/web-ui/docs/cn/cli/release-notes/v2.63.5.md +6 -0
  181. package/dist/web-ui/docs/cn/cli/release-notes/v2.64.0.md +37 -0
  182. package/dist/web-ui/docs/cn/cli/release-notes/v2.64.1.md +6 -0
  183. package/dist/web-ui/docs/cn/cli/release-notes/v2.64.2.md +11 -0
  184. package/dist/web-ui/docs/cn/cli/release-notes/v2.65.0.md +19 -0
  185. package/dist/web-ui/docs/cn/cli/release-notes/v2.65.1.md +11 -0
  186. package/dist/web-ui/docs/cn/cli/release-notes/v2.66.0.md +15 -0
  187. package/dist/web-ui/docs/cn/cli/release-notes/v2.66.1.md +14 -0
  188. package/dist/web-ui/docs/cn/cli/release-notes/v2.66.2.md +5 -0
  189. package/dist/web-ui/docs/cn/cli/release-notes/v2.67.0.md +33 -0
  190. package/dist/web-ui/docs/cn/cli/release-notes/v2.7.0.md +16 -0
  191. package/dist/web-ui/docs/cn/cli/release-notes/v2.8.0.md +18 -0
  192. package/dist/web-ui/docs/cn/cli/release-notes/v2.8.1.md +17 -0
  193. package/dist/web-ui/docs/cn/cli/release-notes/v2.8.2.md +5 -0
  194. package/dist/web-ui/docs/cn/cli/release-notes/v2.8.3.md +14 -0
  195. package/dist/web-ui/docs/cn/cli/release-notes/v2.8.4.md +9 -0
  196. package/dist/web-ui/docs/cn/cli/release-notes/v2.8.5.md +5 -0
  197. package/dist/web-ui/docs/cn/cli/release-notes/v2.8.6.md +14 -0
  198. package/dist/web-ui/docs/cn/cli/release-notes/v2.9.0.md +5 -0
  199. package/dist/web-ui/docs/cn/cli/remote-control.md +247 -0
  200. package/dist/web-ui/docs/cn/cli/sandboxing.md +316 -0
  201. package/dist/web-ui/docs/cn/cli/scheduled-tasks.md +161 -0
  202. package/dist/web-ui/docs/cn/cli/sdk-custom-tools.md +1195 -0
  203. package/dist/web-ui/docs/cn/cli/sdk-demos.md +347 -0
  204. package/dist/web-ui/docs/cn/cli/sdk-hooks.md +803 -0
  205. package/dist/web-ui/docs/cn/cli/sdk-mcp.md +643 -0
  206. package/dist/web-ui/docs/cn/cli/sdk-permissions.md +501 -0
  207. package/dist/web-ui/docs/cn/cli/sdk-python.md +783 -0
  208. package/dist/web-ui/docs/cn/cli/sdk-sessions.md +332 -0
  209. package/dist/web-ui/docs/cn/cli/sdk-typescript.md +759 -0
  210. package/dist/web-ui/docs/cn/cli/sdk.md +1105 -0
  211. package/dist/web-ui/docs/cn/cli/security.md +387 -0
  212. package/dist/web-ui/docs/cn/cli/settings.md +602 -0
  213. package/dist/web-ui/docs/cn/cli/skills.md +448 -0
  214. package/dist/web-ui/docs/cn/cli/slash-commands.md +397 -0
  215. package/dist/web-ui/docs/cn/cli/statusline.md +525 -0
  216. package/dist/web-ui/docs/cn/cli/sub-agents.md +634 -0
  217. package/dist/web-ui/docs/cn/cli/terminal-config.md +77 -0
  218. package/dist/web-ui/docs/cn/cli/tools-reference.md +99 -0
  219. package/dist/web-ui/docs/cn/cli/troubleshooting.md +190 -0
  220. package/dist/web-ui/docs/cn/cli/web-ui.md +164 -0
  221. package/dist/web-ui/docs/cn/cli/wecom-bot-setup.md +274 -0
  222. package/dist/web-ui/docs/cn/cli/worktree.md +660 -0
  223. package/dist/web-ui/docs/en/cli/acp.md +126 -0
  224. package/dist/web-ui/docs/en/cli/agent-teams.md +327 -0
  225. package/dist/web-ui/docs/en/cli/bash-sandboxing.md +357 -0
  226. package/dist/web-ui/docs/en/cli/best-practices.md +554 -0
  227. package/dist/web-ui/docs/en/cli/channels-reference.md +293 -0
  228. package/dist/web-ui/docs/en/cli/channels.md +215 -0
  229. package/dist/web-ui/docs/en/cli/checkpointing.md +53 -0
  230. package/dist/web-ui/docs/en/cli/cli-reference.md +187 -0
  231. package/dist/web-ui/docs/en/cli/common-workflows.md +1011 -0
  232. package/dist/web-ui/docs/en/cli/costs.md +174 -0
  233. package/dist/web-ui/docs/en/cli/devcontainer.md +553 -0
  234. package/dist/web-ui/docs/en/cli/env-vars.md +326 -0
  235. package/dist/web-ui/docs/en/cli/gitlab-ci-cd.md +357 -0
  236. package/dist/web-ui/docs/en/cli/headless.md +258 -0
  237. package/dist/web-ui/docs/en/cli/hooks-guide.md +9 -0
  238. package/dist/web-ui/docs/en/cli/hooks.md +801 -0
  239. package/dist/web-ui/docs/en/cli/iam.md +526 -0
  240. package/dist/web-ui/docs/en/cli/ide-integrations.md +92 -0
  241. package/dist/web-ui/docs/en/cli/installation.md +266 -0
  242. package/dist/web-ui/docs/en/cli/interactive-mode.md +233 -0
  243. package/dist/web-ui/docs/en/cli/mcp.md +739 -0
  244. package/dist/web-ui/docs/en/cli/memory.md +436 -0
  245. package/dist/web-ui/docs/en/cli/models.md +355 -0
  246. package/dist/web-ui/docs/en/cli/overview.md +100 -0
  247. package/dist/web-ui/docs/en/cli/plugin-marketplaces.md +534 -0
  248. package/dist/web-ui/docs/en/cli/plugins-reference.md +774 -0
  249. package/dist/web-ui/docs/en/cli/plugins.md +688 -0
  250. package/dist/web-ui/docs/en/cli/quickstart.md +249 -0
  251. package/dist/web-ui/docs/en/cli/release-notes/README.md +193 -0
  252. package/dist/web-ui/docs/en/cli/release-notes/v2.10.0.md +23 -0
  253. package/dist/web-ui/docs/en/cli/release-notes/v2.10.1.md +5 -0
  254. package/dist/web-ui/docs/en/cli/release-notes/v2.11.0.md +24 -0
  255. package/dist/web-ui/docs/en/cli/release-notes/v2.12.0.md +21 -0
  256. package/dist/web-ui/docs/en/cli/release-notes/v2.13.0.md +20 -0
  257. package/dist/web-ui/docs/en/cli/release-notes/v2.14.0.md +22 -0
  258. package/dist/web-ui/docs/en/cli/release-notes/v2.14.1.md +8 -0
  259. package/dist/web-ui/docs/en/cli/release-notes/v2.15.0.md +18 -0
  260. package/dist/web-ui/docs/en/cli/release-notes/v2.15.1.md +11 -0
  261. package/dist/web-ui/docs/en/cli/release-notes/v2.16.0.md +20 -0
  262. package/dist/web-ui/docs/en/cli/release-notes/v2.17.0.md +29 -0
  263. package/dist/web-ui/docs/en/cli/release-notes/v2.18.0.md +17 -0
  264. package/dist/web-ui/docs/en/cli/release-notes/v2.19.0.md +11 -0
  265. package/dist/web-ui/docs/en/cli/release-notes/v2.19.1.md +14 -0
  266. package/dist/web-ui/docs/en/cli/release-notes/v2.19.2.md +11 -0
  267. package/dist/web-ui/docs/en/cli/release-notes/v2.20.0.md +23 -0
  268. package/dist/web-ui/docs/en/cli/release-notes/v2.20.1.md +15 -0
  269. package/dist/web-ui/docs/en/cli/release-notes/v2.21.0.md +13 -0
  270. package/dist/web-ui/docs/en/cli/release-notes/v2.22.0.md +16 -0
  271. package/dist/web-ui/docs/en/cli/release-notes/v2.23.0.md +41 -0
  272. package/dist/web-ui/docs/en/cli/release-notes/v2.23.2.md +5 -0
  273. package/dist/web-ui/docs/en/cli/release-notes/v2.23.3.md +5 -0
  274. package/dist/web-ui/docs/en/cli/release-notes/v2.23.4.md +15 -0
  275. package/dist/web-ui/docs/en/cli/release-notes/v2.23.5.md +11 -0
  276. package/dist/web-ui/docs/en/cli/release-notes/v2.24.0.md +17 -0
  277. package/dist/web-ui/docs/en/cli/release-notes/v2.25.0.md +18 -0
  278. package/dist/web-ui/docs/en/cli/release-notes/v2.25.1.md +21 -0
  279. package/dist/web-ui/docs/en/cli/release-notes/v2.26.0.md +18 -0
  280. package/dist/web-ui/docs/en/cli/release-notes/v2.27.0.md +16 -0
  281. package/dist/web-ui/docs/en/cli/release-notes/v2.27.1.md +16 -0
  282. package/dist/web-ui/docs/en/cli/release-notes/v2.27.2.md +7 -0
  283. package/dist/web-ui/docs/en/cli/release-notes/v2.27.3.md +15 -0
  284. package/dist/web-ui/docs/en/cli/release-notes/v2.28.0.md +26 -0
  285. package/dist/web-ui/docs/en/cli/release-notes/v2.28.1.md +5 -0
  286. package/dist/web-ui/docs/en/cli/release-notes/v2.29.0.md +35 -0
  287. package/dist/web-ui/docs/en/cli/release-notes/v2.3.1.md +16 -0
  288. package/dist/web-ui/docs/en/cli/release-notes/v2.30.0.md +19 -0
  289. package/dist/web-ui/docs/en/cli/release-notes/v2.30.1.md +5 -0
  290. package/dist/web-ui/docs/en/cli/release-notes/v2.31.0.md +51 -0
  291. package/dist/web-ui/docs/en/cli/release-notes/v2.31.1.md +11 -0
  292. package/dist/web-ui/docs/en/cli/release-notes/v2.31.2.md +16 -0
  293. package/dist/web-ui/docs/en/cli/release-notes/v2.32.0.md +19 -0
  294. package/dist/web-ui/docs/en/cli/release-notes/v2.33.0.md +28 -0
  295. package/dist/web-ui/docs/en/cli/release-notes/v2.33.1.md +7 -0
  296. package/dist/web-ui/docs/en/cli/release-notes/v2.34.0.md +27 -0
  297. package/dist/web-ui/docs/en/cli/release-notes/v2.34.1.md +7 -0
  298. package/dist/web-ui/docs/en/cli/release-notes/v2.35.0.md +22 -0
  299. package/dist/web-ui/docs/en/cli/release-notes/v2.36.0.md +23 -0
  300. package/dist/web-ui/docs/en/cli/release-notes/v2.36.1.md +5 -0
  301. package/dist/web-ui/docs/en/cli/release-notes/v2.36.2.md +22 -0
  302. package/dist/web-ui/docs/en/cli/release-notes/v2.36.3.md +17 -0
  303. package/dist/web-ui/docs/en/cli/release-notes/v2.37.0.md +15 -0
  304. package/dist/web-ui/docs/en/cli/release-notes/v2.37.1.md +15 -0
  305. package/dist/web-ui/docs/en/cli/release-notes/v2.37.10.md +5 -0
  306. package/dist/web-ui/docs/en/cli/release-notes/v2.37.11.md +8 -0
  307. package/dist/web-ui/docs/en/cli/release-notes/v2.37.12.md +14 -0
  308. package/dist/web-ui/docs/en/cli/release-notes/v2.37.13.md +11 -0
  309. package/dist/web-ui/docs/en/cli/release-notes/v2.37.14.md +24 -0
  310. package/dist/web-ui/docs/en/cli/release-notes/v2.37.15.md +11 -0
  311. package/dist/web-ui/docs/en/cli/release-notes/v2.37.16.md +9 -0
  312. package/dist/web-ui/docs/en/cli/release-notes/v2.37.17.md +5 -0
  313. package/dist/web-ui/docs/en/cli/release-notes/v2.37.18.md +9 -0
  314. package/dist/web-ui/docs/en/cli/release-notes/v2.37.19.md +5 -0
  315. package/dist/web-ui/docs/en/cli/release-notes/v2.37.2.md +28 -0
  316. package/dist/web-ui/docs/en/cli/release-notes/v2.37.20.md +8 -0
  317. package/dist/web-ui/docs/en/cli/release-notes/v2.37.3.md +22 -0
  318. package/dist/web-ui/docs/en/cli/release-notes/v2.37.4.md +19 -0
  319. package/dist/web-ui/docs/en/cli/release-notes/v2.37.5.md +5 -0
  320. package/dist/web-ui/docs/en/cli/release-notes/v2.37.6.md +5 -0
  321. package/dist/web-ui/docs/en/cli/release-notes/v2.37.7.md +5 -0
  322. package/dist/web-ui/docs/en/cli/release-notes/v2.37.8.md +5 -0
  323. package/dist/web-ui/docs/en/cli/release-notes/v2.37.9.md +8 -0
  324. package/dist/web-ui/docs/en/cli/release-notes/v2.38.0.md +22 -0
  325. package/dist/web-ui/docs/en/cli/release-notes/v2.38.1.md +6 -0
  326. package/dist/web-ui/docs/en/cli/release-notes/v2.38.2.md +9 -0
  327. package/dist/web-ui/docs/en/cli/release-notes/v2.39.0.md +18 -0
  328. package/dist/web-ui/docs/en/cli/release-notes/v2.4.0.md +19 -0
  329. package/dist/web-ui/docs/en/cli/release-notes/v2.40.0.md +20 -0
  330. package/dist/web-ui/docs/en/cli/release-notes/v2.40.1.md +6 -0
  331. package/dist/web-ui/docs/en/cli/release-notes/v2.41.0.md +15 -0
  332. package/dist/web-ui/docs/en/cli/release-notes/v2.41.1.md +6 -0
  333. package/dist/web-ui/docs/en/cli/release-notes/v2.41.2.md +5 -0
  334. package/dist/web-ui/docs/en/cli/release-notes/v2.41.3.md +8 -0
  335. package/dist/web-ui/docs/en/cli/release-notes/v2.41.4.md +5 -0
  336. package/dist/web-ui/docs/en/cli/release-notes/v2.41.5.md +10 -0
  337. package/dist/web-ui/docs/en/cli/release-notes/v2.41.6.md +9 -0
  338. package/dist/web-ui/docs/en/cli/release-notes/v2.41.7.md +14 -0
  339. package/dist/web-ui/docs/en/cli/release-notes/v2.41.8.md +18 -0
  340. package/dist/web-ui/docs/en/cli/release-notes/v2.42.0.md +39 -0
  341. package/dist/web-ui/docs/en/cli/release-notes/v2.42.1.md +8 -0
  342. package/dist/web-ui/docs/en/cli/release-notes/v2.42.3.md +18 -0
  343. package/dist/web-ui/docs/en/cli/release-notes/v2.43.0.md +27 -0
  344. package/dist/web-ui/docs/en/cli/release-notes/v2.43.1.md +27 -0
  345. package/dist/web-ui/docs/en/cli/release-notes/v2.44.0.md +11 -0
  346. package/dist/web-ui/docs/en/cli/release-notes/v2.44.1.md +22 -0
  347. package/dist/web-ui/docs/en/cli/release-notes/v2.45.0.md +34 -0
  348. package/dist/web-ui/docs/en/cli/release-notes/v2.45.1.md +7 -0
  349. package/dist/web-ui/docs/en/cli/release-notes/v2.46.0.md +12 -0
  350. package/dist/web-ui/docs/en/cli/release-notes/v2.47.0.md +20 -0
  351. package/dist/web-ui/docs/en/cli/release-notes/v2.48.0.md +32 -0
  352. package/dist/web-ui/docs/en/cli/release-notes/v2.48.1.md +11 -0
  353. package/dist/web-ui/docs/en/cli/release-notes/v2.49.0.md +26 -0
  354. package/dist/web-ui/docs/en/cli/release-notes/v2.49.1.md +14 -0
  355. package/dist/web-ui/docs/en/cli/release-notes/v2.49.2.md +39 -0
  356. package/dist/web-ui/docs/en/cli/release-notes/v2.49.3.md +7 -0
  357. package/dist/web-ui/docs/en/cli/release-notes/v2.49.5.md +11 -0
  358. package/dist/web-ui/docs/en/cli/release-notes/v2.49.6.md +9 -0
  359. package/dist/web-ui/docs/en/cli/release-notes/v2.49.7.md +7 -0
  360. package/dist/web-ui/docs/en/cli/release-notes/v2.5.0.md +24 -0
  361. package/dist/web-ui/docs/en/cli/release-notes/v2.50.0.md +25 -0
  362. package/dist/web-ui/docs/en/cli/release-notes/v2.50.1.md +9 -0
  363. package/dist/web-ui/docs/en/cli/release-notes/v2.50.2.md +11 -0
  364. package/dist/web-ui/docs/en/cli/release-notes/v2.50.3.md +5 -0
  365. package/dist/web-ui/docs/en/cli/release-notes/v2.50.4.md +17 -0
  366. package/dist/web-ui/docs/en/cli/release-notes/v2.50.5.md +16 -0
  367. package/dist/web-ui/docs/en/cli/release-notes/v2.50.6.md +15 -0
  368. package/dist/web-ui/docs/en/cli/release-notes/v2.50.7.md +15 -0
  369. package/dist/web-ui/docs/en/cli/release-notes/v2.51.0.md +24 -0
  370. package/dist/web-ui/docs/en/cli/release-notes/v2.51.1.md +17 -0
  371. package/dist/web-ui/docs/en/cli/release-notes/v2.51.2.md +5 -0
  372. package/dist/web-ui/docs/en/cli/release-notes/v2.52.0.md +30 -0
  373. package/dist/web-ui/docs/en/cli/release-notes/v2.52.1.md +28 -0
  374. package/dist/web-ui/docs/en/cli/release-notes/v2.52.2.md +12 -0
  375. package/dist/web-ui/docs/en/cli/release-notes/v2.52.3.md +13 -0
  376. package/dist/web-ui/docs/en/cli/release-notes/v2.52.4.md +27 -0
  377. package/dist/web-ui/docs/en/cli/release-notes/v2.52.5.md +21 -0
  378. package/dist/web-ui/docs/en/cli/release-notes/v2.52.6.md +7 -0
  379. package/dist/web-ui/docs/en/cli/release-notes/v2.53.0.md +29 -0
  380. package/dist/web-ui/docs/en/cli/release-notes/v2.54.0.md +26 -0
  381. package/dist/web-ui/docs/en/cli/release-notes/v2.55.0.md +21 -0
  382. package/dist/web-ui/docs/en/cli/release-notes/v2.55.1.md +13 -0
  383. package/dist/web-ui/docs/en/cli/release-notes/v2.56.0.md +20 -0
  384. package/dist/web-ui/docs/en/cli/release-notes/v2.56.1.md +5 -0
  385. package/dist/web-ui/docs/en/cli/release-notes/v2.57.0.md +32 -0
  386. package/dist/web-ui/docs/en/cli/release-notes/v2.57.1.md +10 -0
  387. package/dist/web-ui/docs/en/cli/release-notes/v2.58.0.md +34 -0
  388. package/dist/web-ui/docs/en/cli/release-notes/v2.59.0.md +28 -0
  389. package/dist/web-ui/docs/en/cli/release-notes/v2.6.0.md +5 -0
  390. package/dist/web-ui/docs/en/cli/release-notes/v2.6.1.md +10 -0
  391. package/dist/web-ui/docs/en/cli/release-notes/v2.60.0.md +20 -0
  392. package/dist/web-ui/docs/en/cli/release-notes/v2.61.0.md +29 -0
  393. package/dist/web-ui/docs/en/cli/release-notes/v2.61.1.md +5 -0
  394. package/dist/web-ui/docs/en/cli/release-notes/v2.61.2.md +6 -0
  395. package/dist/web-ui/docs/en/cli/release-notes/v2.61.3.md +13 -0
  396. package/dist/web-ui/docs/en/cli/release-notes/v2.62.0.md +21 -0
  397. package/dist/web-ui/docs/en/cli/release-notes/v2.62.1.md +11 -0
  398. package/dist/web-ui/docs/en/cli/release-notes/v2.63.0.md +19 -0
  399. package/dist/web-ui/docs/en/cli/release-notes/v2.63.1.md +5 -0
  400. package/dist/web-ui/docs/en/cli/release-notes/v2.63.2.md +7 -0
  401. package/dist/web-ui/docs/en/cli/release-notes/v2.63.3.md +6 -0
  402. package/dist/web-ui/docs/en/cli/release-notes/v2.63.4.md +8 -0
  403. package/dist/web-ui/docs/en/cli/release-notes/v2.63.5.md +6 -0
  404. package/dist/web-ui/docs/en/cli/release-notes/v2.64.0.md +37 -0
  405. package/dist/web-ui/docs/en/cli/release-notes/v2.64.1.md +6 -0
  406. package/dist/web-ui/docs/en/cli/release-notes/v2.64.2.md +11 -0
  407. package/dist/web-ui/docs/en/cli/release-notes/v2.65.0.md +19 -0
  408. package/dist/web-ui/docs/en/cli/release-notes/v2.65.1.md +11 -0
  409. package/dist/web-ui/docs/en/cli/release-notes/v2.66.0.md +15 -0
  410. package/dist/web-ui/docs/en/cli/release-notes/v2.66.1.md +14 -0
  411. package/dist/web-ui/docs/en/cli/release-notes/v2.66.2.md +5 -0
  412. package/dist/web-ui/docs/en/cli/release-notes/v2.67.0.md +33 -0
  413. package/dist/web-ui/docs/en/cli/release-notes/v2.7.0.md +16 -0
  414. package/dist/web-ui/docs/en/cli/release-notes/v2.8.0.md +18 -0
  415. package/dist/web-ui/docs/en/cli/release-notes/v2.8.1.md +17 -0
  416. package/dist/web-ui/docs/en/cli/release-notes/v2.8.2.md +5 -0
  417. package/dist/web-ui/docs/en/cli/release-notes/v2.8.3.md +14 -0
  418. package/dist/web-ui/docs/en/cli/release-notes/v2.8.4.md +9 -0
  419. package/dist/web-ui/docs/en/cli/release-notes/v2.8.5.md +5 -0
  420. package/dist/web-ui/docs/en/cli/release-notes/v2.8.6.md +14 -0
  421. package/dist/web-ui/docs/en/cli/release-notes/v2.9.0.md +5 -0
  422. package/dist/web-ui/docs/en/cli/remote-control.md +247 -0
  423. package/dist/web-ui/docs/en/cli/sandboxing.md +316 -0
  424. package/dist/web-ui/docs/en/cli/scheduled-tasks.md +160 -0
  425. package/dist/web-ui/docs/en/cli/sdk-custom-tools.md +1131 -0
  426. package/dist/web-ui/docs/en/cli/sdk-demos.md +347 -0
  427. package/dist/web-ui/docs/en/cli/sdk-hooks.md +813 -0
  428. package/dist/web-ui/docs/en/cli/sdk-mcp.md +645 -0
  429. package/dist/web-ui/docs/en/cli/sdk-permissions.md +461 -0
  430. package/dist/web-ui/docs/en/cli/sdk-python.md +797 -0
  431. package/dist/web-ui/docs/en/cli/sdk-sessions.md +340 -0
  432. package/dist/web-ui/docs/en/cli/sdk-typescript.md +770 -0
  433. package/dist/web-ui/docs/en/cli/sdk.md +1103 -0
  434. package/dist/web-ui/docs/en/cli/security.md +388 -0
  435. package/dist/web-ui/docs/en/cli/settings.md +602 -0
  436. package/dist/web-ui/docs/en/cli/skills.md +448 -0
  437. package/dist/web-ui/docs/en/cli/slash-commands.md +397 -0
  438. package/dist/web-ui/docs/en/cli/statusline.md +525 -0
  439. package/dist/web-ui/docs/en/cli/sub-agents.md +621 -0
  440. package/dist/web-ui/docs/en/cli/terminal-config.md +77 -0
  441. package/dist/web-ui/docs/en/cli/tools-reference.md +99 -0
  442. package/dist/web-ui/docs/en/cli/troubleshooting.md +190 -0
  443. package/dist/web-ui/docs/en/cli/web-ui.md +164 -0
  444. package/dist/web-ui/docs/en/cli/wecom-bot-setup.md +274 -0
  445. package/dist/web-ui/docs/en/cli/worktree.md +660 -0
  446. package/dist/web-ui/docs/search-index-en.json +1 -0
  447. package/dist/web-ui/docs/search-index-zh.json +1 -0
  448. package/dist/web-ui/docs/sidebar-en.json +1 -0
  449. package/dist/web-ui/docs/sidebar-zh.json +1 -0
  450. package/dist/web-ui/index.html +2 -2
  451. package/package.json +2 -3
  452. package/product.cloudhosted.json +2 -2
  453. package/product.internal.json +2 -2
  454. package/product.ioa.json +2 -2
  455. package/product.json +3 -3
  456. package/product.selfhosted.json +2 -2
  457. package/dist/web-ui/assets/index-BPT-qRRx.js +0 -411
  458. package/dist/web-ui/assets/index-f_ibHSHw.css +0 -32
@@ -0,0 +1,801 @@
1
+ # Hooks Reference
2
+
3
+ > **Version requirement:** This guide targets the Claude Code Hooks–compatible implementation shipped with CodeBuddy Code v1.16.0 and later.
4
+ > **Feature status:** Hooks are currently in **Beta**; APIs and runtime behavior may evolve.
5
+
6
+ Hooks let you inject custom scripts or commands into every stage of a CodeBuddy Code session so you can automate validation, bootstrap environments, run compliance checks, and more. Our implementation is fully compatible with the Claude Code Hooks specification, including event names, payload schemas, and safety guarantees.
7
+
8
+
9
+ ## Configuration
10
+
11
+ CodeBuddy Code stores hook configuration inside your settings files:
12
+
13
+ | Scope | Path | Notes |
14
+ | --- | --- | --- |
15
+ | User | `~/.codebuddy/settings.json` | Applies to every project |
16
+ | Project | `<project-root>/.codebuddy/settings.json` | Shared with the whole repo |
17
+ | Project local | `<project-root>/.codebuddy/settings.local.json` | Local-only overrides (not committed) |
18
+ | Enterprise policy | Distributed policy bundle | Managed centrally by your org |
19
+
20
+ **Merge behavior:** Hooks from different scopes are **merged**, not overwritten. All matching hooks for the same event run in parallel.
21
+
22
+ ## Structure
23
+
24
+ Hooks are grouped by matcher, and each matcher may contain multiple hook definitions:
25
+
26
+ ```json
27
+ {
28
+ "hooks": {
29
+ "EventName": [
30
+ {
31
+ "matcher": "ToolPattern",
32
+ "hooks": [
33
+ {
34
+ "type": "command",
35
+ "command": "your-command-here"
36
+ }
37
+ ]
38
+ }
39
+ ]
40
+ }
41
+ }
42
+ ```
43
+
44
+ **Key fields:**
45
+
46
+ - **matcher** – Regex pattern for tool names, case-sensitive (only for `PreToolUse` and `PostToolUse`).
47
+ - Simple string match: `Write` matches any tool name containing "Write" (e.g., `Write`, `NotebookWrite`).
48
+ - Exact match: Use `^Write$` to match only the Write tool.
49
+ - Multiple tools: `Edit|Write` or `Web.*`.
50
+ - Match all tools: Any of the following are equivalent:
51
+ - Use `*`
52
+ - Use empty string `""`
53
+ - Omit the `matcher` field
54
+ - **hooks** – Array executed when the matcher hits.
55
+ - **type** – Execution mode. Use `"command"` for shell commands, or `"prompt"` for LLM-based evaluation.
56
+ - **command** – (type = `command`) Shell command to run. `$CODEBUDDY_PROJECT_DIR` is available. Executed using the user's default shell (`$SHELL`) on macOS/Linux, and **Git Bash is enforced on Windows** (cmd.exe and PowerShell are not supported), so commands must be compatible with bash syntax.
57
+ - **prompt** – (type = `prompt`) Prompt text sent to the LLM for evaluation (only supports `Stop`, `UserPromptSubmit`, and `PreToolUse` events).
58
+ - **timeout** – Optional timeout in seconds for the specific hook.
59
+
60
+ For events that do not use matchers (`UserPromptSubmit`, `Stop`, `SubagentStop`, etc.) you can omit the field entirely:
61
+
62
+ ```json
63
+ {
64
+ "hooks": {
65
+ "UserPromptSubmit": [
66
+ {
67
+ "hooks": [
68
+ {
69
+ "type": "command",
70
+ "command": "python3 /path/to/prompt-validator.py"
71
+ }
72
+ ]
73
+ }
74
+ ]
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## Project-Scoped Hook Scripts
80
+
81
+ Use the `CODEBUDDY_PROJECT_DIR` environment variable (available while CodeBuddy builds the hook command) to reference scripts stored in the repo:
82
+
83
+ ```json
84
+ {
85
+ "hooks": {
86
+ "PostToolUse": [
87
+ {
88
+ "matcher": "Write|Edit",
89
+ "hooks": [
90
+ {
91
+ "type": "command",
92
+ "command": "\"$CODEBUDDY_PROJECT_DIR\"/.codebuddy/hooks/check-style.sh"
93
+ }
94
+ ]
95
+ }
96
+ ]
97
+ }
98
+ }
99
+ ```
100
+
101
+ > **Tip**: If your hook script is a Python file, explicitly use `python3` to invoke it instead of directly executing the `.py` file. This is because even if the script includes a shebang line (`#!/usr/bin/env python3`), Git Bash on Windows may not correctly recognize it:
102
+ > ```json
103
+ > "command": "python3 \"$CODEBUDDY_PROJECT_DIR\"/.codebuddy/hooks/my_hook.py"
104
+ > ```
105
+
106
+ ## Plugin Hooks
107
+
108
+ Plugins can ship hooks that merge seamlessly with user or project settings. When you enable a plugin, its hooks are merged automatically.
109
+
110
+ **How plugin hooks work:**
111
+
112
+ - Defined inside `hooks/hooks.json` within the plugin bundle, or via a custom path referenced from the `hooks` field.
113
+ - Activated hooks merge with user and project hooks.
114
+ - Multiple hook sources can all respond to the same event.
115
+ - `${CODEBUDDY_PLUGIN_ROOT}` points to the plugin directory for script references.
116
+
117
+ Example:
118
+
119
+ ```json
120
+ {
121
+ "description": "Automatic code formatting",
122
+ "hooks": {
123
+ "PostToolUse": [
124
+ {
125
+ "matcher": "Write|Edit",
126
+ "hooks": [
127
+ {
128
+ "type": "command",
129
+ "command": "${CODEBUDDY_PLUGIN_ROOT}/scripts/format.sh",
130
+ "timeout": 30
131
+ }
132
+ ]
133
+ }
134
+ ]
135
+ }
136
+ }
137
+ ```
138
+
139
+ ## Prompt-Based Hooks
140
+
141
+ Besides shell commands (`type: "command"`), CodeBuddy Code also supports prompt-based hooks (`type: "prompt"`) that use an LLM to evaluate whether to allow or block an action.
142
+
143
+ > **Supported events**: Currently only `Stop`, `UserPromptSubmit`, and `PreToolUse` events are supported.
144
+
145
+ ### How Prompt Hooks Work
146
+
147
+ Instead of running a bash command, the hook:
148
+
149
+ 1. Sends the hook input plus your prompt to a fast LLM (Haiku).
150
+ 2. Receives a structured JSON decision.
151
+ 3. Lets CodeBuddy Code enforce that decision.
152
+
153
+ ### Supported Events
154
+
155
+ | Event | Use Case |
156
+ | --- | --- |
157
+ | `Stop` | Intelligently decide whether CodeBuddy should continue working |
158
+ | `UserPromptSubmit` | Use LLM to assist in validating user prompts |
159
+ | `PreToolUse` | Make context-aware permission decisions |
160
+
161
+ ### Comparison with Command Hooks
162
+
163
+ | Feature | Command Hooks | Prompt Hooks |
164
+ | --- | --- | --- |
165
+ | **Execution** | Runs bash scripts | Queries LLM |
166
+ | **Decision logic** | You implement in code | LLM evaluates context |
167
+ | **Setup complexity** | Requires script files | Just configure a prompt |
168
+ | **Context awareness** | Limited by script logic | Natural language understanding |
169
+ | **Performance** | Fast (local execution) | Slower (API call) |
170
+ | **Best for** | Deterministic rules | Context-aware decisions |
171
+
172
+ ### Configuration
173
+
174
+ ```json
175
+ {
176
+ "hooks": {
177
+ "Stop": [
178
+ {
179
+ "hooks": [
180
+ {
181
+ "type": "prompt",
182
+ "prompt": "Evaluate if CodeBuddy should stop: $ARGUMENTS. Check if all tasks are complete."
183
+ }
184
+ ]
185
+ }
186
+ ]
187
+ }
188
+ }
189
+ ```
190
+
191
+ **Fields:**
192
+
193
+ - **type** – Must be `"prompt"`.
194
+ - **prompt** – Text sent to the LLM. Use `$ARGUMENTS` as a placeholder for the hook input JSON, which will be directly replaced. When `$ARGUMENTS` is not present, the input JSON is appended in the format `\n\nARGUMENTS:\n{JSON}`.
195
+ - **timeout** – Optional timeout in seconds (default: 30s).
196
+
197
+ ### Response Schema
198
+
199
+ The LLM must return JSON:
200
+
201
+ ```jsonc
202
+ {
203
+ "ok": true | false,
204
+ "reason": "Explanation for the decision" // Required when ok is false
205
+ }
206
+ ```
207
+
208
+ **Response fields:**
209
+
210
+ - `ok`: `true` to allow the operation, `false` to block it
211
+ - `reason`: Required when `ok` is `false`, explanation shown to CodeBuddy
212
+
213
+ ### Example: Smart Stop Hook
214
+
215
+ ```json
216
+ {
217
+ "hooks": {
218
+ "Stop": [
219
+ {
220
+ "hooks": [
221
+ {
222
+ "type": "prompt",
223
+ "prompt": "You are evaluating whether CodeBuddy should stop working. Context: $ARGUMENTS\n\nAnalyze the conversation and determine if:\n1. All user-requested tasks are complete\n2. Any errors need to be addressed\n3. Follow-up work is needed\n\nRespond with JSON: {\"ok\": true} to allow stopping, or {\"ok\": false, \"reason\": \"your explanation\"} to continue working.",
224
+ "timeout": 30
225
+ }
226
+ ]
227
+ }
228
+ ]
229
+ }
230
+ }
231
+ ```
232
+
233
+ ### Example: UserPromptSubmit Validation
234
+
235
+ ```json
236
+ {
237
+ "hooks": {
238
+ "UserPromptSubmit": [
239
+ {
240
+ "hooks": [
241
+ {
242
+ "type": "prompt",
243
+ "prompt": "Evaluate if this user prompt is safe and appropriate. Input: $ARGUMENTS\n\nCheck if:\n- The prompt contains sensitive information (passwords, secrets)\n- The request is clear and actionable\n- Any security concerns exist\n\nReturn: {\"ok\": true} to allow, or {\"ok\": false, \"reason\": \"explanation\"} to block."
244
+ }
245
+ ]
246
+ }
247
+ ]
248
+ }
249
+ }
250
+ ```
251
+
252
+ ### Example: PreToolUse Permission Decision
253
+
254
+ ```json
255
+ {
256
+ "hooks": {
257
+ "PreToolUse": [
258
+ {
259
+ "matcher": "Bash",
260
+ "hooks": [
261
+ {
262
+ "type": "prompt",
263
+ "prompt": "Evaluate if this bash command should be allowed. Input: $ARGUMENTS\n\nCheck if:\n- The command is safe and non-destructive\n- It doesn't access sensitive files or directories\n- It aligns with the user's stated goals\n\nReturn: {\"ok\": true} to allow, or {\"ok\": false, \"reason\": \"explanation\"} to deny."
264
+ }
265
+ ]
266
+ }
267
+ ]
268
+ }
269
+ }
270
+ ```
271
+
272
+ ### Best Practices
273
+
274
+ - **Be specific in your prompts**: Clearly describe what you want the LLM to evaluate
275
+ - **Include decision criteria**: List the factors the LLM should consider
276
+ - **Test your prompts**: Verify the LLM makes correct decisions for your use cases
277
+ - **Set appropriate timeouts**: Default is 30 seconds, adjust if needed
278
+ - **Use for complex decisions**: Command hooks are better suited for simple, deterministic rules
279
+
280
+ ## Hook Events
281
+
282
+ ### Event Matrix
283
+
284
+ | Event | Trigger | Matcher support | Typical use cases |
285
+ | --- | --- | --- | --- |
286
+ | `PreToolUse` | Before a tool executes | Yes (tool name) | Command validation, approvals, logging |
287
+ | `PostToolUse` | After a tool succeeds | Yes | Auto-formatting, context enrichment |
288
+ | `Notification` | Permission prompts or 60s idle reminders | Partial | Desktop alerts, IM pings |
289
+ | `UserPromptSubmit` | User message submitted<br/>*(internal commands excluded)* | No | Content review, context injection |
290
+ | `Stop` | Main agent reply finishes | No | Force continuation, add reminders |
291
+ | `SubagentStop` | Sub-agent (Task tool) completes | No | Extend or annotate sub-tasks |
292
+ | `PreCompact` | Before context compaction | Yes (`manual` / `auto`) | Preserve key info, avoid lossy compression |
293
+ | `SessionStart` | Session creation or resume | Yes (`startup` / `resume` / `clear` / `compact`) | Env bootstrap, variable injection |
294
+ | `SessionEnd` | Session terminated | Yes (`clear` / `logout` / `prompt_input_exit` / `other`) | Cleanup, log persistence |
295
+
296
+ ### PreToolUse
297
+
298
+ Runs after CodeBuddy builds tool arguments but before executing the tool.
299
+
300
+ **Common matchers:**
301
+
302
+ - `Task` – Sub-agent tasks
303
+ - `Bash` – Shell commands
304
+ - `Glob` – File globbing
305
+ - `Grep` – Content search
306
+ - `Read` – File reads
307
+ - `Edit` – File edits
308
+ - `Write` – File writes
309
+ - `WebFetch`, `WebSearch` – Web operations
310
+
311
+ ### PostToolUse
312
+
313
+ Runs immediately after a tool succeeds. Uses the same matcher values as `PreToolUse`.
314
+
315
+ ### Notification
316
+
317
+ Runs when CodeBuddy emits a notification. Matchers filter by notification type.
318
+
319
+ **Supported matchers (partial):**
320
+
321
+ - `permission_prompt` – Permission dialogs
322
+ - `idle_prompt` – Idle > 60 seconds
323
+ - `auth_success` – Auth success notification
324
+ - `elicitation_dialog` – MCP tool elicitation dialogs (not yet supported)
325
+
326
+ Example:
327
+
328
+ ```json
329
+ {
330
+ "hooks": {
331
+ "Notification": [
332
+ {
333
+ "matcher": "permission_prompt",
334
+ "hooks": [
335
+ {
336
+ "type": "command",
337
+ "command": "/path/to/permission-alert.sh"
338
+ }
339
+ ]
340
+ },
341
+ {
342
+ "matcher": "idle_prompt",
343
+ "hooks": [
344
+ {
345
+ "type": "command",
346
+ "command": "/path/to/idle-notification.sh"
347
+ }
348
+ ]
349
+ }
350
+ ]
351
+ }
352
+ }
353
+ ```
354
+
355
+ ### UserPromptSubmit
356
+
357
+ Runs after the user submits a prompt but before CodeBuddy processes it. Useful for injecting context, validating, or blocking certain prompts.
358
+
359
+ ### Stop
360
+
361
+ Runs when the primary CodeBuddy agent finishes responding (skipped if the user manually interrupts).
362
+
363
+ ### SubagentStop
364
+
365
+ Runs when a CodeBuddy sub-agent (Task tool) finishes.
366
+
367
+ ### PreCompact
368
+
369
+ Runs before CodeBuddy compacts conversation context.
370
+
371
+ **Matchers:**
372
+
373
+ - `manual` – Triggered via `/compact`
374
+ - `auto` – Triggered automatically when the context window fills up
375
+
376
+ ### SessionStart
377
+
378
+ Runs when CodeBuddy starts a new session or resumes an existing one.
379
+
380
+ **Matchers:**
381
+
382
+ - `startup` – Fresh start
383
+ - `resume` – Triggered by `--resume`, `--continue`, or `/resume`
384
+ - `clear` – Triggered by `/clear`
385
+ - `compact` – Triggered by auto/manual compaction
386
+
387
+ ### SessionEnd
388
+
389
+ Runs when a session closes—use it to free resources or persist logs.
390
+
391
+ **`reason` field values:**
392
+
393
+ - `clear` – Session cleared via `/clear`
394
+ - `logout` – User signed out
395
+ - `prompt_input_exit` – User exited while the prompt input box was visible
396
+ - `other` – Any other exit reason (including normal exit)
397
+
398
+ ## Hook Input
399
+
400
+ Each hook receives JSON over stdin containing session metadata plus event-specific fields:
401
+
402
+ ```jsonc
403
+ {
404
+ // Common fields
405
+ "session_id": "string",
406
+ "transcript_path": "string", // Path to the conversation JSON
407
+ "cwd": "string", // Working directory when the hook runs
408
+ "permission_mode": "string", // "default", "plan", "acceptEdits", or "bypassPermissions"
409
+
410
+ // Event-specific properties
411
+ "hook_event_name": "string"
412
+ // ...
413
+ }
414
+ ```
415
+
416
+ ### PreToolUse Input
417
+
418
+ ```json
419
+ {
420
+ "session_id": "abc123",
421
+ "transcript_path": "/Users/.../.codebuddy/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
422
+ "cwd": "/Users/...",
423
+ "permission_mode": "default",
424
+ "hook_event_name": "PreToolUse",
425
+ "tool_name": "Write",
426
+ "tool_input": {
427
+ "file_path": "/path/to/file.txt",
428
+ "content": "file content"
429
+ }
430
+ }
431
+ ```
432
+
433
+ ### PostToolUse Input
434
+
435
+ ```json
436
+ {
437
+ "session_id": "abc123",
438
+ "transcript_path": "/Users/.../.codebuddy/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
439
+ "cwd": "/Users/...",
440
+ "permission_mode": "default",
441
+ "hook_event_name": "PostToolUse",
442
+ "tool_name": "Write",
443
+ "tool_input": {
444
+ "file_path": "/path/to/file.txt",
445
+ "content": "file content"
446
+ },
447
+ "tool_response": {
448
+ "filePath": "/path/to/file.txt",
449
+ "success": true
450
+ }
451
+ }
452
+ ```
453
+
454
+ ### Notification Input
455
+
456
+ ```json
457
+ {
458
+ "session_id": "abc123",
459
+ "transcript_path": "/Users/.../.codebuddy/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
460
+ "cwd": "/Users/...",
461
+ "permission_mode": "default",
462
+ "hook_event_name": "Notification",
463
+ "message": "CodeBuddy needs your permission to use Bash",
464
+ "notification_type": "permission_prompt"
465
+ }
466
+ ```
467
+
468
+ ### UserPromptSubmit Input
469
+
470
+ ```json
471
+ {
472
+ "session_id": "abc123",
473
+ "transcript_path": "/Users/.../.codebuddy/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
474
+ "cwd": "/Users/...",
475
+ "permission_mode": "default",
476
+ "hook_event_name": "UserPromptSubmit",
477
+ "prompt": "Write a function to calculate the factorial of a number"
478
+ }
479
+ ```
480
+
481
+ ### Stop & SubagentStop Input
482
+
483
+ `stop_hook_active` becomes `true` when a stop hook has already resumed execution.
484
+
485
+ ```json
486
+ {
487
+ "session_id": "abc123",
488
+ "transcript_path": "/Users/xxx/.codebuddy/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
489
+ "permission_mode": "default",
490
+ "hook_event_name": "Stop",
491
+ "stop_hook_active": true
492
+ }
493
+ ```
494
+
495
+ ### PreCompact Input
496
+
497
+ For manual triggers, `custom_instructions` comes from the `/compact` command. Auto triggers leave it empty.
498
+
499
+ ```json
500
+ {
501
+ "session_id": "abc123",
502
+ "transcript_path": "/Users/xxx/.codebuddy/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
503
+ "permission_mode": "default",
504
+ "hook_event_name": "PreCompact",
505
+ "trigger": "manual",
506
+ "custom_instructions": ""
507
+ }
508
+ ```
509
+
510
+ ### SessionStart Input
511
+
512
+ ```json
513
+ {
514
+ "session_id": "abc123",
515
+ "transcript_path": "/Users/xxx/.codebuddy/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
516
+ "permission_mode": "default",
517
+ "hook_event_name": "SessionStart",
518
+ "source": "startup"
519
+ }
520
+ ```
521
+
522
+ ### SessionEnd Input
523
+
524
+ ```json
525
+ {
526
+ "session_id": "abc123",
527
+ "transcript_path": "/Users/xxx/.codebuddy/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
528
+ "cwd": "/Users/...",
529
+ "permission_mode": "default",
530
+ "hook_event_name": "SessionEnd",
531
+ "reason": "other"
532
+ }
533
+ ```
534
+
535
+ ## Hook Output
536
+
537
+ Hooks communicate back to CodeBuddy Code in two ways.
538
+
539
+ ### Basic Mode: Exit Codes
540
+
541
+ Use exit status, stdout, and stderr to convey results:
542
+
543
+ - **Exit code 0** – Success. Stdout appears in transcript mode (Ctrl+R), except for `UserPromptSubmit` and `SessionStart`, where stdout is appended to the context.
544
+ - **Exit code 2** – Blocking error. Message source priority: stdout (JSON `reason`/`stopReason` field or plain text) > stderr. **Stderr is only a fallback** – it is only passed to CodeBuddy when stdout has no output. Therefore, debug logs can safely be written to stderr without polluting the feedback message to the Agent.
545
+ - **Other exit codes** – Non-blocking errors. Stderr is shown to the user and execution proceeds.
546
+
547
+ #### Exit Code 2 Behavior
548
+
549
+ > **Note:** "message" in the table below refers to the message retrieved from stdout or stderr based on priority (see fallback explanation above).
550
+
551
+ | Event | Effect |
552
+ | --- | --- |
553
+ | PreToolUse | Blocks the tool call and surfaces message to Agent |
554
+ | PostToolUse | Surfaces message to Agent (tool already ran, used for context injection) |
555
+ | Notification | N/A – message shown to the user |
556
+ | UserPromptSubmit | Blocks the prompt, clears it, message shown to user only |
557
+ | Stop | Blocks the stop action, surfaces message to Agent and continues conversation |
558
+ | SubagentStop | Blocks the sub-agent stop, surfaces message to sub-agent and continues execution |
559
+ | PreCompact | Blocks compaction, message shown to user only |
560
+ | SessionStart | N/A – message shown to the user |
561
+ | SessionEnd | N/A – message shown to the user |
562
+
563
+ ### Advanced Mode: JSON Output
564
+
565
+ Write structured JSON to stdout for granular control.
566
+
567
+ #### Common JSON Fields
568
+
569
+ ```jsonc
570
+ {
571
+ "continue": true, // Whether CodeBuddy proceeds after the hook (default true)
572
+ "stopReason": "string", // Message shown to CodeBuddy when continue is false
573
+ "reason": "string", // Alias for stopReason, both are equivalent
574
+
575
+ "suppressOutput": true, // Hide stdout in transcript mode (default false)
576
+ "systemMessage": "string" // Optional warning shown to user only (not passed to Agent)
577
+ }
578
+ ```
579
+
580
+ **Message field notes:**
581
+ - `stopReason` / `reason`: Message passed to CodeBuddy Agent explaining why the operation was blocked
582
+ - `systemMessage`: Warning shown to user only, not passed to Agent
583
+
584
+ #### PreToolUse Decision Control
585
+
586
+ PreToolUse hooks can control whether the tool call proceeds.
587
+
588
+ ```jsonc
589
+ {
590
+ "hookSpecificOutput": {
591
+ "hookEventName": "PreToolUse",
592
+ "permissionDecision": "allow" | "deny" | "ask",
593
+ "permissionDecisionReason": "Reason shown in permission dialog",
594
+ "modifiedInput": {
595
+ "field_to_modify": "new value"
596
+ }
597
+ }
598
+ }
599
+ ```
600
+
601
+ - `allow` – Skip the built-in permission dialog, execute tool directly
602
+ - `deny` – Block the tool call, `permissionDecisionReason` is passed to Agent
603
+ - `ask` – Force the UI to prompt the user, `permissionDecisionReason` is shown in the confirmation dialog
604
+ - `modifiedInput` – Mutate tool arguments before execution (partial field override)
605
+
606
+ #### PostToolUse Context Injection
607
+
608
+ PostToolUse fires **after** the tool has executed, so it cannot truly "block" the operation. Instead, use it to inject additional context to the Agent.
609
+
610
+ ```jsonc
611
+ {
612
+ "hookSpecificOutput": {
613
+ "hookEventName": "PostToolUse",
614
+ "additionalContext": "Additional information for CodeBuddy, e.g., code review results"
615
+ }
616
+ }
617
+ ```
618
+
619
+ > **Note:** The `decision: "block"` field is deprecated. Since the tool has already executed, blocking has no effect.
620
+
621
+ #### UserPromptSubmit Decision Control
622
+
623
+ ```jsonc
624
+ {
625
+ "continue": false, // Set to false to block prompt processing
626
+ "reason": "Block reason (shown to user only)",
627
+ "hookSpecificOutput": {
628
+ "hookEventName": "UserPromptSubmit",
629
+ "additionalContext": "Additional context injected to CodeBuddy"
630
+ }
631
+ }
632
+ ```
633
+
634
+ > **Note:** The `decision: "block"` field is deprecated. Use `continue: false` instead.
635
+
636
+ #### Stop / SubagentStop Decision Control
637
+
638
+ ```jsonc
639
+ {
640
+ "continue": false, // Set to false to prevent stopping, Agent continues working
641
+ "reason": "Tell the Agent why it needs to continue working"
642
+ }
643
+ ```
644
+
645
+ > **Note:** The `decision: "block"` field is deprecated. Use `continue: false` instead.
646
+
647
+ #### SessionStart Decision Control
648
+
649
+ ```jsonc
650
+ {
651
+ "hookSpecificOutput": {
652
+ "hookEventName": "SessionStart",
653
+ "additionalContext": "My additional context here"
654
+ }
655
+ }
656
+ ```
657
+
658
+ ## Using MCP Tools
659
+
660
+ Hooks integrate seamlessly with MCP (Model Context Protocol) tools.
661
+
662
+ ### MCP Tool Naming
663
+
664
+ MCP tool names follow the pattern `mcp__<server>__<tool>`, for example:
665
+
666
+ - `mcp__memory__create_entities` – `create_entities` on the Memory server
667
+ - `mcp__filesystem__read_file` – `read_file` on the Filesystem server
668
+ - `mcp__github__search_repositories` – GitHub search tool
669
+
670
+ ### Configuring Hooks for MCP Tools
671
+
672
+ Target an individual tool or an entire MCP server:
673
+
674
+ ```json
675
+ {
676
+ "hooks": {
677
+ "PreToolUse": [
678
+ {
679
+ "matcher": "mcp__memory__.*",
680
+ "hooks": [
681
+ {
682
+ "type": "command",
683
+ "command": "echo 'Memory operation initiated' >> ~/mcp-operations.log"
684
+ }
685
+ ]
686
+ },
687
+ {
688
+ "matcher": "mcp__.*__write.*",
689
+ "hooks": [
690
+ {
691
+ "type": "command",
692
+ "command": "python3 /home/user/scripts/validate-mcp-write.py"
693
+ }
694
+ ]
695
+ }
696
+ ]
697
+ }
698
+ }
699
+ ```
700
+
701
+ ## Security Notes
702
+
703
+ ### Disclaimer
704
+
705
+ **Use at your own risk.** Hooks run arbitrary shell commands on your machine. By enabling them you acknowledge:
706
+
707
+ - You are solely responsible for the commands you configure.
708
+ - Hooks can read, modify, or delete anything your user can access.
709
+ - Malicious or buggy hooks can cause data loss or system damage.
710
+ - Tencent Cloud offers no warranty and is not liable for any damages.
711
+ - Always test hooks in a safe environment before rolling them into production.
712
+
713
+ ### Best Practices
714
+
715
+ 1. **Validate and sanitize input** – Never trust incoming data blindly.
716
+ 2. **Quote shell variables** – Use `"$VAR"`, not `$VAR`.
717
+ 3. **Prevent path traversal** – Guard against `..` in file paths.
718
+ 4. **Use absolute paths** – Especially for scripts (or `"$CODEBUDDY_PROJECT_DIR"`).
719
+ 5. **Skip sensitive files** – Avoid touching `.env`, `.git/`, secrets, etc.
720
+
721
+ ### Configuration Safety
722
+
723
+ Editing the settings file does **not** hot-load hooks. CodeBuddy Code:
724
+
725
+ 1. Captures a snapshot at startup.
726
+ 2. Uses that snapshot for the whole session.
727
+ 3. Warns if the file changes externally.
728
+ 4. Requires review in the `/hooks` panel before changes apply.
729
+
730
+ ## Execution Details
731
+
732
+ - **Timeout** – 60 seconds by default; override per hook.
733
+ - **Parallelism** – All matching hooks run in parallel.
734
+ - **Deduplication** – Identical commands are coalesced.
735
+ - **Execution Shell**:
736
+ - **macOS/Linux**: Uses the user's default shell (`$SHELL` environment variable, typically bash or zsh), falls back to `/bin/sh`.
737
+ - **Windows**: **Git Bash is enforced** (cmd.exe and PowerShell are not supported). If Git Bash is not found, an error will prompt you to install [Git for Windows](https://git-scm.com/download/win). The `CODEBUDDY_CODE_GIT_BASH_PATH` environment variable can be used to specify the bash.exe path.
738
+ - The default shell can be overridden via the `CODEBUDDY_CODE_SHELL` environment variable (only POSIX shells are supported: bash, zsh, sh).
739
+ - **Environment** – Runs inside the current working directory with CodeBuddy's environment.
740
+ - `CODEBUDDY_PROJECT_DIR` exposes the absolute project root.
741
+ - **Input** – JSON over stdin.
742
+ - **Output** –
743
+ - PreToolUse / PostToolUse / Stop / SubagentStop: progress visible in transcript mode (Ctrl+R).
744
+ - Notification / SessionEnd: logged only when `--debug` is enabled.
745
+ - UserPromptSubmit / SessionStart: stdout is appended to the conversation context.
746
+
747
+ ## Debugging
748
+
749
+ ### Basic Troubleshooting
750
+
751
+ If hooks are not firing:
752
+
753
+ 1. **Check configuration** – Run `/hooks` to confirm registration.
754
+ 2. **Validate JSON** – Ensure the settings file parses.
755
+ 3. **Test commands** – Execute the script manually first.
756
+ 4. **Verify permissions** – Scripts must be executable.
757
+ 5. **Inspect logs** – Launch `codebuddy --debug` for hook traces.
758
+
759
+ **Common mistakes:**
760
+
761
+ - Unescaped quotes – Use `\"` inside JSON strings.
762
+ - Incorrect matcher – Tool names are case-sensitive.
763
+ - Command not found – Provide full paths.
764
+
765
+ ### Advanced Debugging
766
+
767
+ For tricky issues:
768
+
769
+ 1. **Trace execution** – `codebuddy --debug` shows hook scheduling and output.
770
+ 2. **Validate schemas** – Use external tools to simulate hook input/output.
771
+ 3. **Check env vars** – Confirm CodeBuddy exposes the expected environment.
772
+ 4. **Test edge cases** – Try unusual paths or payloads.
773
+ 5. **Monitor resources** – Ensure hooks are not exhausting CPU/RAM.
774
+ 6. **Emit structured logs** – Add logging inside your scripts.
775
+
776
+ ### Debug Output Example
777
+
778
+ **Note: This feature is not yet supported.**
779
+
780
+ `codebuddy --debug` prints hook execution like:
781
+
782
+ ```text
783
+ [DEBUG] Executing hooks for PostToolUse:Write
784
+ [DEBUG] Getting matching hook commands for PostToolUse with query: Write
785
+ [DEBUG] Found 1 hook matchers in settings
786
+ [DEBUG] Matched 1 hooks for query "Write"
787
+ [DEBUG] Found 1 hook commands to execute
788
+ [DEBUG] Executing hook command: <Your command> with timeout 60000ms
789
+ [DEBUG] Hook command completed with status 0: <Your stdout>
790
+ ```
791
+
792
+ Progress messages appear in transcript mode (Ctrl+R), showing:
793
+
794
+ - Which hook is running
795
+ - The command being executed
796
+ - Success/failure status
797
+ - Output or error messages
798
+
799
+ ---
800
+
801
+ With this guide you should have a complete understanding of how hooks work inside CodeBuddy Code and how to configure them safely. For a hands-on walkthrough, continue with the [Hooks Getting Started Guide](./hooks-guide.md).