@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.
- package/cli/CHANGELOG.md +26 -0
- package/cli/dist/codebuddy-headless.js +53 -53
- package/cli/dist/web-ui/assets/index-BoMlEqUE.js +439 -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 +199 -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.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 +357 -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 +1011 -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 +526 -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 +193 -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.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 +797 -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 +770 -0
- package/cli/dist/web-ui/docs/en/cli/sdk.md +1103 -0
- package/cli/dist/web-ui/docs/en/cli/security.md +388 -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 +3 -3
- package/cli/product.selfhosted.json +2 -2
- 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,530 @@
|
|
|
1
|
+
# 身份和访问管理
|
|
2
|
+
|
|
3
|
+
> 了解如何为组织中的 CodeBuddy Code 配置用户身份验证、授权和访问控制。
|
|
4
|
+
|
|
5
|
+
## 认证方法
|
|
6
|
+
|
|
7
|
+
### 快速开始
|
|
8
|
+
|
|
9
|
+
根据你的场景选择认证方式:
|
|
10
|
+
|
|
11
|
+
| 场景 | 推荐方式 | 如何获取凭据 |
|
|
12
|
+
|:-----|:--------|:------------|
|
|
13
|
+
| 个人开发者 | `CODEBUDDY_API_KEY` | [从平台获取 API Key](#个人用户获取-api-key) |
|
|
14
|
+
| 企业/团队(OAuth 集成) | `apiKeyHelper` | [创建应用获取 Client ID/Secret](#企业用户oauth-认证) |
|
|
15
|
+
| CI/CD 已有 OAuth token | `CODEBUDDY_AUTH_TOKEN` | 直接使用已有 token |
|
|
16
|
+
| 第三方模型服务 | `CODEBUDDY_API_KEY` + `BASE_URL` | 从第三方服务商获取 |
|
|
17
|
+
|
|
18
|
+
> 当多个认证方式同时配置时,按以下优先级生效:**CODEBUDDY_AUTH_TOKEN > apiKeyHelper > CODEBUDDY_API_KEY**
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### 企业用户:OAuth 认证
|
|
22
|
+
|
|
23
|
+
适用于企业/团队集成,通过 OAuth 2.0 获取 token。
|
|
24
|
+
|
|
25
|
+
> 目前仅介绍 Client Credentials 授权方式,适用于服务端应用和 CI/CD 场景。
|
|
26
|
+
|
|
27
|
+
> **前提条件**:企业用户需要先购买 CodeBuddy 旗舰版才能使用 OAuth 认证。详见 [CodeBuddy 旗舰版购买指南](https://cloud.tencent.com/document/product/1749/110012)。
|
|
28
|
+
|
|
29
|
+
**第 1 步:创建应用,获取 Client ID 和 Secret**
|
|
30
|
+
|
|
31
|
+
参考 [企业开发者快速入门](https://copilot.tencent.com/apiDocs/open-platform.html) 完成:
|
|
32
|
+
1. 创建企业应用
|
|
33
|
+
2. 获取 Client ID 和 Client Secret
|
|
34
|
+
|
|
35
|
+
**第 2 步:创建获取 token 的脚本**
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
#!/bin/bash
|
|
39
|
+
# get-oauth-token.sh - OAuth 2.0 Client Credentials 流程
|
|
40
|
+
|
|
41
|
+
CLIENT_ID="${OAUTH_CLIENT_ID}"
|
|
42
|
+
CLIENT_SECRET="${OAUTH_CLIENT_SECRET}"
|
|
43
|
+
TOKEN_URL="https://copilot.tencent.com/oauth2/token"
|
|
44
|
+
|
|
45
|
+
response=$(curl -s -X POST "$TOKEN_URL" \
|
|
46
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
47
|
+
-d "grant_type=client_credentials" \
|
|
48
|
+
-d "client_id=$CLIENT_ID" \
|
|
49
|
+
-d "client_secret=$CLIENT_SECRET")
|
|
50
|
+
|
|
51
|
+
echo "$response" | jq -r '.access_token'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**第 3 步:配置 apiKeyHelper**
|
|
55
|
+
|
|
56
|
+
在 `~/.codebuddy/settings.json` 或项目 `.codebuddy/settings.json` 中配置:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"apiKeyHelper": "/path/to/get-oauth-token.sh"
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
配置完成后即可使用 `codebuddy` 命令。
|
|
65
|
+
|
|
66
|
+
> apiKeyHelper 获取的 token 默认缓存 5 分钟,可通过 `CODEBUDDY_CODE_API_KEY_HELPER_TTL_MS` 环境变量调整(单位:毫秒)。
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### 第三方模型服务
|
|
71
|
+
|
|
72
|
+
适用于使用 OpenRouter 等第三方模型服务。
|
|
73
|
+
|
|
74
|
+
> **注意:** 使用第三方模型服务时,无需设置 `CODEBUDDY_INTERNET_ENVIRONMENT` 环境变量,因为请求直接发送到第三方服务端点。
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
export CODEBUDDY_API_KEY="sk-or-v1-xxx"
|
|
78
|
+
export CODEBUDDY_BASE_URL="https://openrouter.ai/api/v1"
|
|
79
|
+
codebuddy --model openai/gpt-4
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### 认证方式详解
|
|
85
|
+
|
|
86
|
+
#### CODEBUDDY_API_KEY
|
|
87
|
+
|
|
88
|
+
静态 API Key,适用于大部分场景。
|
|
89
|
+
|
|
90
|
+
| 特性 | 说明 |
|
|
91
|
+
|:-----|:-----|
|
|
92
|
+
| 环境变量 | `CODEBUDDY_API_KEY` |
|
|
93
|
+
| 认证类型 | API Key(X-Api-Key 请求头) |
|
|
94
|
+
| 适用场景 | 个人开发、第三方模型服务 |
|
|
95
|
+
|
|
96
|
+
> **⚠️ 注意:使用 API Key 时,必须同时配置 `CODEBUDDY_INTERNET_ENVIRONMENT` 环境变量!**
|
|
97
|
+
>
|
|
98
|
+
> | 版本 | 配置值 |
|
|
99
|
+
> |:----|:------|
|
|
100
|
+
> | 海外版 | 不设置(默认) |
|
|
101
|
+
> | 中国版 | `internal` |
|
|
102
|
+
> | iOA 版 | `ioa` |
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# 海外版
|
|
106
|
+
export CODEBUDDY_API_KEY="your-api-key"
|
|
107
|
+
|
|
108
|
+
# 中国版
|
|
109
|
+
export CODEBUDDY_API_KEY="your-api-key"
|
|
110
|
+
export CODEBUDDY_INTERNET_ENVIRONMENT=internal
|
|
111
|
+
|
|
112
|
+
# iOA 版
|
|
113
|
+
export CODEBUDDY_API_KEY="your-api-key"
|
|
114
|
+
export CODEBUDDY_INTERNET_ENVIRONMENT=ioa
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### CODEBUDDY_AUTH_TOKEN
|
|
118
|
+
|
|
119
|
+
已获取的 OAuth Bearer Token,适用于 CI/CD 或已有 token 的场景。
|
|
120
|
+
|
|
121
|
+
| 特性 | 说明 |
|
|
122
|
+
|:-----|:-----|
|
|
123
|
+
| 环境变量 | `CODEBUDDY_AUTH_TOKEN` |
|
|
124
|
+
| 认证类型 | Bearer Token(Authorization 请求头) |
|
|
125
|
+
| 适用场景 | CI/CD 自动化、已有 OAuth token |
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
export CODEBUDDY_AUTH_TOKEN="eyJhbGciOiJSUzI1NiIs..."
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
也可以在 settings.json 中配置:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"env": {
|
|
136
|
+
"CODEBUDDY_AUTH_TOKEN": "your-oauth-token"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
#### apiKeyHelper
|
|
142
|
+
|
|
143
|
+
通过脚本动态获取 token,适用于 OAuth 集成或需要定期刷新 token 的场景。
|
|
144
|
+
|
|
145
|
+
| 特性 | 说明 |
|
|
146
|
+
|:-----|:-----|
|
|
147
|
+
| 配置方式 | settings.json 的 `apiKeyHelper` 字段 |
|
|
148
|
+
| 认证类型 | Bearer Token(由脚本返回) |
|
|
149
|
+
| 缓存机制 | 默认 5 分钟,可通过 `CODEBUDDY_CODE_API_KEY_HELPER_TTL_MS` 配置 |
|
|
150
|
+
| 适用场景 | OAuth Client Credentials、Vault 集成、token 自动刷新 |
|
|
151
|
+
|
|
152
|
+
**脚本要求:**
|
|
153
|
+
- 将 token 输出到标准输出(stdout)
|
|
154
|
+
- 以退出码 0 表示成功
|
|
155
|
+
- 脚本执行超时时间为 30 秒
|
|
156
|
+
|
|
157
|
+
**配置示例:**
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"apiKeyHelper": "/path/to/get-token.sh"
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**从 Vault 获取 token 示例:**
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
#!/bin/bash
|
|
169
|
+
vault read -field=api_key secret/codebuddy/api-key
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
详细的认证配置请参考[设置文档 - 环境变量](settings.md#环境变量)。
|
|
173
|
+
|
|
174
|
+
## 访问控制和权限
|
|
175
|
+
|
|
176
|
+
我们支持细粒度权限,以便您可以精确指定代理允许执行的操作(例如运行测试、运行 linter)和不允许执行的操作(例如更新云基础设施)。这些权限设置可以检入版本控制并分发给组织中的所有开发人员,也可以由各个开发人员自定义。
|
|
177
|
+
|
|
178
|
+
### 权限系统
|
|
179
|
+
|
|
180
|
+
CodeBuddy Code 使用分层权限系统来平衡功能和安全性:
|
|
181
|
+
|
|
182
|
+
| 工具类型 | 示例 | 需要批准 | "是,不再询问"行为 |
|
|
183
|
+
|:--------|:-----|:--------|:-----------------|
|
|
184
|
+
| 只读 | 文件读取、LS、Grep | 否 | N/A |
|
|
185
|
+
| Bash 命令 | Shell 执行 | 是 | 按项目目录和命令永久记住 |
|
|
186
|
+
| 文件修改 | 编辑/写入文件 | 是 | 会话结束前有效 |
|
|
187
|
+
|
|
188
|
+
### 配置权限
|
|
189
|
+
|
|
190
|
+
您可以使用 `/permissions` 查看和管理 CodeBuddy Code 的工具权限。此 UI 列出所有权限规则及其来源的 settings.json 文件。
|
|
191
|
+
|
|
192
|
+
* **Allow** 规则将允许 CodeBuddy Code 使用指定的工具,无需进一步手动批准。
|
|
193
|
+
* **Ask** 规则将在 CodeBuddy Code 尝试使用指定工具时询问用户确认。Ask 规则优先于 allow 规则。
|
|
194
|
+
* **Deny** 规则将阻止 CodeBuddy Code 使用指定工具。Deny 规则优先于 allow 和 ask 规则。
|
|
195
|
+
* **Additional directories** 将 CodeBuddy 的文件访问扩展到初始工作目录之外的目录。
|
|
196
|
+
* **Default mode** 控制 CodeBuddy 在遇到新请求时的权限行为。
|
|
197
|
+
|
|
198
|
+
权限规则使用格式: `Tool` 或 `Tool(optional-specifier)`
|
|
199
|
+
|
|
200
|
+
仅工具名称的规则匹配该工具的任何使用。例如,将 `Bash` 添加到 allow 规则列表将允许 CodeBuddy Code 使用 Bash 工具而无需用户批准。
|
|
201
|
+
|
|
202
|
+
#### 权限模式
|
|
203
|
+
|
|
204
|
+
CodeBuddy Code 支持几种权限模式,可以在[设置文件](settings.md#配置文件)中设置为 `defaultMode`:
|
|
205
|
+
|
|
206
|
+
| 模式 | 描述 |
|
|
207
|
+
|:----|:-----|
|
|
208
|
+
| `default` | 标准行为 - 首次使用每个工具时提示权限 |
|
|
209
|
+
| `acceptEdits` | 自动接受会话的文件编辑权限 |
|
|
210
|
+
| `plan` | 计划模式 - CodeBuddy 可以分析但不能修改文件或执行命令 |
|
|
211
|
+
| `bypassPermissions` | 跳过所有权限提示(需要安全环境 - 见下方警告) |
|
|
212
|
+
|
|
213
|
+
<Warning>
|
|
214
|
+
`bypassPermissions` 模式应仅在安全、隔离的环境中使用,例如 Docker 容器或 VM。在生产环境或包含敏感数据的系统上使用此模式可能会带来安全风险。
|
|
215
|
+
</Warning>
|
|
216
|
+
|
|
217
|
+
#### 工作目录
|
|
218
|
+
|
|
219
|
+
默认情况下,CodeBuddy 可以访问其启动目录中的文件。您可以扩展此访问权限:
|
|
220
|
+
|
|
221
|
+
* **启动时**:使用 `--add-dir <path>` CLI 参数
|
|
222
|
+
* **会话期间**:使用 `/add-dir` 斜杠命令
|
|
223
|
+
* **持久配置**:添加到[设置文件](settings.md#配置文件)的 `additionalDirectories`
|
|
224
|
+
|
|
225
|
+
附加目录中的文件遵循与原始工作目录相同的权限规则 - 它们可以无提示读取,文件编辑权限遵循当前权限模式。
|
|
226
|
+
|
|
227
|
+
#### 工具特定的权限规则
|
|
228
|
+
|
|
229
|
+
某些工具支持更细粒度的权限控制:
|
|
230
|
+
|
|
231
|
+
**Bash**
|
|
232
|
+
|
|
233
|
+
* `Bash(npm run build)` 精确匹配 Bash 命令 `npm run build`
|
|
234
|
+
* `Bash(npm run test:*)` 匹配以 `npm run test` 开头的 Bash 命令
|
|
235
|
+
* `Bash(curl http://site.com/:*)` 匹配以 `curl http://site.com/` 开头的 curl 命令
|
|
236
|
+
|
|
237
|
+
<Tip>
|
|
238
|
+
CodeBuddy Code 能识别 shell 操作符(如 `&&`),因此前缀匹配规则如 `Bash(safe-cmd:*)` 不会授予它运行命令 `safe-cmd && other-cmd` 的权限
|
|
239
|
+
</Tip>
|
|
240
|
+
|
|
241
|
+
<Warning>
|
|
242
|
+
Bash 权限模式的重要限制:
|
|
243
|
+
|
|
244
|
+
1. 此工具使用**前缀匹配**,而非正则表达式或 glob 模式
|
|
245
|
+
2. 通配符 `:*` 仅在模式末尾有效,用于匹配任何后续内容
|
|
246
|
+
3. 像 `Bash(curl http://github.com/:*)` 这样的模式可以通过多种方式绕过:
|
|
247
|
+
* URL 前的选项: `curl -X GET http://github.com/...` 不匹配
|
|
248
|
+
* 不同协议: `curl https://github.com/...` 不匹配
|
|
249
|
+
* 重定向: `curl -L http://bit.ly/xyz` (重定向到 github)
|
|
250
|
+
* 变量: `URL=http://github.com && curl $URL` 不匹配
|
|
251
|
+
* 额外空格: `curl http://github.com` 不匹配
|
|
252
|
+
|
|
253
|
+
要更可靠地过滤 URL,请考虑:
|
|
254
|
+
|
|
255
|
+
* 使用带 `WebFetch(domain:github.com)` 权限的 WebFetch 工具
|
|
256
|
+
* 通过 CODEBUDDY.md 指示 CodeBuddy Code 您允许的 curl 模式
|
|
257
|
+
* 使用 hooks 进行自定义权限验证
|
|
258
|
+
</Warning>
|
|
259
|
+
|
|
260
|
+
**Read & Edit**
|
|
261
|
+
|
|
262
|
+
`Edit` 规则适用于所有编辑文件的内置工具。CodeBuddy 将尽力将 `Read` 规则应用于所有读取文件的内置工具,如 Grep、Glob 和 LS。
|
|
263
|
+
|
|
264
|
+
Read 和 Edit 规则都遵循 [gitignore](https://git-scm.com/docs/gitignore) 规范,有四种不同的模式类型:
|
|
265
|
+
|
|
266
|
+
| 模式 | 含义 | 示例 | 匹配 |
|
|
267
|
+
|-----|------|------|------|
|
|
268
|
+
| `//path` | 从文件系统根目录的**绝对**路径 | `Read(//Users/alice/secrets/**)` | `/Users/alice/secrets/**` |
|
|
269
|
+
| `~/path` | 从**家目录**的路径 | `Read(~/Documents/*.pdf)` | `/Users/alice/Documents/*.pdf` |
|
|
270
|
+
| `/path` | **相对于设置文件**的路径 | `Edit(/src/**/*.ts)` | `<设置文件路径>/src/**/*.ts` |
|
|
271
|
+
| `path` 或 `./path` | **相对于当前目录**的路径 | `Read(*.env)` | `<cwd>/*.env` |
|
|
272
|
+
|
|
273
|
+
<Warning>
|
|
274
|
+
像 `/Users/alice/file` 这样的模式不是绝对路径 - 它相对于您的设置文件!使用 `//Users/alice/file` 表示绝对路径。
|
|
275
|
+
</Warning>
|
|
276
|
+
|
|
277
|
+
**示例:**
|
|
278
|
+
|
|
279
|
+
* `Edit(/docs/**)` - 在 `<项目>/docs/` 中编辑(不是 `/docs/`!)
|
|
280
|
+
* `Read(~/.zshrc)` - 读取家目录的 `.zshrc`
|
|
281
|
+
* `Edit(//tmp/scratch.txt)` - 编辑绝对路径 `/tmp/scratch.txt`
|
|
282
|
+
* `Read(src/**)` - 从 `<当前目录>/src/` 读取
|
|
283
|
+
|
|
284
|
+
**WebFetch**
|
|
285
|
+
|
|
286
|
+
* `WebFetch(domain:example.com)` 匹配对 example.com 的获取请求
|
|
287
|
+
|
|
288
|
+
**MCP**
|
|
289
|
+
|
|
290
|
+
* `mcp__puppeteer` 匹配 `puppeteer` 服务器提供的任何工具(在 CodeBuddy Code 中配置的名称)
|
|
291
|
+
* `mcp__puppeteer__*` 通配符语法,也匹配 `puppeteer` 服务器的所有工具
|
|
292
|
+
* `mcp__puppeteer__puppeteer_navigate` 匹配 `puppeteer` 服务器提供的 `puppeteer_navigate` 工具
|
|
293
|
+
|
|
294
|
+
<Tip>
|
|
295
|
+
要批准 MCP 服务器的所有工具,可以使用以下任一格式:
|
|
296
|
+
|
|
297
|
+
* ✅ 使用: `mcp__github` (批准所有 GitHub 工具)
|
|
298
|
+
* ✅ 使用: `mcp__github__*` (批准所有 GitHub 工具,与上一条等价)
|
|
299
|
+
|
|
300
|
+
要仅批准特定工具,列出每一个:
|
|
301
|
+
|
|
302
|
+
* ✅ 使用: `mcp__github__get_issue`
|
|
303
|
+
* ✅ 使用: `mcp__github__list_issues`
|
|
304
|
+
</Tip>
|
|
305
|
+
|
|
306
|
+
### 权限配置示例
|
|
307
|
+
|
|
308
|
+
**基础权限配置:**
|
|
309
|
+
|
|
310
|
+
```json
|
|
311
|
+
{
|
|
312
|
+
"permissions": {
|
|
313
|
+
"allow": [
|
|
314
|
+
"Read",
|
|
315
|
+
"Edit",
|
|
316
|
+
"Bash(git:*)",
|
|
317
|
+
"Bash(npm:*)"
|
|
318
|
+
],
|
|
319
|
+
"ask": [
|
|
320
|
+
"WebFetch",
|
|
321
|
+
"Bash(docker:*)"
|
|
322
|
+
],
|
|
323
|
+
"deny": [
|
|
324
|
+
"Bash(rm:*)",
|
|
325
|
+
"Bash(sudo:*)",
|
|
326
|
+
"Edit(**/*.env)",
|
|
327
|
+
"Read(~/.ssh/**)"
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**安全限制配置:**
|
|
334
|
+
|
|
335
|
+
```json
|
|
336
|
+
{
|
|
337
|
+
"permissions": {
|
|
338
|
+
"allow": [
|
|
339
|
+
"Read",
|
|
340
|
+
"Edit(src/**)",
|
|
341
|
+
"Bash(git:status,git:diff)"
|
|
342
|
+
],
|
|
343
|
+
"deny": [
|
|
344
|
+
"Edit(**/*.env)",
|
|
345
|
+
"Edit(**/*.key)",
|
|
346
|
+
"Edit(**/*.pem)",
|
|
347
|
+
"Bash(wget:*)",
|
|
348
|
+
"Bash(curl:*)",
|
|
349
|
+
"Read(/etc/**)",
|
|
350
|
+
"Read(~/.ssh/**)",
|
|
351
|
+
"Read(~/.aws/**)"
|
|
352
|
+
],
|
|
353
|
+
"defaultMode": "default"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### 使用 hooks 进行额外的权限控制
|
|
359
|
+
|
|
360
|
+
[CodeBuddy Code hooks](hooks.md) 提供了一种注册自定义 shell 命令在运行时执行权限评估的方法。当 CodeBuddy Code 进行工具调用时,PreToolUse hooks 在权限系统运行之前运行,hook 输出可以决定是批准还是拒绝工具调用,以代替权限系统。
|
|
361
|
+
|
|
362
|
+
详见 [Hooks 文档](hooks.md)。
|
|
363
|
+
|
|
364
|
+
## 设置优先级
|
|
365
|
+
|
|
366
|
+
当存在多个设置源时,它们按以下顺序应用(从高到低优先级):
|
|
367
|
+
|
|
368
|
+
1. 命令行参数
|
|
369
|
+
2. 本地项目设置(`.codebuddy/settings.local.json`)
|
|
370
|
+
3. 共享项目设置(`.codebuddy/settings.json`)
|
|
371
|
+
4. 用户设置(`~/.codebuddy/settings.json`)
|
|
372
|
+
|
|
373
|
+
此层次结构确保在适当的地方仍允许项目和用户级别的灵活性。
|
|
374
|
+
|
|
375
|
+
## 凭据管理
|
|
376
|
+
|
|
377
|
+
CodeBuddy Code 安全地管理您的身份验证凭据:
|
|
378
|
+
|
|
379
|
+
| 平台 | 存储位置 |
|
|
380
|
+
|:----|:--------|
|
|
381
|
+
| macOS | 加密的 macOS Keychain |
|
|
382
|
+
| Linux | 系统密钥环(GNOME Keyring、KWallet) |
|
|
383
|
+
| Windows | Windows 凭据管理器 |
|
|
384
|
+
|
|
385
|
+
**动态凭据获取:** 使用 `apiKeyHelper` 配置自定义脚本动态获取 token,详见 [apiKeyHelper 配置](#apikeyhelper)。
|
|
386
|
+
|
|
387
|
+
## 安全最佳实践
|
|
388
|
+
|
|
389
|
+
### 1. 最小权限原则
|
|
390
|
+
|
|
391
|
+
仅授予 CodeBuddy Code 完成任务所需的最小权限:
|
|
392
|
+
|
|
393
|
+
```json
|
|
394
|
+
{
|
|
395
|
+
"permissions": {
|
|
396
|
+
"allow": [
|
|
397
|
+
"Read",
|
|
398
|
+
"Edit(src/**/*.ts)",
|
|
399
|
+
"Bash(npm:test,npm:build)"
|
|
400
|
+
],
|
|
401
|
+
"deny": [
|
|
402
|
+
"Edit(**/*.env)",
|
|
403
|
+
"Bash(rm:*)",
|
|
404
|
+
"Bash(sudo:*)"
|
|
405
|
+
]
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### 2. 保护敏感文件
|
|
411
|
+
|
|
412
|
+
始终拒绝访问包含敏感信息的文件:
|
|
413
|
+
|
|
414
|
+
```json
|
|
415
|
+
{
|
|
416
|
+
"permissions": {
|
|
417
|
+
"deny": [
|
|
418
|
+
"Read(.env)",
|
|
419
|
+
"Read(.env.*)",
|
|
420
|
+
"Read(secrets/**)",
|
|
421
|
+
"Read(~/.ssh/**)",
|
|
422
|
+
"Read(~/.aws/**)",
|
|
423
|
+
"Edit(**/*.key)",
|
|
424
|
+
"Edit(**/*.pem)"
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### 3. 使用 Bash 沙箱
|
|
431
|
+
|
|
432
|
+
在支持的平台上启用沙箱以隔离 bash 命令:
|
|
433
|
+
|
|
434
|
+
```json
|
|
435
|
+
{
|
|
436
|
+
"sandbox": {
|
|
437
|
+
"enabled": true,
|
|
438
|
+
"autoAllowBashIfSandboxed": true,
|
|
439
|
+
"excludedCommands": ["docker"]
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
详见[Bash 沙箱文档](bash-sandboxing.md)。
|
|
445
|
+
|
|
446
|
+
### 4. 审查权限日志
|
|
447
|
+
|
|
448
|
+
定期检查 CodeBuddy Code 的权限使用情况,确保符合安全策略。
|
|
449
|
+
|
|
450
|
+
### 5. 团队配置共享
|
|
451
|
+
|
|
452
|
+
将团队级别的权限配置检入版本控制:
|
|
453
|
+
|
|
454
|
+
```bash
|
|
455
|
+
# 创建团队共享配置
|
|
456
|
+
.codebuddy/settings.json
|
|
457
|
+
|
|
458
|
+
# 添加到 .gitignore
|
|
459
|
+
.codebuddy/settings.local.json
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
## 常见问题
|
|
463
|
+
|
|
464
|
+
### 使用 API Key 认证失败怎么办?
|
|
465
|
+
|
|
466
|
+
这是最常见的问题,通常是因为 **未配置或错误配置了 `CODEBUDDY_INTERNET_ENVIRONMENT` 环境变量**。
|
|
467
|
+
|
|
468
|
+
**排查步骤:**
|
|
469
|
+
|
|
470
|
+
1. 确认你使用的版本(海外版/中国版/iOA 版)
|
|
471
|
+
2. 检查环境变量是否正确设置:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
# 检查当前配置
|
|
475
|
+
echo $CODEBUDDY_API_KEY
|
|
476
|
+
echo $CODEBUDDY_INTERNET_ENVIRONMENT
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
3. 根据版本设置正确的环境变量:
|
|
480
|
+
|
|
481
|
+
| 版本 | `CODEBUDDY_INTERNET_ENVIRONMENT` |
|
|
482
|
+
|:----|:--------------------------------|
|
|
483
|
+
| 海外版 | 不设置或 `public` |
|
|
484
|
+
| 中国版 | `internal` |
|
|
485
|
+
| iOA 版 | `ioa` |
|
|
486
|
+
|
|
487
|
+
**常见错误:**
|
|
488
|
+
|
|
489
|
+
- ❌ 中国版用户忘记设置 `CODEBUDDY_INTERNET_ENVIRONMENT=internal`
|
|
490
|
+
- ❌ iOA 版用户设置成了 `internal` 而不是 `ioa`
|
|
491
|
+
- ❌ 环境变量只在当前终端生效,新开终端后失效(建议添加到 shell 配置文件)
|
|
492
|
+
|
|
493
|
+
### 如何临时绕过权限?
|
|
494
|
+
|
|
495
|
+
使用 `--permission-mode bypassPermissions` 启动 CodeBuddy Code:
|
|
496
|
+
|
|
497
|
+
```bash
|
|
498
|
+
codebuddy --permission-mode bypassPermissions
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
<Warning>
|
|
502
|
+
仅在安全、隔离的环境中使用此选项!
|
|
503
|
+
</Warning>
|
|
504
|
+
|
|
505
|
+
### 如何为特定项目设置不同的权限?
|
|
506
|
+
|
|
507
|
+
在项目根目录创建 `.codebuddy/settings.json`:
|
|
508
|
+
|
|
509
|
+
```json
|
|
510
|
+
{
|
|
511
|
+
"permissions": {
|
|
512
|
+
"allow": ["项目特定的权限"]
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
### 如何查看当前权限配置?
|
|
518
|
+
|
|
519
|
+
使用 `/permissions` 命令查看所有生效的权限规则及其来源。
|
|
520
|
+
|
|
521
|
+
## 另见
|
|
522
|
+
|
|
523
|
+
* [设置配置](settings.md) - 了解完整的配置选项
|
|
524
|
+
* [Hooks 文档](hooks.md) - 使用 hooks 进行高级权限控制
|
|
525
|
+
* [Bash 沙箱](bash-sandboxing.md) - 了解沙箱隔离功能
|
|
526
|
+
* [MCP 集成](mcp.md) - 配置 MCP 服务器权限
|
|
527
|
+
|
|
528
|
+
---
|
|
529
|
+
|
|
530
|
+
*通过适当的权限配置,确保 CodeBuddy Code 在安全边界内工作*
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# IDE 集成
|
|
2
|
+
|
|
3
|
+
CodeBuddy Code 支持两种与编辑器集成的方式,属于同一层级的 IDE 集成能力:
|
|
4
|
+
|
|
5
|
+
1. 通过 ACP (Agent Client Protocol) 协议作为通用「智能体服务端」被 IDE 调用
|
|
6
|
+
2. 通过 `--ide` 启动参数和 `/ide` 斜杠命令,作为「IDE 插件的后端伴生进程」进行深度集成
|
|
7
|
+
|
|
8
|
+
## 集成方式一:ACP 协议集成
|
|
9
|
+
|
|
10
|
+
适用于 Zed 等支持 ACP 的编辑器,将 CodeBuddy Code 作为通用 Agent Server 使用。
|
|
11
|
+
|
|
12
|
+
### 支持的编辑器
|
|
13
|
+
|
|
14
|
+
#### Zed 编辑器
|
|
15
|
+
|
|
16
|
+
通过 ACP 协议完整集成,支持:
|
|
17
|
+
|
|
18
|
+
- 项目上下文感知
|
|
19
|
+
- 工具操作代理(文件读写、终端命令)
|
|
20
|
+
- 权限请求交互
|
|
21
|
+
- 实时流式响应
|
|
22
|
+
|
|
23
|
+
配置详见:[ACP 协议集成文档](./acp.md)
|
|
24
|
+
|
|
25
|
+
## 集成方式二:IDE 插件集成 (`--ide` / `/ide`)
|
|
26
|
+
|
|
27
|
+
适用于 VS Code / Cursor / Windsurf / JetBrains 系列 IDE,通过插件 + 本地 MCP 服务器的方式集成。IDE 侧插件负责:
|
|
28
|
+
|
|
29
|
+
- 创建并维护 MCP 连接 (SSE / WebSocket)
|
|
30
|
+
- 将工作区信息、选区等上下文通过 MCP 协议传给 CodeBuddy
|
|
31
|
+
- 暴露 `openFile` / `openDiff` / `getDiagnostics` / `close_tab` 等 IDE 能力给 CodeBuddy 调用
|
|
32
|
+
|
|
33
|
+
### `--ide` 启动参数
|
|
34
|
+
|
|
35
|
+
当您在终端中直接启动 CodeBuddy 时,可以通过 `--ide` 参数让 CLI 主动尝试连接当前工作目录对应的 IDE:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
codebuddy --ide
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
行为说明:
|
|
42
|
+
|
|
43
|
+
- CodeBuddy 会在当前用户目录下扫描由 IDE 插件创建的锁文件,检测可用的 IDE 实例
|
|
44
|
+
- 仅当 IDE 的工作区包含当前目录时才认为是「有效 IDE」
|
|
45
|
+
- 优先连接「工作区匹配且进程链路为当前终端上游」的 IDE
|
|
46
|
+
- 连接成功后,CLI 会通过 IDE MCP 服务器获得:
|
|
47
|
+
- 文件/差异预览 (openFile / openDiff)
|
|
48
|
+
- 诊断信息 (getDiagnostics)
|
|
49
|
+
- 选区变化通知 (selection_changed)
|
|
50
|
+
|
|
51
|
+
> `--ide` 只是在「您从 IDE 终端手动启动 CLI」时的一种快捷连接方式,不负责真正启动 IDE 或插件。
|
|
52
|
+
|
|
53
|
+
### `/ide` 斜杠命令
|
|
54
|
+
|
|
55
|
+
当您在 CodeBuddy 的交互式界面中使用 IDE 插件集成时,可以通过 `/ide` 命令查看和管理当前 IDE 连接状态:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
/ide
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
典型用途包括:
|
|
62
|
+
|
|
63
|
+
- 查看当前是否已连接 IDE、连接的是哪一个 IDE
|
|
64
|
+
- 在存在多个可用 IDE 时,选择要连接的实例
|
|
65
|
+
- 手动断开或重新建立与 IDE 的 MCP 连接
|
|
66
|
+
|
|
67
|
+
具体交互行为由 IDE 集成 UI 决定,但整体定位是「管理 IDE 集成状态」而不是直接发起聊天。
|
|
68
|
+
|
|
69
|
+
## 选择哪种集成方式?
|
|
70
|
+
|
|
71
|
+
- 如果您的编辑器原生支持 ACP(例如 Zed),推荐使用 **ACP 协议集成**:
|
|
72
|
+
- 使用 `codebuddy --acp` 启动
|
|
73
|
+
- 由编辑器负责会话 UI 和工具代理
|
|
74
|
+
- 如果您使用 VS Code / Cursor / JetBrains 等,通过插件市场安装 CodeBuddy 插件,则推荐使用 **`--ide` / `/ide` 插件集成**:
|
|
75
|
+
- 插件负责启动 CodeBuddy 进程并建立 MCP 连接
|
|
76
|
+
- CLI 侧通过 `--ide` / `/ide` 与 IDE 建立和管理连接
|
|
77
|
+
|
|
78
|
+
两种方式在「集成层级」上是等价的,都是让 CodeBuddy 作为外部 Agent 与 IDE 深度协作,只是接入协议和 UI 承载方不同。
|
|
79
|
+
|
|
80
|
+
## 未来计划
|
|
81
|
+
|
|
82
|
+
后续版本将提供更多增强功能:
|
|
83
|
+
|
|
84
|
+
- 更友好的 DIFF 展示与修改确认流程 (结合 IDE diff 预览)
|
|
85
|
+
- 在 IDE 插件中提供更丰富的上下文选择与可视化
|
|
86
|
+
- 更多编辑器和 IDE 的官方集成
|
|
87
|
+
|
|
88
|
+
## 相关文档
|
|
89
|
+
|
|
90
|
+
- [ACP 协议集成](./acp.md) - 详细的 ACP 配置指南
|
|
91
|
+
- [CLI 参考手册](./cli-reference.md) - 命令行参数说明
|
|
92
|
+
- [斜杠命令](./slash-commands.md) - 包含 `/ide` 等会话命令总览
|