Skip to content

Commit 67caa5d

Browse files
unraidclaude
andcommitted
docs: add Remote Control (BRIDGE_MODE) entry to DEV-LOG
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e784f23 commit 67caa5d

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

DEV-LOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# DEV-LOG
22

3+
## Enable Remote Control / BRIDGE_MODE (2026-04-03)
4+
5+
**PR**: [claude-code-best/claude-code#60](https://github.com/claude-code-best/claude-code/pull/60)
6+
7+
Remote Control 功能将本地 CLI 注册为 bridge 环境,生成可分享的 URL(`https://claude.ai/code/session_xxx`),允许从浏览器、手机或其他设备远程查看输出、发送消息、审批工具调用。
8+
9+
**改动文件:**
10+
11+
| 文件 | 变更 |
12+
|------|------|
13+
| `scripts/dev.ts` | `DEFAULT_FEATURES` 加入 `"BRIDGE_MODE"`,dev 模式默认启用 |
14+
| `src/bridge/peerSessions.ts` | stub → 完整实现:通过 bridge API 发送跨会话消息,含三层安全防护(trim + validateBridgeId 白名单 + encodeURIComponent) |
15+
| `src/bridge/webhookSanitizer.ts` | stub → 完整实现:正则 redact 8 类 secret(GitHub/Anthropic/AWS/npm/Slack token),先 redact 再截断,失败返回安全占位符 |
16+
| `src/entrypoints/sdk/controlTypes.ts` | 12 个 `any` stub → `z.infer<ReturnType<typeof XxxSchema>>` 从现有 Zod schema 推导类型 |
17+
| `src/hooks/useReplBridge.tsx` | `tengu_bridge_system_init` 默认值 `false``true`,使 app 端显示 "active" 而非卡在 "connecting" |
18+
19+
**关键设计决策:**
20+
21+
1. **不改现有代码逻辑** — 只补全 stub、修正默认值、开启编译开关
22+
2. **`tengu_bridge_system_init`** — Anthropic 通过 GrowthBook 给订阅用户推送 `true`,但我们的 build 收不到推送;改默认值是唯一不侵入其他代码的方案
23+
3. **`peerSessions.ts` 认证** — 使用 `getBridgeAccessToken()` 获取 OAuth Bearer token,与 `bridgeApi.ts`/`codeSessionApi.ts` 认证模式一致
24+
4. **`webhookSanitizer.ts` 安全** — fail-closed(出错返回 `[webhook content redacted due to sanitization error]`),不泄露原始内容
25+
26+
**验证结果:**
27+
28+
- `/remote-control` 命令可见且可用
29+
- CLI 连接 Anthropic CCR,生成可分享 URL
30+
- App 端(claude.ai/code)显示 "Remote Control active"
31+
- 手机端(Claude iOS app)通过 URL 连接,双向消息正常
32+
33+
![Remote Control on Mobile](docs/images/remote-control-mobile.png)
34+
35+
---
36+
337
## WebSearch Bing 适配器补全 (2026-04-03)
438

539
原始 `WebSearchTool` 仅支持 Anthropic API 服务端搜索(`web_search_20250305` server tool),在非官方 API 端点(第三方代理)下搜索功能不可用。本次改动引入适配器架构,新增 Bing 搜索页面解析作为 fallback。

0 commit comments

Comments
 (0)