mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
feat: 添加 GrowthBook 自定义服务器适配器
通过 CLAUDE_GB_ADAPTER_URL/KEY 环境变量连接自定义 GrowthBook 实例, 无配置时所有 feature 读取返回代码默认值。支持 GrowthBook Cloud(非 remoteEval), 含完整文档和 feature key 列表。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
17
DEV-LOG.md
17
DEV-LOG.md
@@ -1,5 +1,22 @@
|
||||
# DEV-LOG
|
||||
|
||||
## GrowthBook 自定义服务器适配器 (2026-04-03)
|
||||
|
||||
GrowthBook 功能开关系统原为 Anthropic 内部构建设计,硬编码 SDK key 和 API 地址,外部构建因 `is1PEventLoggingEnabled()` 门控始终禁用。新增适配器模式,通过环境变量连接自定义 GrowthBook 服务器,无配置时所有 feature 读取返回代码默认值。
|
||||
|
||||
**修改文件:**
|
||||
|
||||
| 文件 | 变更 |
|
||||
|------|------|
|
||||
| `src/constants/keys.ts` | `getGrowthBookClientKey()` 优先读取 `CLAUDE_GB_ADAPTER_KEY` 环境变量 |
|
||||
| `src/services/analytics/growthbook.ts` | `isGrowthBookEnabled()` 适配器模式下直接返回 `true`,绕过 1P event logging 门控 |
|
||||
| `src/services/analytics/growthbook.ts` | `getGrowthBookClient()` base URL 优先使用 `CLAUDE_GB_ADAPTER_URL` |
|
||||
| `docs/internals/growthbook-adapter.mdx` | 新增适配器配置文档,含全部 ~58 个 feature key 列表 |
|
||||
|
||||
**用法:** `CLAUDE_GB_ADAPTER_URL=https://gb.example.com/ CLAUDE_GB_ADAPTER_KEY=sdk-xxx bun run dev`
|
||||
|
||||
---
|
||||
|
||||
## Datadog 日志端点可配置化 (2026-04-03)
|
||||
|
||||
将 Datadog 硬编码的 Anthropic 内部端点改为环境变量驱动,默认禁用。
|
||||
|
||||
Reference in New Issue
Block a user