(accessToken: string)
| 74 | const EMPTY_POLL_LOG_INTERVAL = 100 |
| 75 | |
| 76 | function getHeaders(accessToken: string): Record<string, string> { |
| 77 | const headers: Record<string, string> = { |
| 78 | Authorization: `Bearer ${accessToken}`, |
| 79 | 'Content-Type': 'application/json', |
| 80 | 'anthropic-version': '2023-06-01', |
| 81 | 'anthropic-beta': BETA_HEADER, |
| 82 | 'x-environment-runner-version': deps.runnerVersion, |
| 83 | } |
| 84 | const deviceToken = deps.getTrustedDeviceToken?.() |
| 85 | if (deviceToken) { |
| 86 | headers['X-Trusted-Device-Token'] = deviceToken |
| 87 | } |
| 88 | return headers |
| 89 | } |
| 90 | |
| 91 | function resolveAuth(): string { |
| 92 | const accessToken = deps.getAccessToken() |
no outgoing calls
no test coverage detected