@tencent-ai/agent-sdk 0.3.99 → 0.3.100

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/cli/CHANGELOG.md +26 -0
  2. package/cli/dist/codebuddy-headless.js +53 -53
  3. package/cli/dist/web-ui/assets/index-BoMlEqUE.js +439 -0
  4. package/cli/dist/web-ui/assets/index-Dt1puyHn.css +32 -0
  5. package/cli/dist/web-ui/docs/cn/cli/acp.md +152 -0
  6. package/cli/dist/web-ui/docs/cn/cli/agent-teams.md +327 -0
  7. package/cli/dist/web-ui/docs/cn/cli/bash-sandboxing.md +290 -0
  8. package/cli/dist/web-ui/docs/cn/cli/best-practices.md +554 -0
  9. package/cli/dist/web-ui/docs/cn/cli/channels-reference.md +293 -0
  10. package/cli/dist/web-ui/docs/cn/cli/channels.md +215 -0
  11. package/cli/dist/web-ui/docs/cn/cli/checkpointing.md +51 -0
  12. package/cli/dist/web-ui/docs/cn/cli/cli-reference.md +187 -0
  13. package/cli/dist/web-ui/docs/cn/cli/common-workflows.md +1013 -0
  14. package/cli/dist/web-ui/docs/cn/cli/costs.md +174 -0
  15. package/cli/dist/web-ui/docs/cn/cli/devcontainer.md +553 -0
  16. package/cli/dist/web-ui/docs/cn/cli/env-vars.md +326 -0
  17. package/cli/dist/web-ui/docs/cn/cli/gitlab-ci-cd.md +357 -0
  18. package/cli/dist/web-ui/docs/cn/cli/headless.md +258 -0
  19. package/cli/dist/web-ui/docs/cn/cli/hooks-guide.md +9 -0
  20. package/cli/dist/web-ui/docs/cn/cli/hooks.md +805 -0
  21. package/cli/dist/web-ui/docs/cn/cli/iam.md +530 -0
  22. package/cli/dist/web-ui/docs/cn/cli/ide-integrations.md +92 -0
  23. package/cli/dist/web-ui/docs/cn/cli/installation.md +291 -0
  24. package/cli/dist/web-ui/docs/cn/cli/interactive-mode.md +233 -0
  25. package/cli/dist/web-ui/docs/cn/cli/mcp.md +739 -0
  26. package/cli/dist/web-ui/docs/cn/cli/memory.md +436 -0
  27. package/cli/dist/web-ui/docs/cn/cli/models.md +356 -0
  28. package/cli/dist/web-ui/docs/cn/cli/overview.md +100 -0
  29. package/cli/dist/web-ui/docs/cn/cli/plugin-marketplaces.md +533 -0
  30. package/cli/dist/web-ui/docs/cn/cli/plugins-reference.md +774 -0
  31. package/cli/dist/web-ui/docs/cn/cli/plugins.md +689 -0
  32. package/cli/dist/web-ui/docs/cn/cli/quickstart.md +249 -0
  33. package/cli/dist/web-ui/docs/cn/cli/release-notes/README.md +199 -0
  34. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.10.0.md +23 -0
  35. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.10.1.md +5 -0
  36. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.11.0.md +24 -0
  37. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.12.0.md +21 -0
  38. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.13.0.md +20 -0
  39. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.14.0.md +22 -0
  40. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.14.1.md +8 -0
  41. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.15.0.md +18 -0
  42. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.15.1.md +11 -0
  43. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.16.0.md +20 -0
  44. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.17.0.md +29 -0
  45. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.18.0.md +17 -0
  46. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.19.0.md +11 -0
  47. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.19.1.md +14 -0
  48. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.19.2.md +11 -0
  49. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.20.0.md +23 -0
  50. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.20.1.md +15 -0
  51. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.21.0.md +13 -0
  52. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.22.0.md +16 -0
  53. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.0.md +20 -0
  54. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.2.md +5 -0
  55. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.3.md +5 -0
  56. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.4.md +15 -0
  57. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.5.md +11 -0
  58. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.24.0.md +17 -0
  59. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.25.0.md +18 -0
  60. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.25.1.md +21 -0
  61. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.26.0.md +18 -0
  62. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.27.0.md +16 -0
  63. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.27.1.md +16 -0
  64. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.27.2.md +7 -0
  65. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.27.3.md +15 -0
  66. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.28.0.md +26 -0
  67. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.28.1.md +5 -0
  68. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.29.0.md +35 -0
  69. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.3.1.md +16 -0
  70. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.30.0.md +19 -0
  71. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.30.1.md +5 -0
  72. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.31.0.md +51 -0
  73. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.31.1.md +11 -0
  74. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.31.2.md +16 -0
  75. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.32.0.md +19 -0
  76. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.33.0.md +28 -0
  77. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.33.1.md +7 -0
  78. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.36.3.md +17 -0
  79. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.0.md +15 -0
  80. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.1.md +15 -0
  81. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.10.md +5 -0
  82. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.11.md +8 -0
  83. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.12.md +14 -0
  84. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.13.md +11 -0
  85. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.14.md +24 -0
  86. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.15.md +11 -0
  87. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.16.md +9 -0
  88. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.17.md +5 -0
  89. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.18.md +9 -0
  90. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.19.md +5 -0
  91. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.2.md +28 -0
  92. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.20.md +8 -0
  93. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.3.md +22 -0
  94. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.4.md +19 -0
  95. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.5.md +5 -0
  96. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.6.md +5 -0
  97. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.7.md +5 -0
  98. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.8.md +5 -0
  99. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.9.md +8 -0
  100. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.38.0.md +22 -0
  101. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.38.1.md +6 -0
  102. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.38.2.md +9 -0
  103. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.39.0.md +18 -0
  104. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.4.0.md +19 -0
  105. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.40.0.md +20 -0
  106. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.40.1.md +6 -0
  107. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.0.md +15 -0
  108. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.1.md +6 -0
  109. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.2.md +5 -0
  110. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.3.md +8 -0
  111. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.4.md +5 -0
  112. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.5.md +10 -0
  113. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.6.md +9 -0
  114. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.7.md +14 -0
  115. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.8.md +18 -0
  116. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.42.0.md +39 -0
  117. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.42.1.md +8 -0
  118. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.42.3.md +18 -0
  119. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.43.0.md +27 -0
  120. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.43.1.md +27 -0
  121. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.44.0.md +11 -0
  122. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.44.1.md +22 -0
  123. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.45.0.md +34 -0
  124. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.45.1.md +7 -0
  125. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.46.0.md +12 -0
  126. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.47.0.md +20 -0
  127. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.48.0.md +32 -0
  128. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.48.1.md +11 -0
  129. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.0.md +26 -0
  130. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.1.md +14 -0
  131. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.2.md +39 -0
  132. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.3.md +7 -0
  133. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.5.md +11 -0
  134. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.6.md +9 -0
  135. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.7.md +7 -0
  136. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.5.0.md +24 -0
  137. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.0.md +25 -0
  138. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.1.md +9 -0
  139. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.2.md +11 -0
  140. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.3.md +5 -0
  141. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.4.md +17 -0
  142. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.5.md +16 -0
  143. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.6.md +15 -0
  144. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.7.md +15 -0
  145. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.51.0.md +24 -0
  146. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.51.1.md +17 -0
  147. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.51.2.md +5 -0
  148. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.0.md +30 -0
  149. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.1.md +28 -0
  150. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.2.md +12 -0
  151. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.3.md +13 -0
  152. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.4.md +27 -0
  153. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.5.md +21 -0
  154. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.6.md +7 -0
  155. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.53.0.md +29 -0
  156. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.54.0.md +26 -0
  157. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.55.0.md +21 -0
  158. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.55.1.md +13 -0
  159. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.56.0.md +20 -0
  160. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.56.1.md +5 -0
  161. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.57.0.md +32 -0
  162. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.57.1.md +10 -0
  163. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.58.0.md +34 -0
  164. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.59.0.md +28 -0
  165. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.6.0.md +5 -0
  166. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.6.1.md +10 -0
  167. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.60.0.md +20 -0
  168. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.61.0.md +29 -0
  169. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.61.1.md +5 -0
  170. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.61.2.md +6 -0
  171. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.61.3.md +13 -0
  172. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.62.0.md +21 -0
  173. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.62.1.md +11 -0
  174. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.0.md +19 -0
  175. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.1.md +5 -0
  176. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.2.md +7 -0
  177. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.3.md +6 -0
  178. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.4.md +8 -0
  179. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.5.md +6 -0
  180. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.64.0.md +37 -0
  181. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.64.1.md +6 -0
  182. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.64.2.md +11 -0
  183. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.65.0.md +19 -0
  184. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.65.1.md +11 -0
  185. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.66.0.md +15 -0
  186. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.66.1.md +14 -0
  187. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.66.2.md +5 -0
  188. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.67.0.md +33 -0
  189. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.7.0.md +16 -0
  190. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.0.md +18 -0
  191. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.1.md +17 -0
  192. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.2.md +5 -0
  193. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.3.md +14 -0
  194. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.4.md +9 -0
  195. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.5.md +5 -0
  196. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.6.md +14 -0
  197. package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.9.0.md +5 -0
  198. package/cli/dist/web-ui/docs/cn/cli/remote-control.md +247 -0
  199. package/cli/dist/web-ui/docs/cn/cli/sandboxing.md +316 -0
  200. package/cli/dist/web-ui/docs/cn/cli/scheduled-tasks.md +161 -0
  201. package/cli/dist/web-ui/docs/cn/cli/sdk-custom-tools.md +1195 -0
  202. package/cli/dist/web-ui/docs/cn/cli/sdk-demos.md +347 -0
  203. package/cli/dist/web-ui/docs/cn/cli/sdk-hooks.md +803 -0
  204. package/cli/dist/web-ui/docs/cn/cli/sdk-mcp.md +643 -0
  205. package/cli/dist/web-ui/docs/cn/cli/sdk-permissions.md +501 -0
  206. package/cli/dist/web-ui/docs/cn/cli/sdk-python.md +783 -0
  207. package/cli/dist/web-ui/docs/cn/cli/sdk-sessions.md +332 -0
  208. package/cli/dist/web-ui/docs/cn/cli/sdk-typescript.md +759 -0
  209. package/cli/dist/web-ui/docs/cn/cli/sdk.md +1105 -0
  210. package/cli/dist/web-ui/docs/cn/cli/security.md +387 -0
  211. package/cli/dist/web-ui/docs/cn/cli/settings.md +602 -0
  212. package/cli/dist/web-ui/docs/cn/cli/skills.md +448 -0
  213. package/cli/dist/web-ui/docs/cn/cli/slash-commands.md +397 -0
  214. package/cli/dist/web-ui/docs/cn/cli/statusline.md +525 -0
  215. package/cli/dist/web-ui/docs/cn/cli/sub-agents.md +634 -0
  216. package/cli/dist/web-ui/docs/cn/cli/terminal-config.md +77 -0
  217. package/cli/dist/web-ui/docs/cn/cli/tools-reference.md +99 -0
  218. package/cli/dist/web-ui/docs/cn/cli/troubleshooting.md +190 -0
  219. package/cli/dist/web-ui/docs/cn/cli/web-ui.md +164 -0
  220. package/cli/dist/web-ui/docs/cn/cli/wecom-bot-setup.md +274 -0
  221. package/cli/dist/web-ui/docs/cn/cli/worktree.md +660 -0
  222. package/cli/dist/web-ui/docs/en/cli/acp.md +126 -0
  223. package/cli/dist/web-ui/docs/en/cli/agent-teams.md +327 -0
  224. package/cli/dist/web-ui/docs/en/cli/bash-sandboxing.md +357 -0
  225. package/cli/dist/web-ui/docs/en/cli/best-practices.md +554 -0
  226. package/cli/dist/web-ui/docs/en/cli/channels-reference.md +293 -0
  227. package/cli/dist/web-ui/docs/en/cli/channels.md +215 -0
  228. package/cli/dist/web-ui/docs/en/cli/checkpointing.md +53 -0
  229. package/cli/dist/web-ui/docs/en/cli/cli-reference.md +187 -0
  230. package/cli/dist/web-ui/docs/en/cli/common-workflows.md +1011 -0
  231. package/cli/dist/web-ui/docs/en/cli/costs.md +174 -0
  232. package/cli/dist/web-ui/docs/en/cli/devcontainer.md +553 -0
  233. package/cli/dist/web-ui/docs/en/cli/env-vars.md +326 -0
  234. package/cli/dist/web-ui/docs/en/cli/gitlab-ci-cd.md +357 -0
  235. package/cli/dist/web-ui/docs/en/cli/headless.md +258 -0
  236. package/cli/dist/web-ui/docs/en/cli/hooks-guide.md +9 -0
  237. package/cli/dist/web-ui/docs/en/cli/hooks.md +801 -0
  238. package/cli/dist/web-ui/docs/en/cli/iam.md +526 -0
  239. package/cli/dist/web-ui/docs/en/cli/ide-integrations.md +92 -0
  240. package/cli/dist/web-ui/docs/en/cli/installation.md +266 -0
  241. package/cli/dist/web-ui/docs/en/cli/interactive-mode.md +233 -0
  242. package/cli/dist/web-ui/docs/en/cli/mcp.md +739 -0
  243. package/cli/dist/web-ui/docs/en/cli/memory.md +436 -0
  244. package/cli/dist/web-ui/docs/en/cli/models.md +355 -0
  245. package/cli/dist/web-ui/docs/en/cli/overview.md +100 -0
  246. package/cli/dist/web-ui/docs/en/cli/plugin-marketplaces.md +534 -0
  247. package/cli/dist/web-ui/docs/en/cli/plugins-reference.md +774 -0
  248. package/cli/dist/web-ui/docs/en/cli/plugins.md +688 -0
  249. package/cli/dist/web-ui/docs/en/cli/quickstart.md +249 -0
  250. package/cli/dist/web-ui/docs/en/cli/release-notes/README.md +193 -0
  251. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.10.0.md +23 -0
  252. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.10.1.md +5 -0
  253. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.11.0.md +24 -0
  254. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.12.0.md +21 -0
  255. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.13.0.md +20 -0
  256. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.14.0.md +22 -0
  257. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.14.1.md +8 -0
  258. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.15.0.md +18 -0
  259. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.15.1.md +11 -0
  260. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.16.0.md +20 -0
  261. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.17.0.md +29 -0
  262. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.18.0.md +17 -0
  263. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.19.0.md +11 -0
  264. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.19.1.md +14 -0
  265. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.19.2.md +11 -0
  266. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.20.0.md +23 -0
  267. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.20.1.md +15 -0
  268. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.21.0.md +13 -0
  269. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.22.0.md +16 -0
  270. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.0.md +41 -0
  271. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.2.md +5 -0
  272. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.3.md +5 -0
  273. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.4.md +15 -0
  274. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.5.md +11 -0
  275. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.24.0.md +17 -0
  276. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.25.0.md +18 -0
  277. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.25.1.md +21 -0
  278. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.26.0.md +18 -0
  279. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.27.0.md +16 -0
  280. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.27.1.md +16 -0
  281. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.27.2.md +7 -0
  282. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.27.3.md +15 -0
  283. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.28.0.md +26 -0
  284. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.28.1.md +5 -0
  285. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.29.0.md +35 -0
  286. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.3.1.md +16 -0
  287. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.30.0.md +19 -0
  288. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.30.1.md +5 -0
  289. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.31.0.md +51 -0
  290. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.31.1.md +11 -0
  291. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.31.2.md +16 -0
  292. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.32.0.md +19 -0
  293. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.33.0.md +28 -0
  294. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.33.1.md +7 -0
  295. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.34.0.md +27 -0
  296. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.34.1.md +7 -0
  297. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.35.0.md +22 -0
  298. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.36.0.md +23 -0
  299. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.36.1.md +5 -0
  300. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.36.2.md +22 -0
  301. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.36.3.md +17 -0
  302. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.0.md +15 -0
  303. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.1.md +15 -0
  304. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.10.md +5 -0
  305. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.11.md +8 -0
  306. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.12.md +14 -0
  307. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.13.md +11 -0
  308. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.14.md +24 -0
  309. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.15.md +11 -0
  310. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.16.md +9 -0
  311. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.17.md +5 -0
  312. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.18.md +9 -0
  313. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.19.md +5 -0
  314. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.2.md +28 -0
  315. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.20.md +8 -0
  316. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.3.md +22 -0
  317. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.4.md +19 -0
  318. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.5.md +5 -0
  319. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.6.md +5 -0
  320. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.7.md +5 -0
  321. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.8.md +5 -0
  322. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.9.md +8 -0
  323. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.38.0.md +22 -0
  324. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.38.1.md +6 -0
  325. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.38.2.md +9 -0
  326. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.39.0.md +18 -0
  327. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.4.0.md +19 -0
  328. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.40.0.md +20 -0
  329. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.40.1.md +6 -0
  330. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.0.md +15 -0
  331. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.1.md +6 -0
  332. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.2.md +5 -0
  333. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.3.md +8 -0
  334. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.4.md +5 -0
  335. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.5.md +10 -0
  336. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.6.md +9 -0
  337. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.7.md +14 -0
  338. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.8.md +18 -0
  339. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.42.0.md +39 -0
  340. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.42.1.md +8 -0
  341. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.42.3.md +18 -0
  342. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.43.0.md +27 -0
  343. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.43.1.md +27 -0
  344. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.44.0.md +11 -0
  345. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.44.1.md +22 -0
  346. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.45.0.md +34 -0
  347. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.45.1.md +7 -0
  348. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.46.0.md +12 -0
  349. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.47.0.md +20 -0
  350. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.48.0.md +32 -0
  351. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.48.1.md +11 -0
  352. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.0.md +26 -0
  353. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.1.md +14 -0
  354. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.2.md +39 -0
  355. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.3.md +7 -0
  356. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.5.md +11 -0
  357. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.6.md +9 -0
  358. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.7.md +7 -0
  359. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.5.0.md +24 -0
  360. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.0.md +25 -0
  361. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.1.md +9 -0
  362. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.2.md +11 -0
  363. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.3.md +5 -0
  364. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.4.md +17 -0
  365. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.5.md +16 -0
  366. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.6.md +15 -0
  367. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.7.md +15 -0
  368. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.51.0.md +24 -0
  369. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.51.1.md +17 -0
  370. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.51.2.md +5 -0
  371. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.0.md +30 -0
  372. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.1.md +28 -0
  373. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.2.md +12 -0
  374. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.3.md +13 -0
  375. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.4.md +27 -0
  376. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.5.md +21 -0
  377. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.6.md +7 -0
  378. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.53.0.md +29 -0
  379. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.54.0.md +26 -0
  380. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.55.0.md +21 -0
  381. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.55.1.md +13 -0
  382. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.56.0.md +20 -0
  383. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.56.1.md +5 -0
  384. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.57.0.md +32 -0
  385. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.57.1.md +10 -0
  386. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.58.0.md +34 -0
  387. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.59.0.md +28 -0
  388. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.6.0.md +5 -0
  389. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.6.1.md +10 -0
  390. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.60.0.md +20 -0
  391. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.61.0.md +29 -0
  392. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.61.1.md +5 -0
  393. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.61.2.md +6 -0
  394. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.61.3.md +13 -0
  395. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.62.0.md +21 -0
  396. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.62.1.md +11 -0
  397. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.0.md +19 -0
  398. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.1.md +5 -0
  399. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.2.md +7 -0
  400. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.3.md +6 -0
  401. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.4.md +8 -0
  402. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.5.md +6 -0
  403. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.64.0.md +37 -0
  404. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.64.1.md +6 -0
  405. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.64.2.md +11 -0
  406. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.65.0.md +19 -0
  407. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.65.1.md +11 -0
  408. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.66.0.md +15 -0
  409. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.66.1.md +14 -0
  410. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.66.2.md +5 -0
  411. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.67.0.md +33 -0
  412. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.7.0.md +16 -0
  413. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.0.md +18 -0
  414. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.1.md +17 -0
  415. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.2.md +5 -0
  416. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.3.md +14 -0
  417. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.4.md +9 -0
  418. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.5.md +5 -0
  419. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.6.md +14 -0
  420. package/cli/dist/web-ui/docs/en/cli/release-notes/v2.9.0.md +5 -0
  421. package/cli/dist/web-ui/docs/en/cli/remote-control.md +247 -0
  422. package/cli/dist/web-ui/docs/en/cli/sandboxing.md +316 -0
  423. package/cli/dist/web-ui/docs/en/cli/scheduled-tasks.md +160 -0
  424. package/cli/dist/web-ui/docs/en/cli/sdk-custom-tools.md +1131 -0
  425. package/cli/dist/web-ui/docs/en/cli/sdk-demos.md +347 -0
  426. package/cli/dist/web-ui/docs/en/cli/sdk-hooks.md +813 -0
  427. package/cli/dist/web-ui/docs/en/cli/sdk-mcp.md +645 -0
  428. package/cli/dist/web-ui/docs/en/cli/sdk-permissions.md +461 -0
  429. package/cli/dist/web-ui/docs/en/cli/sdk-python.md +797 -0
  430. package/cli/dist/web-ui/docs/en/cli/sdk-sessions.md +340 -0
  431. package/cli/dist/web-ui/docs/en/cli/sdk-typescript.md +770 -0
  432. package/cli/dist/web-ui/docs/en/cli/sdk.md +1103 -0
  433. package/cli/dist/web-ui/docs/en/cli/security.md +388 -0
  434. package/cli/dist/web-ui/docs/en/cli/settings.md +602 -0
  435. package/cli/dist/web-ui/docs/en/cli/skills.md +448 -0
  436. package/cli/dist/web-ui/docs/en/cli/slash-commands.md +397 -0
  437. package/cli/dist/web-ui/docs/en/cli/statusline.md +525 -0
  438. package/cli/dist/web-ui/docs/en/cli/sub-agents.md +621 -0
  439. package/cli/dist/web-ui/docs/en/cli/terminal-config.md +77 -0
  440. package/cli/dist/web-ui/docs/en/cli/tools-reference.md +99 -0
  441. package/cli/dist/web-ui/docs/en/cli/troubleshooting.md +190 -0
  442. package/cli/dist/web-ui/docs/en/cli/web-ui.md +164 -0
  443. package/cli/dist/web-ui/docs/en/cli/wecom-bot-setup.md +274 -0
  444. package/cli/dist/web-ui/docs/en/cli/worktree.md +660 -0
  445. package/cli/dist/web-ui/docs/search-index-en.json +1 -0
  446. package/cli/dist/web-ui/docs/search-index-zh.json +1 -0
  447. package/cli/dist/web-ui/docs/sidebar-en.json +1 -0
  448. package/cli/dist/web-ui/docs/sidebar-zh.json +1 -0
  449. package/cli/dist/web-ui/index.html +2 -2
  450. package/cli/package.json +1 -1
  451. package/cli/product.cloudhosted.json +2 -2
  452. package/cli/product.internal.json +2 -2
  453. package/cli/product.ioa.json +2 -2
  454. package/cli/product.json +3 -3
  455. package/cli/product.selfhosted.json +2 -2
  456. package/package.json +1 -1
  457. package/cli/dist/web-ui/assets/index-BPT-qRRx.js +0 -411
  458. package/cli/dist/web-ui/assets/index-f_ibHSHw.css +0 -32
