()
| 68 | * that re-login would fix it. See CC-1165 / gh-33105. |
| 69 | */ |
| 70 | export async function getBridgeDisabledReason(): Promise<string | null> { |
| 71 | if (feature('BRIDGE_MODE')) { |
| 72 | if (!isClaudeAISubscriber()) { |
| 73 | return 'Remote Control requires a claude.ai subscription. Run `claude auth login` to sign in with your claude.ai account.' |
| 74 | } |
| 75 | if (!hasProfileScope()) { |
| 76 | return 'Remote Control requires a full-scope login token. Long-lived tokens (from `claude setup-token` or CLAUDE_CODE_OAUTH_TOKEN) are limited to inference-only for security reasons. Run `claude auth login` to use Remote Control.' |
| 77 | } |
| 78 | if (!getOauthAccountInfo()?.organizationUuid) { |
| 79 | return 'Unable to determine your organization for Remote Control eligibility. Run `claude auth login` to refresh your account information.' |
| 80 | } |
| 81 | if (!(await checkGate_CACHED_OR_BLOCKING('tengu_ccr_bridge'))) { |
| 82 | return 'Remote Control is not yet enabled for your account.' |
| 83 | } |
| 84 | return null |
| 85 | } |
| 86 | return 'Remote Control is not available in this build.' |
| 87 | } |
| 88 | |
| 89 | // try/catch: main.tsx:5698 calls isBridgeEnabled() while defining the Commander |
| 90 | // program, before enableConfigs() runs. isClaudeAISubscriber() → getGlobalConfig() |
no test coverage detected