维护者确认:PR #4431 Claude 首 turn 自定义 OAuth 路由证明
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
需要维护者确认 PR #4431(https://github.com/makecindy/cindy/pull/4431)。
## 这次改动
接续 #3289 / #3279:本地 Claude Code 新会话首个 turn 尚未产生 SDK session id 时,由 Desktop 主进程签发短期路由证明,经 Cookie 注入兼容代理,使显式选择的自定义 OAuth 供应商不再回落到 XD 网关。
具体包括:
- `AgentDeps` 新增可选 `getClaudeProxySessionAuth`(host → maker-core 跨包契约)
- `@cindy/anthropic-compat-proxy` 新增 `forwardHeaderDelete`,HTTP / 非 JSON / WebSocket 转发前剥离 loopback-only Cookie
- 代理按 Cookie 中的 session/token 鉴权,身份不一致 fail-closed(401)
- 证明随 session 生命周期注销;debug 日志路径改为 Cookie 以复用 SDK 脱敏
## 为何需要维护者确认
架构门因核心路径改动 463 行触发。语义上这不是同结构内的实现替换:它新增了跨包 API 形状、loopback 路由证明数据契约,以及 host / maker-core / 兼容代理之间的身份与转发边界。原 #3289 虽有 #3292 架构讨论,本 PR 是 rebase 后的新 head,且补了鉴权恒时比较、身份不一致 fail-closed、证明改走 Cookie 等增量,需要维护者对当前 diff 再确认一次。
## 请维护者怎么做
请直接在 PR 上 Approve;如果需要作者修改,请 Request Changes。不要只留言或摘标签。
---
关联 PR:#4431(作者 @AquaHydro);本 issue 由 review-pr 流程自动创建,用于先讨论该 PR 涉及的技术架构调整,维护者确认后 PR 会恢复推进。
Contributor guide
Research direction
This issue is a maintainer review gate for PR #4431, not a standalone implementation task. Start by reviewing the PR diff and the related discussions in #3289 and #3279, focusing on AgentDeps and @cindy/anthropic-compat-proxy. Done means a maintainer approves the current architecture or requests changes on the PR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 15/100