Add API auth seamline and minimal Claude proxy#425
Merged
Conversation
Agent-Logs-Url: https://github.com/OpenKnots/okcode/sessions/6cd8bf08-8ada-493c-b8a5-fc5b9a543673 Co-authored-by: BunsDev <68980965+BunsDev@users.noreply.github.com>
Agent-Logs-Url: https://github.com/OpenKnots/okcode/sessions/6cd8bf08-8ada-493c-b8a5-fc5b9a543673 Co-authored-by: BunsDev <68980965+BunsDev@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
BunsDev
April 13, 2026 02:50
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Creates a dedicated auth seamline under the API layer so auth HTTP flows are no longer embedded in
wsServer. Adds a minimal Claude-compatible Anthropic proxy, modeled onclaude-proxy, behind/api/auth.API seamline
apps/server/src/api/router.tsto centralize/api/*handling.Auth router
apps/server/src/api/authRouter.ts./api/pairing./api/auth/pairingas the auth-scoped route.Minimal Claude proxy
POST /api/auth/anthropic/v1/messages.anthropic-beta: claude-code-20250219x-api-keyanthropic-versionsystem/api/auth/anthropic/healthand/api/auth/anthropic/status.Server wiring
apps/server/src/wsServer.tsto delegate/apitraffic through the new router instead of handling pairing inline.Coverage
Why
The issue was not the proxy behavior itself; it was that auth and proxy concerns had no clean seam under the API layer. This change creates that seam first, then hangs a minimal Claude/Anthropic proxy off it so auth routing can evolve without growing more logic inside
wsServer.UI Changes
No UI changes.
Checklist