Expand description
Thin HTTP wrappers for the CCR v2 code-session API.
Translated from openclaudecode/src/bridge/codeSessionApi.ts
Separate file from remoteBridgeCore.ts so the SDK /bridge subpath can export createCodeSession + fetchRemoteCredentials without bundling the heavy CLI tree (analytics, transport, etc.). Callers supply explicit accessToken + baseUrl — no implicit auth or config reads.
Structs§
- Remote
Credentials - Credentials from POST /bridge. JWT is opaque — do not decode. Each /bridge call bumps worker_epoch server-side (it IS the register).
Functions§
- create_
code_ session - Create a new code session via POST /v1/code/sessions
- fetch_
remote_ credentials - Fetch remote credentials for a session via POST /v1/code/sessions/{id}/bridge