@@ -0,0 +1,797 @@
1
+ # Python SDK Reference
2
+
3
+ > **Version Requirement**: This document is for CodeBuddy Agent SDK v0.1.0 and above.
4
+
5
+ This document provides a complete API reference for the Python SDK. For quick start and usage examples, please refer to [SDK Overview](sdk.md).
6
+
7
+ ## Table of Contents
8
+
9
+ - [Requirements](#requirements)
10
+ - [Installation](#installation)
11
+ - [Functions](#functions)
12
+ - [Client Class](#client-class)
13
+ - [Authentication](#authentication)
14
+ - [Unstable API](#unstable-api)
15
+ - [Types](#types)
16
+ - [Message Types](#message-types)
17
+ - [Input Types](#input-types)
18
+ - [Errors](#errors)
19
+ - [Auth Types](#auth-types)
20
+
21
+ ## Requirements
22
+
23
+ | Dependency | Version Requirement |
24
+ |---------|----------|
25
+ | Python | >= 3.10 |
26
+ | CodeBuddy CLI | Installed |
27
+
28
+ **Async Runtime**: The SDK is based on `asyncio`, all APIs are asynchronous.
29
+
30
+ ## Installation
31
+
32
+ Recommended to use [uv](https://docs.astral.sh/uv/) for dependency management:
33
+
34
+ ```bash
35
+ uv add codebuddy-agent-sdk
36
+ ```
37
+
38
+ Or using pip:
39
+
40
+ ```bash
41
+ pip install codebuddy-agent-sdk
42
+ ```
43
+
44
+ ### Environment Variables
45
+
46
+ | Variable Name | Description | Required |
47
+ |--------|------|------|
48
+ | `CODEBUDDY_CODE_PATH` | CodeBuddy CLI executable path | Optional |
49
+
50
+ If not set, the SDK will look for CLI in the following order:
51
+ 1. Environment variable `CODEBUDDY_CODE_PATH`
52
+ 2. Built-in binary within SDK package
53
+ 3. Development environment monorepo path
54
+
55
+ ### Authentication Configuration
56
+
57
+ The SDK supports authentication using existing login credentials, API Key, or OAuth Client Credentials. See [SDK Overview - Authentication Configuration](sdk.md#authentication-configuration) for details.
58
+
59
+ ## Functions
60
+
61
+ ### query()
62
+
63
+ Main API entry point, creates a query and returns an async iterator of messages.
64
+
65
+ ```python
66
+ async def query(
67
+ *,
68
+ prompt: str | AsyncIterable[dict[str, Any]],
69
+ options: CodeBuddyAgentOptions | None = None,
70
+ transport: Transport | None = None,
71
+ ) -> AsyncIterator[Message]:
72
+ ```
73
+
74
+ **Parameters**:
75
+
76
+ | Parameter | Type | Description |
77
+ |------|------|------|
78
+ | `prompt` | `str \| AsyncIterable[dict]` | Query prompt or user message stream |
79
+ | `options` | `CodeBuddyAgentOptions` | Configuration options (optional) |
80
+ | `transport` | `Transport` | Custom transport layer (optional) |
81
+
82
+ **Returns**: `AsyncIterator[Message]` - Async iterator of messages
83
+
84
+ **Example**:
85
+
86
+ ```python
87
+ from codebuddy_agent_sdk import query, AssistantMessage, TextBlock
88
+
89
+ async for message in query(prompt="What is 2+2?"):
90
+ if isinstance(message, AssistantMessage):
91
+ for block in message.content:
92
+ if isinstance(block, TextBlock):
93
+ print(block.text)
94
+ ```
95
+
96
+ ## Client Class
97
+
98
+ ### CodeBuddySDKClient
99
+
100
+ Client class for bidirectional interactive conversations. Supports multi-turn dialogues, interruptions, and dynamic control.
101
+
102
+ ```python
103
+ class CodeBuddySDKClient:
104
+ def __init__(
105
+ self,
106
+ options: CodeBuddyAgentOptions | None = None,
107
+ transport: Transport | None = None,
108
+ ): ...
109
+ ```
110
+
111
+ **Methods**:
112
+
113
+ #### connect()
114
+
115
+ Connect to CodeBuddy.
116
+
117
+ ```python
118
+ async def connect(
119
+ self,
120
+ prompt: str | AsyncIterable[dict[str, Any]] | None = None
121
+ ) -> None:
122
+ ```
123
+
124
+ #### query()
125
+
126
+ Send user message.
127
+
128
+ ```python
129
+ async def query(
130
+ self,
131
+ prompt: str | AsyncIterable[dict[str, Any]],
132
+ session_id: str = "default",
133
+ ) -> None:
134
+ ```
135
+
136
+ #### receive_response()
137
+
138
+ Receive messages until a ResultMessage is received.
139
+
140
+ ```python
141
+ async def receive_response(self) -> AsyncIterator[Message]:
142
+ ```
143
+
144
+ #### receive_messages()
145
+
146
+ Receive all messages (does not auto-stop).
147
+
148
+ ```python
149
+ async def receive_messages(self) -> AsyncIterator[Message]:
150
+ ```
151
+
152
+ #### disconnect()
153
+
154
+ Disconnect.
155
+
156
+ ```python
157
+ async def disconnect(self) -> None:
158
+ ```
159
+
160
+ **Context Manager Support**:
161
+
162
+ ```python
163
+ async with CodeBuddySDKClient() as client:
164
+ await client.query("Hello!")
165
+ async for msg in client.receive_response():
166
+ print(msg)
167
+ ```
168
+
169
+ #### mcp_server_status()
170
+
171
+ Get MCP server connection status.
172
+
173
+ ```python
174
+ async def mcp_server_status(self) -> list[McpServerStatus]:
175
+ ```
176
+
177
+ ## Authentication
178
+
179
+ The SDK provides an independent authentication API with a **two-phase** design: first obtain the login URL, then wait for the user to complete authentication.
180
+
181
+ ### authenticate()
182
+
183
+ Start the authentication flow, returns an `AuthFlow` object.
184
+
185
+ ```python
186
+ async def authenticate(
187
+ *,
188
+ method_id: str = "external",
189
+ environment: str | None = None,
190
+ endpoint: str | None = None,
191
+ codebuddy_code_path: str | None = None,
192
+ env: dict[str, str] | None = None,
193
+ timeout: float = 300.0,
194
+ ) -> AuthFlow:
195
+ ```
196
+
197
+ **Parameters**:
198
+
199
+ | Parameter | Type | Description |
200
+ |------|------|------|
201
+ | `method_id` | `str` | Authentication method identifier (default `"external"`) |
202
+ | `environment` | `str \| None` | Predefined environment name |
203
+ | `endpoint` | `str \| None` | Custom endpoint URL (mutually exclusive with environment) |
204
+ | `codebuddy_code_path` | `str \| None` | CLI executable path |
205
+ | `env` | `dict[str, str] \| None` | Additional environment variables |
206
+ | `timeout` | `float` | Timeout for user to complete login (seconds, default 300) |
207
+
208
+ **Returns**: `AuthFlow` — Awaitable object carrying the login URL
209
+
210
+ **Example**:
211
+
212
+ ```python
213
+ from codebuddy_agent_sdk import authenticate
214
+
215
+ # Two-phase: get URL → show to user → wait for completion
216
+ auth = await authenticate()
217
+ if auth.auth_url:
218
+ print(f"Please visit: {auth.auth_url}")
219
+ result = await auth
220
+ print(f"Welcome, {result.userinfo.user_name}")
221
+
222
+ # When already logged in, auth.auth_url is empty and await returns immediately
223
+ auth = await authenticate()
224
+ result = await auth # Returns immediately if already logged in
225
+
226
+ # Custom timeout
227
+ auth = await authenticate()
228
+ result = await auth.wait(timeout=60)
229
+ ```
230
+
231
+ ### AuthFlow
232
+
233
+ Authentication flow object returned by `authenticate()`. Implements the `__await__` protocol and can be directly `await`ed.
234
+
235
+ **Attributes**:
236
+
237
+ | Attribute | Type | Description |
238
+ |------|------|------|
239
+ | `auth_url` | `str` | Login URL (empty string when already logged in) |
240
+ | `method_id` | `str \| None` | Authentication method identifier |
241
+
242
+ **Methods**:
243
+
244
+ #### wait()
245
+
246
+ Wait for the user to complete authentication.
247
+
248
+ ```python
249
+ async def wait(self, timeout: float | None = None) -> AuthenticateResponse:
250
+ ```
251
+
252
+ #### cancel()
253
+
254
+ Cancel the authentication flow and release resources.
255
+
256
+ ```python
257
+ async def cancel(self) -> None:
258
+ ```
259
+
260
+ ### logout()
261
+
262
+ Log out and clear cached authentication tokens.
263
+
264
+ ```python
265
+ async def logout(
266
+ *,
267
+ environment: str | None = None,
268
+ endpoint: str | None = None,
269
+ codebuddy_code_path: str | None = None,
270
+ env: dict[str, str] | None = None,
271
+ ) -> None:
272
+ ```
273
+
274
+ **Example**:
275
+
276
+ ```python
277
+ from codebuddy_agent_sdk import logout
278
+
279
+ await logout()
280
+ ```
281
+
282
+ ## Unstable API
283
+
284
+ > **Warning**: The following APIs are experimental and may change in future versions.
285
+
286
+ ### interrupt()
287
+
288
+ Send interrupt signal.
289
+
290
+ ```python
291
+ async def interrupt(self) -> None:
292
+ ```
293
+
294
+ ### set_permission_mode()
295
+
296
+ Dynamically modify permission mode.
297
+
298
+ ```python
299
+ async def set_permission_mode(self, mode: str) -> None:
300
+ ```
301
+
302
+ ### set_model()
303
+
304
+ Dynamically modify model.
305
+
306
+ ```python
307
+ async def set_model(self, model: str | None = None) -> None:
308
+ ```
309
+
310
+ ## Types
311
+
312
+ ### CodeBuddyAgentOptions
313
+
314
+ Complete configuration options:
315
+
316
+ ```python
317
+ @dataclass
318
+ class CodeBuddyAgentOptions:
319
+ allowed_tools: list[str] = field(default_factory=list)
320
+ disallowed_tools: list[str] = field(default_factory=list)
321
+ system_prompt: str | AppendSystemPrompt | None = None
322
+ mcp_servers: dict[str, McpServerConfig] | str | Path = field(default_factory=dict)
323
+ permission_mode: PermissionMode | None = None
324
+ continue_conversation: bool = False
325
+ resume: str | None = None
326
+ max_turns: int | None = None
327
+ model: str | None = None
328
+ fallback_model: str | None = None
329
+ cwd: str | Path | None = None
330
+ codebuddy_code_path: str | Path | None = None
331
+ env: dict[str, str] = field(default_factory=dict)
332
+ extra_args: dict[str, str | None] = field(default_factory=dict)
333
+ stderr: Callable[[str], None] | None = None
334
+ hooks: dict[HookEvent, list[HookMatcher]] | None = None
335
+ include_partial_messages: bool = False
336
+ fork_session: bool = False
337
+ agents: dict[str, AgentDefinition] | None = None
338
+ setting_sources: list[SettingSource] | None = None
339
+ can_use_tool: CanUseTool | None = None
340
+ ```
341
+
342
+ | Field | Type | Description |
343
+ |------|------|------|
344
+ | `allowed_tools` | `list[str]` | Tool whitelist to auto-allow |
345
+ | `disallowed_tools` | `list[str]` | Tool blacklist to disallow |
346
+ | `system_prompt` | `str \| AppendSystemPrompt` | System prompt configuration |
347
+ | `mcp_servers` | `dict[str, McpServerConfig]` | MCP server configuration |
348
+ | `permission_mode` | `PermissionMode` | Permission mode |
349
+ | `continue_conversation` | `bool` | Continue recent session |
350
+ | `resume` | `str` | Session ID to resume |
351
+ | `max_turns` | `int` | Maximum conversation turns |
352
+ | `model` | `str` | Specify model |
353
+ | `fallback_model` | `str` | Fallback model |
354
+ | `cwd` | `str \| Path` | Working directory |
355
+ | `codebuddy_code_path` | `str \| Path` | CLI executable path |
356
+ | `env` | `dict[str, str]` | Environment variables |
357
+ | `extra_args` | `dict[str, str \| None]` | Extra CLI arguments |
358
+ | `stderr` | `Callable[[str], None]` | stderr callback |
359
+ | `hooks` | `dict[HookEvent, list[HookMatcher]]` | Hook configuration |
360
+ | `include_partial_messages` | `bool` | Include partial messages |
361
+ | `fork_session` | `bool` | Fork session |
362
+ | `agents` | `dict[str, AgentDefinition]` | Custom agents |
363
+ | `setting_sources` | `list[SettingSource]` | Setting sources |
364
+ | `can_use_tool` | `CanUseTool` | Permission callback function |
365
+ | `max_thinking_tokens` | `int` | Maximum thinking tokens (deprecated, use `thinking` instead) |
366
+ | `thinking` | `ThinkingConfig` | Thinking mode configuration: `{"type": "adaptive"}`, `{"type": "enabled", "budget_tokens": N}`, or `{"type": "disabled"}` |
367
+ | `effort` | `'low' \| 'medium' \| 'high' \| 'xhigh'` | Model reasoning effort level |
368
+
369
+ ### PermissionMode
370
+
371
+ ```python
372
+ PermissionMode = Literal["default", "acceptEdits", "plan", "bypassPermissions"]
373
+ ```
374
+
375
+ | Value | Description |
376
+ |-----|------|
377
+ | `"default"` | Default mode, all operations require confirmation |
378
+ | `"acceptEdits"` | Auto-approve file edits |
379
+ | `"plan"` | Planning mode, only allow reads |
380
+ | `"bypassPermissions"` | Skip all permission checks |
381
+
382
+ ### PermissionResult
383
+
384
+ ```python
385
+ PermissionResult = PermissionResultAllow | PermissionResultDeny
386
+
387
+ @dataclass
388
+ class PermissionResultAllow:
389
+ updated_input: dict[str, Any]
390
+ behavior: Literal["allow"] = "allow"
391
+ updated_permissions: list[dict[str, Any]] | None = None
392
+
393
+ @dataclass
394
+ class PermissionResultDeny:
395
+ message: str
396
+ behavior: Literal["deny"] = "deny"
397
+ interrupt: bool = False
398
+ ```
399
+
400
+ ### CanUseTool
401
+
402
+ ```python
403
+ CanUseTool = Callable[
404
+ [str, dict[str, Any], CanUseToolOptions],
405
+ Awaitable[PermissionResult],
406
+ ]
407
+
408
+ @dataclass
409
+ class CanUseToolOptions:
410
+ tool_use_id: str
411
+ signal: Any | None = None
412
+ agent_id: str | None = None
413
+ suggestions: list[dict[str, Any]] | None = None
414
+ blocked_path: str | None = None
415
+ decision_reason: str | None = None
416
+ ```
417
+
418
+ ### AgentDefinition
419
+
420
+ ```python
421
+ @dataclass
422
+ class AgentDefinition:
423
+ description: str # Agent description
424
+ prompt: str # System prompt
425
+ tools: list[str] | None = None # Allowed tools
426
+ disallowed_tools: list[str] | None = None # Disallowed tools
427
+ model: str | None = None # Model to use
428
+ ```
429
+
430
+ ### McpServerConfig
431
+
432
+ ```python
433
+ class McpStdioServerConfig(TypedDict):
434
+ type: NotRequired[Literal["stdio"]]
435
+ command: str
436
+ args: NotRequired[list[str]]
437
+ env: NotRequired[dict[str, str]]
438
+
439
+ McpServerConfig = McpStdioServerConfig
440
+ ```
441
+
442
+ ### HookEvent
443
+
444
+ ```python
445
+ HookEvent = (
446
+ Literal["PreToolUse"]
447
+ | Literal["PostToolUse"]
448
+ | Literal["UserPromptSubmit"]
449
+ | Literal["Stop"]
450
+ | Literal["SubagentStop"]
451
+ | Literal["PreCompact"]
452
+ | Literal["WorktreeCreate"]
453
+ | Literal["WorktreeRemove"]
454
+ )
455
+ ```
456
+
457
+ ### HookMatcher
458
+
459
+ ```python
460
+ @dataclass
461
+ class HookMatcher:
462
+ matcher: str | None = None # Match pattern (supports regex)
463
+ hooks: list[HookCallback] = field(default_factory=list)
464
+ timeout: float | None = None # Timeout in seconds
465
+ ```
466
+
467
+ ### HookCallback
468
+
469
+ ```python
470
+ HookCallback = Callable[
471
+ [Any, str | None, HookContext],
472
+ Awaitable[HookJSONOutput],
473
+ ]
474
+
475
+ class HookContext(TypedDict):
476
+ signal: Any | None
477
+
478
+ class SyncHookJSONOutput(TypedDict):
479
+ continue_: NotRequired[bool]
480
+ suppressOutput: NotRequired[bool]
481
+ stopReason: NotRequired[str]
482
+ decision: NotRequired[Literal["block"]]
483
+ reason: NotRequired[str]
484
+ ```
485
+
486
+ ### SettingSource
487
+
488
+ Controls which filesystem locations the SDK loads configuration from.
489
+
490
+ ```python
491
+ SettingSource = Literal["user", "project", "local"]
492
+ ```
493
+
494
+ | Value | Description | Location |
495
+ |-----|------|------|
496
+ | `"user"` | Global user settings | `~/.codebuddy/settings.json` |
497
+ | `"project"` | Project shared settings | `.codebuddy/settings.json` |
498
+ | `"local"` | Project local settings | `.codebuddy/settings.local.json` |
499
+
500
+ **Default Behavior**: When `setting_sources` is not specified, the SDK **does not load any filesystem configuration**. This provides a completely clean runtime environment.
501
+
502
+ ```python
503
+ # Default: no configuration loaded (clean environment)
504
+ async for msg in query(prompt="..."):
505
+ pass
506
+
507
+ # Load project configuration
508
+ options = CodeBuddyAgentOptions(setting_sources=["project"])
509
+
510
+ # Load all configurations (similar to CLI behavior)
511
+ options = CodeBuddyAgentOptions(setting_sources=["user", "project", "local"])
512
+ ```
513
+
514
+ ### AppendSystemPrompt
515
+
516
+ ```python
517
+ @dataclass
518
+ class AppendSystemPrompt:
519
+ append: str # Content to append to default system prompt
520
+ ```
521
+
522
+ ## Message Types
523
+
524
+ ### Message
525
+
526
+ Union of all message types:
527
+
528
+ ```python
529
+ Message = UserMessage | AssistantMessage | SystemMessage | ResultMessage | StreamEvent
530
+ ```
531
+
532
+ ### SystemMessage
533
+
534
+ ```python
535
+ @dataclass
536
+ class SystemMessage:
537
+ subtype: str
538
+ data: dict[str, Any]
539
+ ```
540
+
541
+ ### UserMessage
542
+
543
+ ```python
544
+ @dataclass
545
+ class UserMessage:
546
+ content: str | list[ContentBlock]
547
+ uuid: str | None = None
548
+ parent_tool_use_id: str | None = None
549
+ ```
550
+
551
+ ### AssistantMessage
552
+
553
+ ```python
554
+ @dataclass
555
+ class AssistantMessage:
556
+ content: list[ContentBlock]
557
+ model: str
558
+ parent_tool_use_id: str | None = None
559
+ error: str | None = None
560
+ ```
561
+
562
+ ### ResultMessage
563
+
564
+ ```python
565
+ @dataclass
566
+ class ResultMessage:
567
+ subtype: str
568
+ duration_ms: int
569
+ duration_api_ms: int
570
+ is_error: bool
571
+ num_turns: int
572
+ session_id: str
573
+ total_cost_usd: float | None = None
574
+ usage: dict[str, Any] | None = None
575
+ result: str | None = None
576
+ ```
577
+
578
+ ### StreamEvent
579
+
580
+ ```python
581
+ @dataclass
582
+ class StreamEvent:
583
+ uuid: str
584
+ session_id: str
585
+ event: dict[str, Any]
586
+ parent_tool_use_id: str | None = None
587
+ ```
588
+
589
+ ### ContentBlock
590
+
591
+ ```python
592
+ ContentBlock = TextBlock | ThinkingBlock | ToolUseBlock | ToolResultBlock
593
+
594
+ @dataclass
595
+ class TextBlock:
596
+ text: str
597
+
598
+ @dataclass
599
+ class ThinkingBlock:
600
+ thinking: str
601
+ signature: str
602
+
603
+ @dataclass
604
+ class ToolUseBlock:
605
+ id: str
606
+ name: str
607
+ input: dict[str, Any]
608
+
609
+ @dataclass
610
+ class ToolResultBlock:
611
+ tool_use_id: str
612
+ content: str | list[dict[str, Any]] | None = None
613
+ is_error: bool | None = None
614
+ ```
615
+
616
+ ## Input Types
617
+
618
+ ### AskUserQuestionInput
619
+
620
+ ```python
621
+ @dataclass
622
+ class AskUserQuestionInput:
623
+ questions: list[AskUserQuestionQuestion]
624
+ answers: dict[str, str] | None = None
625
+ ```
626
+
627
+ ### AskUserQuestionQuestion
628
+
629
+ ```python
630
+ @dataclass
631
+ class AskUserQuestionQuestion:
632
+ question: str # Complete question text (should end with ?)
633
+ header: str # Short label (max 12 characters)
634
+ options: list[AskUserQuestionOption]
635
+ multi_select: bool # Whether to allow multiple selections
636
+ ```
637
+
638
+ ### AskUserQuestionOption
639
+
640
+ ```python
641
+ @dataclass
642
+ class AskUserQuestionOption:
643
+ label: str # Display text (1-5 words)
644
+ description: str # Option description
645
+ ```
646
+
647
+ ## Errors
648
+
649
+ All exceptions inherit from `CodeBuddySDKError`.
650
+
651
+ ### CodeBuddySDKError
652
+
653
+ ```python
654
+ class CodeBuddySDKError(Exception):
655
+ """Base exception for CodeBuddy SDK errors."""
656
+ pass
657
+ ```
658
+
659
+ ### CLIConnectionError
660
+
661
+ Thrown when connection to CLI fails or no connection is established.
662
+
663
+ ```python
664
+ class CLIConnectionError(CodeBuddySDKError):
665
+ pass
666
+ ```
667
+
668
+ ### CLINotFoundError
669
+
670
+ Thrown when CLI executable is not found.
671
+
672
+ ```python
673
+ class CLINotFoundError(CodeBuddySDKError):
674
+ def __init__(
675
+ self,
676
+ message: str,
677
+ platform: str | None = None,
678
+ arch: str | None = None,
679
+ ): ...
680
+ ```
681
+
682
+ **Attributes**:
683
+
684
+ | Attribute | Type | Description |
685
+ |------|------|------|
686
+ | `platform` | `str \| None` | Current platform |
687
+ | `arch` | `str \| None` | Current architecture |
688
+
689
+ ### CLIJSONDecodeError
690
+
691
+ Thrown when JSON decoding of CLI output fails.
692
+
693
+ ```python
694
+ class CLIJSONDecodeError(CodeBuddySDKError):
695
+ pass
696
+ ```
697
+
698
+ ### ProcessError
699
+
700
+ Thrown when CLI process encounters an error.
701
+
702
+ ```python
703
+ class ProcessError(CodeBuddySDKError):
704
+ pass
705
+ ```
706
+
707
+ ### CLIStartupError
708
+
709
+ Thrown when the CLI process crashes or produces no output during the startup phase.
710
+
711
+ ```python
712
+ class CLIStartupError(CodeBuddySDKError):
713
+ def __init__(
714
+ self,
715
+ message: str,
716
+ stderr: str = "",
717
+ exit_code: int | None = None,
718
+ ): ...
719
+ ```
720
+
721
+ **Attributes**:
722
+
723
+ | Attribute | Type | Description |
724
+ |------|------|------|
725
+ | `stderr` | `str` | stderr output from CLI process |
726
+ | `exit_code` | `int \| None` | Process exit code |
727
+
728
+ ### ExecutionError
729
+
730
+ Thrown when execution fails (e.g., authentication error, API error). Contains the errors array from ResultMessage.
731
+
732
+ ```python
733
+ class ExecutionError(CodeBuddySDKError):
734
+ def __init__(self, errors: list[str], subtype: str): ...
735
+ ```
736
+
737
+ **Attributes**:
738
+
739
+ | Attribute | Type | Description |
740
+ |------|------|------|
741
+ | `errors` | `list[str]` | List of error messages |
742
+ | `subtype` | `str` | Error subtype |
743
+
744
+ ### AuthenticationError
745
+
746
+ Thrown when authentication fails.
747
+
748
+ ```python
749
+ class AuthenticationError(CodeBuddySDKError):
750
+ def __init__(self, error_type: str, message: str): ...
751
+ ```
752
+
753
+ **Attributes**:
754
+
755
+ | Attribute | Type | Description |
756
+ |------|------|------|
757
+ | `error_type` | `str` | Error type (e.g., `"timeout"`, `"auth_failed"`) |
758
+
759
+ ## Auth Types
760
+
761
+ ### AuthenticateResponse
762
+
763
+ ```python
764
+ @dataclass(slots=True)
765
+ class AuthenticateResponse:
766
+ userinfo: UserInfo
767
+ ```
768
+
769
+ ### UserInfo
770
+
771
+ ```python
772
+ @dataclass(slots=True)
773
+ class UserInfo:
774
+ user_id: str
775
+ user_name: str = ""
776
+ user_nickname: str = ""
777
+ token: str = ""
778
+ enterprise_id: str | None = None
779
+ enterprise: str | None = None
780
+ ```
781
+
782
+ ### McpServerStatus
783
+
784
+ ```python
785
+ @dataclass(slots=True)
786
+ class McpServerStatus:
787
+ name: str
788
+ status: Literal["connected", "failed", "needs-auth", "pending"]
789
+ server_info: dict[str, Any] | None = None
790
+ ```
791
+
792
+ ## Related Documentation
793
+
794
+ - [SDK Overview](sdk.md) - Quick start and usage examples
795
+ - [TypeScript SDK Reference](sdk-typescript.md) - TypeScript version API
796
+ - [Hook Reference Guide](hooks.md) - Detailed Hook configuration instructions
797
+ - [MCP Integration](mcp.md) - MCP server configuration guide