MCPcopy Create free account
hub / github.com/freecodexyz/free-code / updateAccessToken

Function updateAccessToken

src/bridge/sessionRunner.ts:527–542  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

525 }
526 },
527 updateAccessToken(token: string): void {
528 handle.accessToken = token
529 // Send the fresh token to the child process via stdin. The child's
530 // StructuredIO handles update_environment_variables messages by
531 // setting process.env directly, so getSessionIngressAuthToken()
532 // picks up the new token on the next refreshHeaders call.
533 handle.writeStdin(
534 jsonStringify({
535 type: 'update_environment_variables',
536 variables: { CLAUDE_CODE_SESSION_ACCESS_TOKEN: token },
537 }) + '\n',
538 )
539 deps.onDebug(
540 `[bridge:session] Sent token refresh via stdin for sessionId=${opts.sessionId}`,
541 )
542 },
543 }
544
545 return handle

Callers

nothing calls this directly

Calls 1

jsonStringifyFunction · 0.85

Tested by

no test coverage detected