@tencent-ai/agent-sdk 0.3.99 → 0.3.101
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.
- package/cli/CHANGELOG.md +50 -0
- package/cli/dist/codebuddy-headless.js +140 -131
- package/cli/dist/web-ui/assets/index-CIqmZV3y.js +440 -0
- package/cli/dist/web-ui/assets/index-Dt1puyHn.css +32 -0
- package/cli/dist/web-ui/docs/cn/cli/acp.md +152 -0
- package/cli/dist/web-ui/docs/cn/cli/agent-teams.md +327 -0
- package/cli/dist/web-ui/docs/cn/cli/bash-sandboxing.md +290 -0
- package/cli/dist/web-ui/docs/cn/cli/best-practices.md +554 -0
- package/cli/dist/web-ui/docs/cn/cli/channels-reference.md +293 -0
- package/cli/dist/web-ui/docs/cn/cli/channels.md +215 -0
- package/cli/dist/web-ui/docs/cn/cli/checkpointing.md +51 -0
- package/cli/dist/web-ui/docs/cn/cli/cli-reference.md +187 -0
- package/cli/dist/web-ui/docs/cn/cli/common-workflows.md +1013 -0
- package/cli/dist/web-ui/docs/cn/cli/costs.md +174 -0
- package/cli/dist/web-ui/docs/cn/cli/devcontainer.md +553 -0
- package/cli/dist/web-ui/docs/cn/cli/env-vars.md +326 -0
- package/cli/dist/web-ui/docs/cn/cli/gitlab-ci-cd.md +357 -0
- package/cli/dist/web-ui/docs/cn/cli/headless.md +258 -0
- package/cli/dist/web-ui/docs/cn/cli/hooks-guide.md +9 -0
- package/cli/dist/web-ui/docs/cn/cli/hooks.md +805 -0
- package/cli/dist/web-ui/docs/cn/cli/iam.md +530 -0
- package/cli/dist/web-ui/docs/cn/cli/ide-integrations.md +92 -0
- package/cli/dist/web-ui/docs/cn/cli/installation.md +291 -0
- package/cli/dist/web-ui/docs/cn/cli/interactive-mode.md +233 -0
- package/cli/dist/web-ui/docs/cn/cli/mcp.md +739 -0
- package/cli/dist/web-ui/docs/cn/cli/memory.md +436 -0
- package/cli/dist/web-ui/docs/cn/cli/models.md +356 -0
- package/cli/dist/web-ui/docs/cn/cli/overview.md +100 -0
- package/cli/dist/web-ui/docs/cn/cli/plugin-marketplaces.md +533 -0
- package/cli/dist/web-ui/docs/cn/cli/plugins-reference.md +774 -0
- package/cli/dist/web-ui/docs/cn/cli/plugins.md +689 -0
- package/cli/dist/web-ui/docs/cn/cli/quickstart.md +249 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/README.md +200 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.10.0.md +23 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.10.1.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.11.0.md +24 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.12.0.md +21 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.13.0.md +20 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.14.0.md +22 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.14.1.md +8 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.15.0.md +18 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.15.1.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.16.0.md +20 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.17.0.md +29 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.18.0.md +17 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.19.0.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.19.1.md +14 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.19.2.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.20.0.md +23 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.20.1.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.21.0.md +13 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.22.0.md +16 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.0.md +20 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.2.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.3.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.4.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.23.5.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.24.0.md +17 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.25.0.md +18 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.25.1.md +21 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.26.0.md +18 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.27.0.md +16 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.27.1.md +16 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.27.2.md +7 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.27.3.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.28.0.md +26 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.28.1.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.29.0.md +35 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.3.1.md +16 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.30.0.md +19 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.30.1.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.31.0.md +51 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.31.1.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.31.2.md +16 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.32.0.md +19 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.33.0.md +28 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.33.1.md +7 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.36.3.md +17 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.0.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.1.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.10.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.11.md +8 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.12.md +14 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.13.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.14.md +24 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.15.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.16.md +9 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.17.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.18.md +9 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.19.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.2.md +28 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.20.md +8 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.3.md +22 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.4.md +19 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.5.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.6.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.7.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.8.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.37.9.md +8 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.38.0.md +22 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.38.1.md +6 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.38.2.md +9 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.39.0.md +18 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.4.0.md +19 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.40.0.md +20 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.40.1.md +6 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.0.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.1.md +6 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.2.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.3.md +8 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.4.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.5.md +10 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.6.md +9 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.7.md +14 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.41.8.md +18 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.42.0.md +39 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.42.1.md +8 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.42.3.md +18 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.43.0.md +27 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.43.1.md +27 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.44.0.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.44.1.md +22 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.45.0.md +34 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.45.1.md +7 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.46.0.md +12 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.47.0.md +20 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.48.0.md +32 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.48.1.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.0.md +26 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.1.md +14 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.2.md +39 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.3.md +7 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.5.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.6.md +9 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.49.7.md +7 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.5.0.md +24 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.0.md +25 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.1.md +9 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.2.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.3.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.4.md +17 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.5.md +16 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.6.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.50.7.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.51.0.md +24 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.51.1.md +17 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.51.2.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.0.md +30 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.1.md +28 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.2.md +12 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.3.md +13 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.4.md +27 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.5.md +21 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.52.6.md +7 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.53.0.md +29 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.54.0.md +26 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.55.0.md +21 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.55.1.md +13 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.56.0.md +20 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.56.1.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.57.0.md +32 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.57.1.md +10 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.58.0.md +34 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.59.0.md +28 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.6.0.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.6.1.md +10 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.60.0.md +20 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.61.0.md +29 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.61.1.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.61.2.md +6 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.61.3.md +13 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.62.0.md +21 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.62.1.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.0.md +19 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.1.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.2.md +7 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.3.md +6 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.4.md +8 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.63.5.md +6 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.64.0.md +37 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.64.1.md +6 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.64.2.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.65.0.md +19 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.65.1.md +11 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.66.0.md +15 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.66.1.md +14 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.66.2.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.67.0.md +33 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.68.0.md +28 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.7.0.md +16 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.0.md +18 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.1.md +17 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.2.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.3.md +14 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.4.md +9 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.5.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.8.6.md +14 -0
- package/cli/dist/web-ui/docs/cn/cli/release-notes/v2.9.0.md +5 -0
- package/cli/dist/web-ui/docs/cn/cli/remote-control.md +247 -0
- package/cli/dist/web-ui/docs/cn/cli/sandboxing.md +316 -0
- package/cli/dist/web-ui/docs/cn/cli/scheduled-tasks.md +161 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk-custom-tools.md +1195 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk-demos.md +347 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk-hooks.md +803 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk-mcp.md +643 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk-permissions.md +501 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk-python.md +783 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk-sessions.md +332 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk-typescript.md +759 -0
- package/cli/dist/web-ui/docs/cn/cli/sdk.md +1105 -0
- package/cli/dist/web-ui/docs/cn/cli/security.md +387 -0
- package/cli/dist/web-ui/docs/cn/cli/settings.md +602 -0
- package/cli/dist/web-ui/docs/cn/cli/skills.md +448 -0
- package/cli/dist/web-ui/docs/cn/cli/slash-commands.md +397 -0
- package/cli/dist/web-ui/docs/cn/cli/statusline.md +525 -0
- package/cli/dist/web-ui/docs/cn/cli/sub-agents.md +634 -0
- package/cli/dist/web-ui/docs/cn/cli/terminal-config.md +77 -0
- package/cli/dist/web-ui/docs/cn/cli/tools-reference.md +99 -0
- package/cli/dist/web-ui/docs/cn/cli/troubleshooting.md +190 -0
- package/cli/dist/web-ui/docs/cn/cli/web-ui.md +164 -0
- package/cli/dist/web-ui/docs/cn/cli/wecom-bot-setup.md +274 -0
- package/cli/dist/web-ui/docs/cn/cli/worktree.md +660 -0
- package/cli/dist/web-ui/docs/en/cli/acp.md +126 -0
- package/cli/dist/web-ui/docs/en/cli/agent-teams.md +327 -0
- package/cli/dist/web-ui/docs/en/cli/bash-sandboxing.md +290 -0
- package/cli/dist/web-ui/docs/en/cli/best-practices.md +554 -0
- package/cli/dist/web-ui/docs/en/cli/channels-reference.md +293 -0
- package/cli/dist/web-ui/docs/en/cli/channels.md +215 -0
- package/cli/dist/web-ui/docs/en/cli/checkpointing.md +53 -0
- package/cli/dist/web-ui/docs/en/cli/cli-reference.md +187 -0
- package/cli/dist/web-ui/docs/en/cli/common-workflows.md +1013 -0
- package/cli/dist/web-ui/docs/en/cli/costs.md +174 -0
- package/cli/dist/web-ui/docs/en/cli/devcontainer.md +553 -0
- package/cli/dist/web-ui/docs/en/cli/env-vars.md +326 -0
- package/cli/dist/web-ui/docs/en/cli/gitlab-ci-cd.md +357 -0
- package/cli/dist/web-ui/docs/en/cli/headless.md +258 -0
- package/cli/dist/web-ui/docs/en/cli/hooks-guide.md +9 -0
- package/cli/dist/web-ui/docs/en/cli/hooks.md +801 -0
- package/cli/dist/web-ui/docs/en/cli/iam.md +530 -0
- package/cli/dist/web-ui/docs/en/cli/ide-integrations.md +92 -0
- package/cli/dist/web-ui/docs/en/cli/installation.md +266 -0
- package/cli/dist/web-ui/docs/en/cli/interactive-mode.md +233 -0
- package/cli/dist/web-ui/docs/en/cli/mcp.md +739 -0
- package/cli/dist/web-ui/docs/en/cli/memory.md +436 -0
- package/cli/dist/web-ui/docs/en/cli/models.md +355 -0
- package/cli/dist/web-ui/docs/en/cli/overview.md +100 -0
- package/cli/dist/web-ui/docs/en/cli/plugin-marketplaces.md +534 -0
- package/cli/dist/web-ui/docs/en/cli/plugins-reference.md +774 -0
- package/cli/dist/web-ui/docs/en/cli/plugins.md +688 -0
- package/cli/dist/web-ui/docs/en/cli/quickstart.md +249 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/README.md +194 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.10.0.md +23 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.10.1.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.11.0.md +24 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.12.0.md +21 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.13.0.md +20 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.14.0.md +22 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.14.1.md +8 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.15.0.md +18 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.15.1.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.16.0.md +20 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.17.0.md +29 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.18.0.md +17 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.19.0.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.19.1.md +14 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.19.2.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.20.0.md +23 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.20.1.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.21.0.md +13 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.22.0.md +16 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.0.md +41 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.2.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.3.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.4.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.23.5.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.24.0.md +17 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.25.0.md +18 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.25.1.md +21 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.26.0.md +18 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.27.0.md +16 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.27.1.md +16 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.27.2.md +7 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.27.3.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.28.0.md +26 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.28.1.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.29.0.md +35 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.3.1.md +16 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.30.0.md +19 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.30.1.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.31.0.md +51 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.31.1.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.31.2.md +16 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.32.0.md +19 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.33.0.md +28 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.33.1.md +7 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.34.0.md +27 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.34.1.md +7 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.35.0.md +22 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.36.0.md +23 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.36.1.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.36.2.md +22 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.36.3.md +17 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.0.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.1.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.10.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.11.md +8 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.12.md +14 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.13.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.14.md +24 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.15.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.16.md +9 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.17.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.18.md +9 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.19.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.2.md +28 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.20.md +8 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.3.md +22 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.4.md +19 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.5.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.6.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.7.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.8.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.37.9.md +8 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.38.0.md +22 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.38.1.md +6 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.38.2.md +9 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.39.0.md +18 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.4.0.md +19 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.40.0.md +20 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.40.1.md +6 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.0.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.1.md +6 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.2.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.3.md +8 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.4.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.5.md +10 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.6.md +9 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.7.md +14 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.41.8.md +18 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.42.0.md +39 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.42.1.md +8 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.42.3.md +18 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.43.0.md +27 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.43.1.md +27 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.44.0.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.44.1.md +22 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.45.0.md +34 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.45.1.md +7 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.46.0.md +12 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.47.0.md +20 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.48.0.md +32 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.48.1.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.0.md +26 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.1.md +14 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.2.md +39 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.3.md +7 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.5.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.6.md +9 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.49.7.md +7 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.5.0.md +24 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.0.md +25 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.1.md +9 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.2.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.3.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.4.md +17 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.5.md +16 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.6.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.50.7.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.51.0.md +24 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.51.1.md +17 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.51.2.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.0.md +30 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.1.md +28 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.2.md +12 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.3.md +13 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.4.md +27 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.5.md +21 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.52.6.md +7 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.53.0.md +29 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.54.0.md +26 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.55.0.md +21 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.55.1.md +13 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.56.0.md +20 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.56.1.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.57.0.md +32 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.57.1.md +10 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.58.0.md +34 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.59.0.md +28 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.6.0.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.6.1.md +10 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.60.0.md +20 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.61.0.md +29 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.61.1.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.61.2.md +6 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.61.3.md +13 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.62.0.md +21 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.62.1.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.0.md +19 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.1.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.2.md +7 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.3.md +6 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.4.md +8 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.63.5.md +6 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.64.0.md +37 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.64.1.md +6 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.64.2.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.65.0.md +19 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.65.1.md +11 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.66.0.md +15 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.66.1.md +14 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.66.2.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.67.0.md +33 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.68.0.md +28 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.7.0.md +16 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.0.md +18 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.1.md +17 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.2.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.3.md +14 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.4.md +9 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.5.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.8.6.md +14 -0
- package/cli/dist/web-ui/docs/en/cli/release-notes/v2.9.0.md +5 -0
- package/cli/dist/web-ui/docs/en/cli/remote-control.md +247 -0
- package/cli/dist/web-ui/docs/en/cli/sandboxing.md +316 -0
- package/cli/dist/web-ui/docs/en/cli/scheduled-tasks.md +160 -0
- package/cli/dist/web-ui/docs/en/cli/sdk-custom-tools.md +1131 -0
- package/cli/dist/web-ui/docs/en/cli/sdk-demos.md +347 -0
- package/cli/dist/web-ui/docs/en/cli/sdk-hooks.md +813 -0
- package/cli/dist/web-ui/docs/en/cli/sdk-mcp.md +645 -0
- package/cli/dist/web-ui/docs/en/cli/sdk-permissions.md +461 -0
- package/cli/dist/web-ui/docs/en/cli/sdk-python.md +783 -0
- package/cli/dist/web-ui/docs/en/cli/sdk-sessions.md +340 -0
- package/cli/dist/web-ui/docs/en/cli/sdk-typescript.md +759 -0
- package/cli/dist/web-ui/docs/en/cli/sdk.md +1103 -0
- package/cli/dist/web-ui/docs/en/cli/security.md +387 -0
- package/cli/dist/web-ui/docs/en/cli/settings.md +602 -0
- package/cli/dist/web-ui/docs/en/cli/skills.md +448 -0
- package/cli/dist/web-ui/docs/en/cli/slash-commands.md +397 -0
- package/cli/dist/web-ui/docs/en/cli/statusline.md +525 -0
- package/cli/dist/web-ui/docs/en/cli/sub-agents.md +621 -0
- package/cli/dist/web-ui/docs/en/cli/terminal-config.md +77 -0
- package/cli/dist/web-ui/docs/en/cli/tools-reference.md +99 -0
- package/cli/dist/web-ui/docs/en/cli/troubleshooting.md +190 -0
- package/cli/dist/web-ui/docs/en/cli/web-ui.md +164 -0
- package/cli/dist/web-ui/docs/en/cli/wecom-bot-setup.md +274 -0
- package/cli/dist/web-ui/docs/en/cli/worktree.md +660 -0
- package/cli/dist/web-ui/docs/search-index-en.json +1 -0
- package/cli/dist/web-ui/docs/search-index-zh.json +1 -0
- package/cli/dist/web-ui/docs/sidebar-en.json +1 -0
- package/cli/dist/web-ui/docs/sidebar-zh.json +1 -0
- package/cli/dist/web-ui/index.html +2 -2
- package/cli/package.json +1 -1
- package/cli/product.cloudhosted.json +2 -2
- package/cli/product.internal.json +2 -2
- package/cli/product.ioa.json +2 -2
- package/cli/product.json +4 -3
- package/cli/product.selfhosted.json +2 -2
- package/lib/query.d.ts.map +1 -1
- package/lib/query.js +5 -1
- package/lib/query.js.map +1 -1
- package/lib/transport/index.d.ts +1 -1
- package/lib/transport/index.d.ts.map +1 -1
- package/lib/transport/process-transport.d.ts +1 -1
- package/lib/transport/process-transport.d.ts.map +1 -1
- package/lib/transport/process-transport.js +5 -1
- package/lib/transport/process-transport.js.map +1 -1
- package/lib/types.d.ts +3 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/cli/dist/web-ui/assets/index-BPT-qRRx.js +0 -411
- package/cli/dist/web-ui/assets/index-f_ibHSHw.css +0 -32
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# 环境变量参考
|
|
2
|
+
|
|
3
|
+
CodeBuddy Code 支持通过环境变量来控制其行为。这些变量可以在启动前设置,也可以在 [`settings.json`](./settings.md#可用设置) 的 `env` 字段中配置以应用到每个会话。
|
|
4
|
+
|
|
5
|
+
> **提示**:所有环境变量也可以在 `settings.json` 的 `env` 字段中设置,这样可以自动为每个会话应用,或为整个团队推出配置。
|
|
6
|
+
|
|
7
|
+
## 认证相关
|
|
8
|
+
|
|
9
|
+
| 环境变量 | 说明 |
|
|
10
|
+
|---------|------|
|
|
11
|
+
| `CODEBUDDY_API_KEY` | API 密钥。设置此密钥用于模型接口调用。在非交互模式 (`-p`) 下始终使用此密钥 |
|
|
12
|
+
| `CODEBUDDY_AUTH_TOKEN` | CodeBuddy 平台认证令牌,用于所有平台接口调用 |
|
|
13
|
+
| `CODEBUDDY_CUSTOM_HEADERS` | 自定义 HTTP 请求头。格式:`Name: Value`,多个请求头用换行符或 `\n` 分隔 |
|
|
14
|
+
|
|
15
|
+
## API 端点和代理
|
|
16
|
+
|
|
17
|
+
| 环境变量 | 说明 |
|
|
18
|
+
|---------|------|
|
|
19
|
+
| `CODEBUDDY_BASE_URL` | 覆盖 API 端点地址,通常与 `CODEBUDDY_API_KEY` 配合使用 |
|
|
20
|
+
| `CODEBUDDY_INTERNET_ENVIRONMENT` | 网络环境配置(`internal` 用于中国版,`ioa` 用于 iOA 企业版) |
|
|
21
|
+
| `HTTP_PROXY` / `http_proxy` | HTTP 代理服务器地址 |
|
|
22
|
+
| `HTTPS_PROXY` / `https_proxy` | HTTPS 代理服务器地址 |
|
|
23
|
+
| `NO_PROXY` / `no_proxy` | 绕过代理的域和 IP 列表(逗号分隔,如 `localhost,.example.com`) |
|
|
24
|
+
|
|
25
|
+
## 模型配置
|
|
26
|
+
|
|
27
|
+
| 环境变量 | 说明 |
|
|
28
|
+
|---------|------|
|
|
29
|
+
| `CODEBUDDY_MODEL` | 覆盖默认代理模型 |
|
|
30
|
+
| `CODEBUDDY_SMALL_FAST_MODEL` | 后台任务使用的小型快速模型 |
|
|
31
|
+
| `CODEBUDDY_BIG_SLOW_MODEL` | 复杂推理任务使用的大型模型 |
|
|
32
|
+
| `CODEBUDDY_CODE_SUBAGENT_MODEL` | 子代理使用的模型 |
|
|
33
|
+
| `MAX_THINKING_TOKENS` | 启用扩展思考并设置思考过程的 token 预算。默认禁用 |
|
|
34
|
+
|
|
35
|
+
## Bash 工具配置
|
|
36
|
+
|
|
37
|
+
| 环境变量 | 说明 |
|
|
38
|
+
|---------|------|
|
|
39
|
+
| `BASH_DEFAULT_TIMEOUT_MS` | 长时间运行 bash 命令的默认超时(默认:120000) |
|
|
40
|
+
| `BASH_MAX_OUTPUT_LENGTH` | bash 输出在内存中保留的最大字符数(默认:30000,上限:150000)。超出部分会被中间截断(保留 head 20% + tail 80%),完整输出会自动保存到磁盘 |
|
|
41
|
+
| `BASH_MAX_TIMEOUT_MS` | 模型可为长时间运行的 bash 命令设置的最大超时(默认:600000) |
|
|
42
|
+
|
|
43
|
+
## 工具输出外部化
|
|
44
|
+
|
|
45
|
+
| 环境变量 | 说明 |
|
|
46
|
+
|---------|------|
|
|
47
|
+
| `CODEBUDDY_TOOL_RESULT_THRESHOLD_KB` | 工具结果外部化的大小阈值(KB),超过此阈值的非 bash 工具结果会被保存到磁盘并替换为占位符(默认:50)|
|
|
48
|
+
|
|
49
|
+
> **说明**:Bash 工具的输出外部化由 `BASH_MAX_OUTPUT_LENGTH` 控制,当输出超过该值发生截断时,完整输出自动流式写入磁盘。`CODEBUDDY_TOOL_RESULT_THRESHOLD_KB` 主要影响其他工具(如 MCP 工具)的大输出处理。详见[工具输出外部化](#工具输出外部化机制)章节。
|
|
50
|
+
|
|
51
|
+
## 工具和功能开关
|
|
52
|
+
|
|
53
|
+
| 环境变量 | 说明 |
|
|
54
|
+
|---------|------|
|
|
55
|
+
| `CODEBUDDY_DISABLE_HOT_RELOAD` | 设置为 `1` 禁用热更新系统 |
|
|
56
|
+
| `CODEBUDDY_SKIP_BUILTIN_MARKETPLACE` | 设置为 `1` 跳过内置插件市场加载 |
|
|
57
|
+
| `CODEBUDDY_IMAGE_GEN_ENABLED` | 设置为 `false` 或 `0` 禁用图片生成功能 |
|
|
58
|
+
| `CODEBUDDY_IMAGE_EDIT_ENABLED` | 设置为 `false` 或 `0` 禁用图片编辑功能 |
|
|
59
|
+
| `CODEBUDDY_DEFER_TOOL_LOADING` | 设置为 `false` 或 `0` 禁用 MCP 工具延迟加载 |
|
|
60
|
+
| `CODEBUDDY_SHOW_ALL_DEFERRED_TOOLS` | 设置为 `true` 或 `1` 显示所有延迟工具的完整描述 |
|
|
61
|
+
| `CODEBUDDY_DISABLE_CRON` | 设置为 `1` 禁用计划任务 |
|
|
62
|
+
|
|
63
|
+
## 上下文和内存
|
|
64
|
+
|
|
65
|
+
| 环境变量 | 说明 |
|
|
66
|
+
|---------|------|
|
|
67
|
+
| `CODEBUDDY_AUTOCOMPACT_PCT_OVERRIDE` | 设置自动压缩触发的上下文容量百分比(1-100)。默认由产品配置决定(通常 70-92%)。使用更低的值(如 `50`)来更早压缩 |
|
|
68
|
+
| `CODEBUDDY_DISABLE_AUTO_MEMORY` | 设置为 `1` 禁用自动内存,设置为 `0` 启用 |
|
|
69
|
+
| `CODEBUDDY_MEMORY_ENABLED` | 设置为 `true` 或 `1` 启用记忆功能 |
|
|
70
|
+
| `CODEBUDDY_TYPED_MEMORY_ENABLED` | 设置为 `true` 或 `1` 启用分类记忆模式 |
|
|
71
|
+
| `CODEBUDDY_TEAM_MEMORY_ENABLED` | 设置为 `true` 或 `1` 启用团队记忆模式 |
|
|
72
|
+
| `CODEBUDDY_USER_ID` | 团队记忆模式下的用户 ID |
|
|
73
|
+
|
|
74
|
+
## MCP (Model Context Protocol)
|
|
75
|
+
|
|
76
|
+
| 环境变量 | 说明 |
|
|
77
|
+
|---------|------|
|
|
78
|
+
| `MCP_TIMEOUT` | MCP 服务器连接的超时时间(毫秒) |
|
|
79
|
+
| `MCP_TOOL_TIMEOUT` | MCP 工具执行的超时时间(毫秒) |
|
|
80
|
+
| `MAX_MCP_OUTPUT_TOKENS` | MCP 工具响应中允许的最大 token 数(默认:20000) |
|
|
81
|
+
|
|
82
|
+
## 性能和输出
|
|
83
|
+
|
|
84
|
+
| 环境变量 | 说明 |
|
|
85
|
+
|---------|------|
|
|
86
|
+
| `CODEBUDDY_CODE_MAX_OUTPUT_TOKENS` | 设置大多数请求的最大输出 token 数 |
|
|
87
|
+
| `CODEBUDDY_CODE_FILE_READ_MAX_OUTPUT_TOKENS` | 覆盖文件读取的默认 token 限制(默认:20000) |
|
|
88
|
+
| `CODEBUDDY_STREAM_TIMEOUT_MS` | 流式响应中两个数据块之间允许的最大静默时间(毫秒)(默认:120000) |
|
|
89
|
+
| `CODEBUDDY_FIRST_TOKEN_TIMEOUT_MS` | 等待第一个模型输出的最大时间(毫秒)(默认:120000) |
|
|
90
|
+
|
|
91
|
+
## 文件系统和配置
|
|
92
|
+
|
|
93
|
+
| 环境变量 | 说明 |
|
|
94
|
+
|---------|------|
|
|
95
|
+
| `CODEBUDDY_CONFIG_DIR` | 自定义 CodeBuddy Code 存储配置和数据文件的位置 |
|
|
96
|
+
| `CODEBUDDY_CODE_DEBUG_LOGS_DIR` | 调试日志目录 |
|
|
97
|
+
| `CODEBUDDY_SANDBOX_IMAGE` | 容器沙箱镜像(默认:`node:20-alpine`) |
|
|
98
|
+
| `USE_BUILTIN_RIPGREP` | 设置为 `0` 使用系统安装的 `rg` 而不是 CodeBuddy Code 附带的 `rg` |
|
|
99
|
+
|
|
100
|
+
## Shell 配置
|
|
101
|
+
|
|
102
|
+
| 环境变量 | 说明 |
|
|
103
|
+
|---------|------|
|
|
104
|
+
| `CODEBUDDY_CODE_SHELL` | 覆盖自动 shell 检测。支持的值:`bash`、`zsh`、`sh`、`powershell`、`cmd` |
|
|
105
|
+
| `CODEBUDDY_CODE_SHELL_PREFIX` | 包装所有 shell 命令的命令前缀(如用于日志或审计) |
|
|
106
|
+
| `CODEBUDDY_CODE_GIT_BASH_PATH` | Windows 下显式指定 Git Bash 路径 |
|
|
107
|
+
| `CODEBUDDY_ENV_FILE` | 在执行每个 shell 命令前自动 source 的环境文件路径 |
|
|
108
|
+
|
|
109
|
+
## UI 和交互
|
|
110
|
+
|
|
111
|
+
| 环境变量 | 说明 |
|
|
112
|
+
|---------|------|
|
|
113
|
+
| `CODEBUDDY_CODE_DISABLE_TERMINAL_TITLE` | 设置为 `1` 禁用自动终端标题更新 |
|
|
114
|
+
| `CODEBUDDY_PROMPT_SUGGESTION_DISABLED` | 设置为 `true` 禁用提示建议 |
|
|
115
|
+
| `IS_DEMO` | 设置为 `true` 启用演示模式:隐藏邮箱和组织 |
|
|
116
|
+
|
|
117
|
+
## 安全和认证
|
|
118
|
+
|
|
119
|
+
| 环境变量 | 说明 |
|
|
120
|
+
|---------|------|
|
|
121
|
+
| `CODEBUDDY_CODE_CLIENT_CERT` | mTLS 客户端证书文件路径 ⚠️ *暂未支持* |
|
|
122
|
+
| `CODEBUDDY_CODE_CLIENT_KEY` | mTLS 客户端私钥文件路径 ⚠️ *暂未支持* |
|
|
123
|
+
| `CODEBUDDY_CODE_CLIENT_KEY_PASSPHRASE` | mTLS 加密私钥的密码(可选)⚠️ *暂未支持* |
|
|
124
|
+
|
|
125
|
+
## 遥测和报告
|
|
126
|
+
|
|
127
|
+
| 环境变量 | 说明 |
|
|
128
|
+
|---------|------|
|
|
129
|
+
| `DISABLE_TELEMETRY` | 设置为 `1` 禁用遥测 |
|
|
130
|
+
| `DISABLE_ERROR_REPORTING` | 设置为 `1` 禁用错误报告 |
|
|
131
|
+
| `DISABLE_AUTOUPDATER` | 设置为 `1` 禁用自动更新 |
|
|
132
|
+
| `DISABLE_FEEDBACK_COMMAND` | 设置为 `1` 禁用 `/feedback` 命令 |
|
|
133
|
+
|
|
134
|
+
## 任务和后台工作
|
|
135
|
+
|
|
136
|
+
| 环境变量 | 说明 |
|
|
137
|
+
|---------|------|
|
|
138
|
+
| `CODEBUDDY_DISABLE_BACKGROUND_TASKS` | 设置为 `1` 禁用所有后台任务功能 |
|
|
139
|
+
|
|
140
|
+
## Agent 执行控制
|
|
141
|
+
|
|
142
|
+
| 环境变量 | 说明 |
|
|
143
|
+
|---------|------|
|
|
144
|
+
| `CODEBUDDY_CODE_MAX_TURNS` | 主 Agent 的最大执行轮次。优先级:CLI `--max-turns` > 此环境变量 > 默认值 (500) |
|
|
145
|
+
| `CODEBUDDY_CODE_SUBAGENT_MAX_TURNS` | 子 Agent 的最大执行轮次。优先级:CLI `--max-turns` > 此环境变量 > 模型动态传入的 `max_turns` > 默认值 (500) |
|
|
146
|
+
|
|
147
|
+
## Gateway 和远程访问
|
|
148
|
+
|
|
149
|
+
| 环境变量 | 说明 |
|
|
150
|
+
|---------|------|
|
|
151
|
+
| `CODEBUDDY_GATEWAY_AUTH` | Gateway 认证模式(`password` 或 `none`) |
|
|
152
|
+
| `CODEBUDDY_GATEWAY_PASSWORD` | Gateway 访问密码 |
|
|
153
|
+
| `CODEBUDDY_GATEWAY_FORCE_TUNNEL` | 设置为 `1` 强制使用 tunnel 模式 |
|
|
154
|
+
| `SERVER__HOST` | `--serve` 模式监听地址(默认:`127.0.0.1`) |
|
|
155
|
+
| `SERVER__PORT` | `--serve` 模式监听端口 |
|
|
156
|
+
|
|
157
|
+
## 企业微信集成
|
|
158
|
+
|
|
159
|
+
| 环境变量 | 说明 |
|
|
160
|
+
|---------|------|
|
|
161
|
+
| `CODEBUDDY_GATEWAY_WECHAT_KF_TOKEN` | 企业微信客服 Token |
|
|
162
|
+
| `CODEBUDDY_GATEWAY_WECHAT_KF_ENCODING_AES_KEY` | 企业微信客服加密密钥 |
|
|
163
|
+
| `CODEBUDDY_GATEWAY_WECHAT_KF_CORP_ID` | 企业微信客服企业 ID |
|
|
164
|
+
| `CODEBUDDY_GATEWAY_WECHAT_KF_CORP_SECRET` | 企业微信客服企业密钥 |
|
|
165
|
+
| `CODEBUDDY_GATEWAY_WECHAT_KF_ACCOUNT_NAME` | 企业微信客服账户名 |
|
|
166
|
+
| `CODEBUDDY_GATEWAY_WECOM_TOKEN` | 企业微信 Token |
|
|
167
|
+
| `CODEBUDDY_GATEWAY_WECOM_ENCODING_AES_KEY` | 企业微信加密密钥 |
|
|
168
|
+
| `CODEBUDDY_GATEWAY_WECOM_CORP_ID` | 企业微信企业 ID |
|
|
169
|
+
| `CODEBUDDY_GATEWAY_WECOM_CORP_SECRET` | 企业微信企业密钥 |
|
|
170
|
+
| `CODEBUDDY_GATEWAY_WECOM_AGENT_ID` | 企业微信应用 ID |
|
|
171
|
+
|
|
172
|
+
## 调试和诊断
|
|
173
|
+
|
|
174
|
+
| 环境变量 | 说明 |
|
|
175
|
+
|---------|------|
|
|
176
|
+
| `CODEBUDDY_DEBUG` | 设置为 `1` 启用调试模式 |
|
|
177
|
+
| `CODEBUDDY_DEBUG_REQUEST` | 设置为 `1` 启用请求调试 |
|
|
178
|
+
| `CODEBUDDY_STARTUP_PROFILE` | 设置为 `1` 启用启动性能分析 |
|
|
179
|
+
|
|
180
|
+
## 其他
|
|
181
|
+
|
|
182
|
+
| 环境变量 | 说明 |
|
|
183
|
+
|---------|------|
|
|
184
|
+
| `SLASH_COMMAND_TOOL_CHAR_BUDGET` | 斜杠命令工具元数据的最大字符数(默认:15000) |
|
|
185
|
+
| `CODEBUDDY_CODE_API_KEY_HELPER_TTL_MS` | 刷新凭证的间隔(毫秒)(默认:300000) |
|
|
186
|
+
|
|
187
|
+
## 使用示例
|
|
188
|
+
|
|
189
|
+
### 基础认证配置
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
# 设置 API 密钥
|
|
193
|
+
export CODEBUDDY_API_KEY="your-api-key"
|
|
194
|
+
|
|
195
|
+
# 设置代理服务器
|
|
196
|
+
export HTTP_PROXY="http://proxy.example.com:8080"
|
|
197
|
+
export HTTPS_PROXY="https://proxy.example.com:8080"
|
|
198
|
+
|
|
199
|
+
# 设置代理绕过列表
|
|
200
|
+
export NO_PROXY="localhost,127.0.0.1,.internal.example.com"
|
|
201
|
+
|
|
202
|
+
# 设置自定义请求头(多个 header 使用 \n 分隔)
|
|
203
|
+
export CODEBUDDY_CUSTOM_HEADERS="X-Custom-Header: value1\nX-Another-Header: value2"
|
|
204
|
+
|
|
205
|
+
# 启动 CodeBuddy
|
|
206
|
+
codebuddy
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 使用第三方模型服务
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# 使用自定义 API 端点
|
|
213
|
+
export CODEBUDDY_API_KEY="your-api-key"
|
|
214
|
+
export CODEBUDDY_BASE_URL="https://api.example.com/v1"
|
|
215
|
+
codebuddy --model your-model-name
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### 中国版配置
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# 设置中国版环境标识
|
|
222
|
+
export CODEBUDDY_INTERNET_ENVIRONMENT=internal
|
|
223
|
+
|
|
224
|
+
# 设置 API 密钥
|
|
225
|
+
export CODEBUDDY_API_KEY="your-api-key"
|
|
226
|
+
|
|
227
|
+
# 启动 CodeBuddy
|
|
228
|
+
codebuddy
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### 启用高级功能
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# 启用自动内存
|
|
235
|
+
export CODEBUDDY_DISABLE_AUTO_MEMORY="0"
|
|
236
|
+
|
|
237
|
+
# 启用扩展思考
|
|
238
|
+
export MAX_THINKING_TOKENS="10000"
|
|
239
|
+
|
|
240
|
+
# 非交互模式运行
|
|
241
|
+
codebuddy -p -y "你的查询"
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### 调试和性能分析
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# 启用调试模式
|
|
248
|
+
export CODEBUDDY_DEBUG="1"
|
|
249
|
+
|
|
250
|
+
# 启用启动性能分析
|
|
251
|
+
export CODEBUDDY_STARTUP_PROFILE="1"
|
|
252
|
+
|
|
253
|
+
# 启动 CodeBuddy
|
|
254
|
+
codebuddy
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## 在 settings.json 中配置
|
|
258
|
+
|
|
259
|
+
环境变量也可以在 `settings.json` 的 `env` 字段中设置:
|
|
260
|
+
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"env": {
|
|
264
|
+
"CODEBUDDY_API_KEY": "your-api-key",
|
|
265
|
+
"HTTPS_PROXY": "https://proxy.example.com:8080",
|
|
266
|
+
"MAX_THINKING_TOKENS": "10000",
|
|
267
|
+
"CODEBUDDY_DISABLE_AUTO_MEMORY": "0"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## 工具输出外部化机制
|
|
273
|
+
|
|
274
|
+
当工具执行产生的输出超过阈值时,CodeBuddy Code 会自动将完整输出保存到磁盘,给模型只发送截断后的内容和文件路径指针,模型可按需读取完整内容。
|
|
275
|
+
|
|
276
|
+
### 数据流
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
Shell 输出
|
|
280
|
+
├─→ OutputSpiller(完整输出流式写入磁盘)
|
|
281
|
+
└─→ TruncateBuffer(内存中保留 head + tail,约 30KB)
|
|
282
|
+
↓
|
|
283
|
+
检测到截断 → 生成 placeholder(~2KB preview + 文件路径)
|
|
284
|
+
↓
|
|
285
|
+
模型收到 placeholder,可通过 Read 工具按需读取完整文件
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### 各阶段数据大小(以 1.3MB 输出为例)
|
|
289
|
+
|
|
290
|
+
| 阶段 | 内容 | 大小 |
|
|
291
|
+
|------|------|------|
|
|
292
|
+
| 磁盘文件(OutputSpiller) | 完整原始输出 | 1,355,099 bytes |
|
|
293
|
+
| 内存缓冲(TruncateBuffer) | head 6KB + tail 24KB | ~30KB |
|
|
294
|
+
| 发给模型(placeholder) | 文件路径 + preview | ~2KB |
|
|
295
|
+
|
|
296
|
+
### 存储目录
|
|
297
|
+
|
|
298
|
+
工具输出文件存储在项目数据目录中:
|
|
299
|
+
|
|
300
|
+
```
|
|
301
|
+
~/.codebuddy/projects/{projectDir}/
|
|
302
|
+
└── {sessionId}/
|
|
303
|
+
├── tool-results/ ← 主 session 的工具结果
|
|
304
|
+
│ ├── {callId}.txt
|
|
305
|
+
│ └── ...
|
|
306
|
+
└── subagents/ ← 子代理数据
|
|
307
|
+
├── agent-{agentId}.jsonl ← 子代理对话历史
|
|
308
|
+
└── agent-{agentId}/
|
|
309
|
+
└── tool-results/ ← 子代理的工具结果
|
|
310
|
+
├── {callId}.txt
|
|
311
|
+
└── ...
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### 相关环境变量
|
|
315
|
+
|
|
316
|
+
| 环境变量 | 影响范围 | 默认值 |
|
|
317
|
+
|---------|---------|--------|
|
|
318
|
+
| `BASH_MAX_OUTPUT_LENGTH` | Bash 工具内存保留量,超出则截断并触发磁盘外部化 | 30000 |
|
|
319
|
+
| `CODEBUDDY_TOOL_RESULT_THRESHOLD_KB` | 非 bash 工具(如 MCP)在 session 层的外部化阈值 | 50 |
|
|
320
|
+
|
|
321
|
+
## 另见
|
|
322
|
+
|
|
323
|
+
- [Settings](./settings.md) - 在 `settings.json` 中配置环境变量和其他设置
|
|
324
|
+
- [CLI Reference](./cli-reference.md) - 命令行参数完整列表
|
|
325
|
+
- [MCP Setup](./mcp.md) - MCP 服务器配置
|
|
326
|
+
- [子代理](./sub-agents.md) - 子代理存储目录说明
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
# CodeBuddy Code GitLab CI/CD 集成
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
CodeBuddy Code 支持与 GitLab CI/CD 深度集成,让您能够在 CI/CD 流水线中使用 AI 辅助完成代码审查、自动化实现和智能优化等任务。该集成基于 CodeBuddy Code CLI 构建,可在 GitLab CI 作业中以编程方式使用 AI 能力。
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## 工作原理
|
|
9
|
+
|
|
10
|
+
CodeBuddy Code 利用 GitLab CI/CD 在隔离的作业中运行 AI 任务,并通过 MR 提交结果:
|
|
11
|
+
|
|
12
|
+
1. **事件驱动编排**: GitLab 监听您选择的触发器(例如 Issue、MR 或评论中提及 @codebuddy)。作业收集上下文和代码库信息,构建提示并运行 CodeBuddy Code。
|
|
13
|
+
|
|
14
|
+
2. **沙箱执行**:每次交互都在具有严格网络和文件系统规则的容器中运行。CodeBuddy Code 强制执行工作区范围的权限约束写入。每个变更都通过 MR 流转,审查者可以看到差异,审批流程仍然适用。
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## CodeBuddy 能做什么?
|
|
19
|
+
|
|
20
|
+
CodeBuddy Code 支持强大的 CI/CD 工作流,改变您与代码的协作方式:
|
|
21
|
+
|
|
22
|
+
- 从 Issue 描述或评论创建和更新 MR
|
|
23
|
+
- 分析性能回归并提出优化建议
|
|
24
|
+
- 直接在分支中实现功能,然后创建 MR
|
|
25
|
+
- 修复测试或评论中发现的 Bug 和回归问题
|
|
26
|
+
- 响应后续评论以迭代完善请求的变更
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 配置指南
|
|
31
|
+
|
|
32
|
+
### 快速配置
|
|
33
|
+
|
|
34
|
+
最快的入门方式是在 .gitlab-ci.yml 中添加一个最小化的作业,并将 API 密钥设置为受保护的变量。
|
|
35
|
+
|
|
36
|
+
**步骤 1:添加受保护的 CI/CD 变量**
|
|
37
|
+
|
|
38
|
+
进入 GitLab 项目的 **设置 → CI/CD → 变量**,添加以下环境变量:
|
|
39
|
+
|
|
40
|
+
**认证配置:**
|
|
41
|
+
|
|
42
|
+
在 GitLab 项目的 **设置 → CI/CD → 变量** 中添加以下环境变量:
|
|
43
|
+
|
|
44
|
+
- **CODEBUDDY_API_KEY** (必需)
|
|
45
|
+
- 用于模型接口调用的 API 密钥
|
|
46
|
+
- 配置时勾选: ✅ 受保护 (Protect variable)、✅ 已屏蔽 (Mask variable)
|
|
47
|
+
|
|
48
|
+
**可选配置:**
|
|
49
|
+
|
|
50
|
+
- **CODEBUDDY_INTERNET_ENVIRONMENT**
|
|
51
|
+
- 网络环境配置(中国版用户需要设置为 `internal`,iOA 用户设置为 `iOA`)
|
|
52
|
+
|
|
53
|
+
- **CODEBUDDY_BASE_URL**
|
|
54
|
+
- 自定义模型服务的基础 URL(需兼容 OpenAI 接口协议)
|
|
55
|
+
|
|
56
|
+
- **GITLAB_ACCESS_TOKEN**
|
|
57
|
+
- GitLab 项目访问令牌(需具有 api 范围)
|
|
58
|
+
- 用于 CodeBuddy 创建/更新 MR 和评论
|
|
59
|
+
- 如不配置,默认使用 `CI_JOB_TOKEN`
|
|
60
|
+
- 配置时勾选: ✅ 受保护、✅ 已屏蔽
|
|
61
|
+
|
|
62
|
+
> 📖 **完整配置指南**:根据您的账号类型,查看对应的配置方法和 API KEY 获取地址:
|
|
63
|
+
> - **iOA 账号用户**(公司内部):参考 [iOA 账号使用 API KEY](settings.md#ioa-账号使用-api-key)
|
|
64
|
+
> - **中国版用户**:参考 [中国版使用 API KEY](settings.md#中国版使用-api-key)
|
|
65
|
+
> - **海外版用户**:参考 [海外版使用 API KEY](settings.md#海外版使用-api-key)
|
|
66
|
+
>
|
|
67
|
+
> 每个章节包含完整的环境变量配置方法和 API KEY 获取地址。
|
|
68
|
+
|
|
69
|
+
**步骤 2:在 .gitlab-ci.yml 中添加 CodeBuddy 作业**
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
stages:
|
|
73
|
+
- ai
|
|
74
|
+
|
|
75
|
+
codebuddy:
|
|
76
|
+
stage: ai
|
|
77
|
+
image: node:24-alpine3.21
|
|
78
|
+
# 根据需要调整触发规则:
|
|
79
|
+
# - 手动运行
|
|
80
|
+
# - 合并请求事件
|
|
81
|
+
# - 当评论包含 '@codebuddy' 时通过 Web/API 触发
|
|
82
|
+
rules:
|
|
83
|
+
- if: '$CI_PIPELINE_SOURCE == "web"'
|
|
84
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
85
|
+
variables:
|
|
86
|
+
GIT_STRATEGY: fetch
|
|
87
|
+
# CODEBUDDY_API_KEY 从 CI/CD 变量中自动注入
|
|
88
|
+
# 可选变量: CODEBUDDY_BASE_URL, GITLAB_ACCESS_TOKEN
|
|
89
|
+
before_script:
|
|
90
|
+
- apk update
|
|
91
|
+
- apk add --no-cache git curl bash
|
|
92
|
+
- npm install -g @tencent-ai/codebuddy-code
|
|
93
|
+
# 验证 CODEBUDDY_API_KEY 已设置
|
|
94
|
+
- |
|
|
95
|
+
if [ -z "$CODEBUDDY_API_KEY" ]; then
|
|
96
|
+
echo "错误: CODEBUDDY_API_KEY 未设置。请在 GitLab CI/CD 变量中配置"
|
|
97
|
+
exit 1
|
|
98
|
+
fi
|
|
99
|
+
script:
|
|
100
|
+
# 可选: 启动 GitLab MCP 服务器(如果您的环境提供)
|
|
101
|
+
- /bin/gitlab-mcp-server || true
|
|
102
|
+
# 使用 AI_FLOW_* 变量时通过 web/API 触发器传递上下文
|
|
103
|
+
- echo "$AI_FLOW_INPUT for $AI_FLOW_CONTEXT on $AI_FLOW_EVENT"
|
|
104
|
+
- >
|
|
105
|
+
codebuddy
|
|
106
|
+
-p "${AI_FLOW_INPUT:-'审查此 MR 并实现请求的变更'}"
|
|
107
|
+
--permission-mode acceptEdits
|
|
108
|
+
--allowedTools "Bash(*) Read(*) Edit(*) Write(*) mcp__gitlab"
|
|
109
|
+
--debug
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
添加作业和 API 密钥变量后,通过 CI/CD → 流水线手动运行作业进行测试,或从 MR 触发它,让 CodeBuddy 在分支中提出更新并在需要时创建 MR。
|
|
113
|
+
|
|
114
|
+
### 手动配置(推荐用于生产环境)
|
|
115
|
+
|
|
116
|
+
如果您需要更精细的控制:
|
|
117
|
+
|
|
118
|
+
1. **添加 GitLab API 操作的项目凭据**:
|
|
119
|
+
- 默认使用 CI_JOB_TOKEN,或创建具有 api 范围的项目访问令牌
|
|
120
|
+
- 如果使用 PAT,将其存储为 GITLAB_ACCESS_TOKEN(已屏蔽)
|
|
121
|
+
|
|
122
|
+
2. **在 .gitlab-ci.yml 中添加 CodeBuddy 作业**(参见上面的示例)
|
|
123
|
+
|
|
124
|
+
3. **(可选)启用提及驱动的触发器**:
|
|
125
|
+
- 为"评论(notes)"添加项目 Webhook 到您的事件监听器(如果使用)
|
|
126
|
+
- 让监听器在评论包含 @codebuddy 时调用流水线触发 API,传递 AI_FLOW_INPUT 和 AI_FLOW_CONTEXT 等变量
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 使用示例
|
|
131
|
+
|
|
132
|
+
### 将 Issue 转化为 MR
|
|
133
|
+
|
|
134
|
+
在 Issue 评论中:
|
|
135
|
+
```
|
|
136
|
+
@codebuddy 根据 Issue 描述实现此功能
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
CodeBuddy 分析 Issue 和代码库,在分支中编写变更,并创建 MR 供审查。
|
|
140
|
+
|
|
141
|
+
### 获取实现帮助
|
|
142
|
+
|
|
143
|
+
在 MR 讨论中:
|
|
144
|
+
```
|
|
145
|
+
@codebuddy 建议一个具体的方法来缓存此 API 调用的结果
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
CodeBuddy 提出变更方案,添加适当的缓存代码,并更新 MR。
|
|
149
|
+
|
|
150
|
+
### 快速修复 Bug
|
|
151
|
+
|
|
152
|
+
在 Issue 或 MR 评论中:
|
|
153
|
+
```
|
|
154
|
+
@codebuddy 修复用户仪表板组件中的 TypeError
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
CodeBuddy 定位 Bug,实现修复,并更新分支或创建新的 MR。
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 最佳实践
|
|
162
|
+
|
|
163
|
+
### CODEBUDDY.md 配置
|
|
164
|
+
|
|
165
|
+
在仓库根目录创建 CODEBUDDY.md 文件,定义编码标准、审查标准和项目特定规则。CodeBuddy 在运行期间会读取此文件,并在提出变更时遵循您的约定。
|
|
166
|
+
|
|
167
|
+
示例 CODEBUDDY.md:
|
|
168
|
+
```markdown
|
|
169
|
+
# 项目编码规范
|
|
170
|
+
|
|
171
|
+
## 代码风格
|
|
172
|
+
- 使用 ESLint 和 Prettier 进行代码格式化
|
|
173
|
+
- 遵循 Airbnb JavaScript 风格指南
|
|
174
|
+
- 使用 TypeScript 严格模式
|
|
175
|
+
|
|
176
|
+
## 提交规范
|
|
177
|
+
- 遵循 Conventional Commits 规范
|
|
178
|
+
- 提交信息使用中文
|
|
179
|
+
- 每个提交只包含一个逻辑变更
|
|
180
|
+
|
|
181
|
+
## 测试要求
|
|
182
|
+
- 所有新功能必须包含单元测试
|
|
183
|
+
- 测试覆盖率不低于 80%
|
|
184
|
+
- 使用 Jest 作为测试框架
|
|
185
|
+
|
|
186
|
+
## MR 审查清单
|
|
187
|
+
- 代码通过所有 CI 检查
|
|
188
|
+
- 至少一名团队成员审查通过
|
|
189
|
+
- 更新相关文档
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 安全考虑
|
|
193
|
+
|
|
194
|
+
**永远不要将敏感信息提交到仓库!** 始终使用 GitLab CI/CD 变量:
|
|
195
|
+
|
|
196
|
+
- 将敏感配置添加为已屏蔽的变量(如有需要,标记为受保护)
|
|
197
|
+
- 限制作业权限和网络出口
|
|
198
|
+
- 像审查其他贡献者一样审查 CodeBuddy 的 MR
|
|
199
|
+
|
|
200
|
+
### 性能优化
|
|
201
|
+
|
|
202
|
+
- 保持 CODEBUDDY.md 简洁明了
|
|
203
|
+
- 提供清晰的 Issue/MR 描述以减少迭代
|
|
204
|
+
- 配置合理的作业超时以避免失控运行
|
|
205
|
+
- 在 Runner 中缓存 npm 和包安装(如果可能)
|
|
206
|
+
|
|
207
|
+
### CI 成本控制
|
|
208
|
+
|
|
209
|
+
使用 CodeBuddy Code 与 GitLab CI/CD 时,请注意相关成本:
|
|
210
|
+
|
|
211
|
+
**GitLab Runner 时间:**
|
|
212
|
+
- CodeBuddy 在您的 GitLab Runner 上运行并消耗计算分钟
|
|
213
|
+
- 查看您的 GitLab 计划的 Runner 计费详情
|
|
214
|
+
|
|
215
|
+
**成本优化建议:**
|
|
216
|
+
- 使用具体的 @codebuddy 命令以减少不必要的轮次
|
|
217
|
+
- 设置适当的 --max-turns 和作业超时值
|
|
218
|
+
- 限制并发以控制并行运行
|
|
219
|
+
|
|
220
|
+
### 安全与治理
|
|
221
|
+
|
|
222
|
+
- 每个作业在具有受限网络访问的隔离容器中运行
|
|
223
|
+
- CodeBuddy 的变更通过 MR 流转,审查者可以看到每个差异
|
|
224
|
+
- 分支保护和审批规则适用于 AI 生成的代码
|
|
225
|
+
- CodeBuddy Code 使用工作区范围的权限约束写入
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 故障排除
|
|
230
|
+
|
|
231
|
+
### CodeBuddy 不响应 @codebuddy 命令
|
|
232
|
+
|
|
233
|
+
- 验证您的流水线正在被触发(手动、MR 事件或通过备注事件监听器/Webhook)
|
|
234
|
+
- 确保 CI/CD 变量存在且配置正确
|
|
235
|
+
- 检查评论是否包含 @codebuddy(不是 /codebuddy)并且您的提及触发器已配置
|
|
236
|
+
|
|
237
|
+
### 作业无法写入评论或创建 MR
|
|
238
|
+
|
|
239
|
+
- 确保 CI_JOB_TOKEN 对项目有足够的权限,或使用具有 api 范围的项目访问令牌
|
|
240
|
+
- 检查 mcp__gitlab 工具在 --allowedTools 中已启用
|
|
241
|
+
- 确认作业在 MR 上下文中运行或通过 AI_FLOW_* 变量有足够的上下文
|
|
242
|
+
|
|
243
|
+
### 身份验证错误
|
|
244
|
+
|
|
245
|
+
**认证变量未设置:**
|
|
246
|
+
- 确认已在 GitLab 项目的 **设置 → CI/CD → 变量** 中添加 `CODEBUDDY_API_KEY`
|
|
247
|
+
- 检查变量名称拼写是否正确(区分大小写)
|
|
248
|
+
- 如果设置了"受保护"选项,确保作业在受保护的分支上运行
|
|
249
|
+
|
|
250
|
+
**API 认证失败(401 Unauthorized):**
|
|
251
|
+
- 验证 API 密钥是否有效且未过期
|
|
252
|
+
- 确认复制 API 密钥时没有包含额外的空格或换行符
|
|
253
|
+
- 检查 API 密钥的权限范围是否足够
|
|
254
|
+
- 查看 [设置配置文档](settings.md#认证配置) 了解详细配置方法
|
|
255
|
+
|
|
256
|
+
**API 连接失败:**
|
|
257
|
+
- 检查 `CODEBUDDY_BASE_URL` 是否配置正确(如使用自定义端点)
|
|
258
|
+
- 验证 GitLab Runner 能否访问 CodeBuddy API 服务器
|
|
259
|
+
- 确认 URL 格式正确,包含协议(如 `https://api.example.com`)
|
|
260
|
+
|
|
261
|
+
**密钥在日志中可见:**
|
|
262
|
+
- 确保在 CI/CD 变量配置时勾选了 ✅ 已屏蔽 (Mask variable)
|
|
263
|
+
- 避免在脚本中直接 echo 或打印 API 密钥
|
|
264
|
+
|
|
265
|
+
**GitLab Access Token 相关问题:**
|
|
266
|
+
|
|
267
|
+
- 检查配置的 CI/CD 变量是否正确设置
|
|
268
|
+
- 验证相关的访问权限配置
|
|
269
|
+
- 确保 CI_JOB_TOKEN 或 GITLAB_ACCESS_TOKEN 具有足够的权限(api 范围)
|
|
270
|
+
|
|
271
|
+
### 作业超时
|
|
272
|
+
|
|
273
|
+
- 增加作业的 timeout 配置
|
|
274
|
+
- 简化提示以减少处理时间
|
|
275
|
+
- 考虑将大任务拆分为多个小任务
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## 高级配置
|
|
280
|
+
|
|
281
|
+
### 常用参数和变量
|
|
282
|
+
|
|
283
|
+
**环境变量:**
|
|
284
|
+
|
|
285
|
+
CodeBuddy Code 在 CI/CD 环境中使用以下环境变量:
|
|
286
|
+
|
|
287
|
+
**认证配置:**
|
|
288
|
+
- `CODEBUDDY_API_KEY`:用于模型接口调用,适合 CI/CD 非交互环境
|
|
289
|
+
|
|
290
|
+
**可选配置:**
|
|
291
|
+
- `CODEBUDDY_BASE_URL`:自定义模型服务的基础 URL
|
|
292
|
+
- `GITLAB_ACCESS_TOKEN`: GitLab API 访问令牌(用于 MR 操作)
|
|
293
|
+
- `CI_JOB_TOKEN`: GitLab CI 自动提供的作业令牌
|
|
294
|
+
|
|
295
|
+
**流程控制变量:**
|
|
296
|
+
- `AI_FLOW_INPUT`:通过 Web/API 触发器传递的用户输入
|
|
297
|
+
- `AI_FLOW_CONTEXT`:上下文信息(如 Issue ID、MR ID 等)
|
|
298
|
+
- `AI_FLOW_EVENT`:触发事件类型(如 note、issue、merge_request)
|
|
299
|
+
|
|
300
|
+
> 📖 关于各环境变量的详细说明和配置示例,请参考 [设置配置文档](settings.md#环境变量)
|
|
301
|
+
|
|
302
|
+
**命令行参数:**
|
|
303
|
+
|
|
304
|
+
CodeBuddy Code 支持这些常用输入:
|
|
305
|
+
|
|
306
|
+
- **prompt** (-p):内联提供指令
|
|
307
|
+
- **max-turns**:限制来回迭代的次数
|
|
308
|
+
- **permission-mode**:权限模式(如 acceptEdits)
|
|
309
|
+
- **allowedTools**:允许使用的工具列表
|
|
310
|
+
- **debug**:启用调试输出
|
|
311
|
+
|
|
312
|
+
**注意:** 确切的标志和参数可能因 @tencent-ai/codebuddy-code 版本而异。在作业中运行 `codebuddy --help` 查看支持的选项。
|
|
313
|
+
|
|
314
|
+
### 自定义 CodeBuddy 行为
|
|
315
|
+
|
|
316
|
+
您可以通过两种主要方式指导 CodeBuddy:
|
|
317
|
+
|
|
318
|
+
1. **CODEBUDDY.md**:定义编码标准、安全要求和项目约定。CodeBuddy 在运行期间读取此文件并遵循您的规则。
|
|
319
|
+
|
|
320
|
+
2. **自定义提示**:通过作业中的 prompt/prompt_file 传递特定于任务的指令。对不同的作业使用不同的提示(例如审查、实现、重构)。
|
|
321
|
+
|
|
322
|
+
### 多环境配置
|
|
323
|
+
|
|
324
|
+
您可以为不同的环境(开发、测试、生产)配置不同的 CodeBuddy 作业:
|
|
325
|
+
|
|
326
|
+
```yaml
|
|
327
|
+
# 开发环境 - 自动触发
|
|
328
|
+
codebuddy-dev:
|
|
329
|
+
stage: ai
|
|
330
|
+
rules:
|
|
331
|
+
- if: '$CI_COMMIT_BRANCH == "develop"'
|
|
332
|
+
script:
|
|
333
|
+
- codebuddy -p "快速审查并自动合并"
|
|
334
|
+
|
|
335
|
+
# 生产环境 - 手动触发
|
|
336
|
+
codebuddy-prod:
|
|
337
|
+
stage: ai
|
|
338
|
+
rules:
|
|
339
|
+
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
340
|
+
when: manual
|
|
341
|
+
script:
|
|
342
|
+
- codebuddy -p "详细审查,生成完整的变更报告"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## 参考资源
|
|
348
|
+
|
|
349
|
+
- [CodeBuddy Code 官方文档](../README.md)
|
|
350
|
+
- [CLI 参考](cli-reference.md)
|
|
351
|
+
- [设置配置](settings.md)
|
|
352
|
+
- [常见工作流](common-workflows.md)
|
|
353
|
+
- [故障排除](troubleshooting.md)
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
**让 AI 赋能您的 CI/CD 流水线,提升开发效率!**
|